开发者

How m2eclipse create a new domain by maven-glassfish-plugin?

开发者 https://www.devze.com 2023-01-03 21:57 出处:网络
version is glassfish v3 I want to trying maven-glassfish-plugin but I don\'t know 开发者_如何学Gohow to create a new domain.You can use the create-domain command. Either pass parameters on the comma

version is glassfish v3

I want to trying maven-glassfish-plugin but I don't know 开发者_如何学Gohow to create a new domain.


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

$ asadmin create-domain

But the Maven GlassFish Plugin (once properly configured) can also create a domain with the following goal:

glassfish:create-domain Create a new Glassfish domain. (Creating an existing domain will cause it to be deleted and recreated.)

Here is a configuration sample (inspired by the Fairly Complete Configuration Example):

<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

精彩评论

暂无评论...
验证码 换一张
取 消