How m2eclipse creates a new domain using maven-glassfish-plugin?

version - glassfish v3

I want to try maven-glassfish-plugin, but I don't know how to create a new domain.

+3
source share
1 answer

You can use the command create-domain. Either skip the options on the command line or follow the interactive steps:

$ asadmin create-domain

But Maven GlassFish Plugin (after properly configured) can also create a domain for the following purpose:

glassfish:create-domainCreate a new Glassfish domain. (Creating an existing domain will delete and recreate it.)

( ):

<plugin>
  <groupId>org.glassfish.maven.plugin</groupId>
  <artifactId>maven-glassfish-plugin</artifactId>
  <version>2.2-SNAPSHOT</version>
  <configuration>
    <glassfishDirectory>${glassfish.home}</glassfishDirectory>
    <user>${domain.username}</user>
    <adminPassword>${domain.password}</adminPassword>
    <!-- <passwordFile>path/to/asadmin/passfile</passwordFile> -->
    <autoCreate>true</autoCreate>
    <debug>true</debug>
    <echo>true</echo>
    <skip>${test.int.skip}</skip>
    <domain>
      <name>${project.artifactId}</name>
      <httpPort>8080</httpPort>
      <adminPort>4848</adminPort>
    </domain>
    <components>
      <component>
        <name>${project.artifactId}</name>
        <artifact>${project.build.directory}/${project.build.finalName}.war</artifact>
      </component>
    </components>
  </configuration>
</plugin>
0

Source: https://habr.com/ru/post/1750890/


All Articles