The commands for the plugin can be found here.
If you have problems with your existing domain password, try out "changeit" or leave it blank. If you want to create a new domain anyway use the follwing command:
$ ./asadmin create-domain --savemasterpassword=true mydomain
The savemasterpassword option specifies that the password is stored in a file, which is also used in the example config below. Furthermore, you will be prompted for username and password.
Within the <components> node the final artefact which gets deployed on the servicer is is specified.
Example of a simple configuration (prerequisite is that your Glassfish Home sytem variable is set):
<project>
<properties>
<glassfish.home>${env.GLASSFISH_HOME}</glassfish.home>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.glassfish.maven.plugin</groupId>
<artifactId>maven-glassfish-plugin</artifactId>
<version>2.1</version>
<configuration>
<user>admin</user>
<passwordFile>
${glassfish.home}/glassfish/domains/${project.artifactId}/config/domain-passwords
</passwordFile>
<autoCreate>true</autoCreate>
<debug>true</debug>
<echo>false</echo>
<terse>true</terse>
<skip>${test.int.skip}</skip>
<domain>
<name>${project.artifactId}</name>
<adminPort>4848</adminPort>
<httpPort>8080</httpPort>
<httpsPort>8443</httpsPort>
<iiopPort>3700</iiopPort>
<jmsPort>7676</jmsPort>
<reuse>false</reuse>
<properties>
<property>
<name>
server.log-service.file
</name>
<value>
${domain.log.dir}/server.log
</value>
</property>
</properties>
</domain>
<components>
<component>
<name>${project.artifactId}</name>
<artifact>
${project.build.directory}/${project.build.finalName}.war
</artifact>
</component>
</components>
</configuration>
</plugin>
</plugins>
</build>
</project>
No comments:
Post a Comment