The plugin: http://maven-glassfish-plugin.java.net/deploy-mojo.html
To deploy to a glassfish server using maven, invoke (inside your ear project):
mvn glassfish:deploy
You withdraw to add together the ff plugin to your ear's pom.xml
<plugin> <groupId>org.glassfish.maven.plugin</groupId> <artifactId>maven-glassfish-plugin</artifactId> <version>2.1</version> <configuration> <glassfishDirectory>${local.glassfish.home}</glassfishDirectory> <user>${local.glassfish.user}</user> <passwordFile>${local.glassfish.passfile}</passwordFile> <autoCreate>true</autoCreate> <debug>true</debug> <echo>false</echo> <terse>true</terse> <domain> <name>${local.glassfish.domain}</name> <adminPort>4848</adminPort> <httpPort>8080</httpPort> <httpsPort>8443</httpsPort> <iiopPort>3700</iiopPort> <jmsPort>7676</jmsPort> <reuse>false</reuse> </domain> <components> <component> <name>${project.artifactId}</name> <artifact> ${project.build.directory}/${project.build.finalName}.ear </artifact> </component> </components> </configuration> </plugin>Take banking concern complaint that the plugin reads a password file that tin hold upward relieve anywhere you lot desire every bit long every bit you lot convey access to it. I've placed mine within the glassfish's abode directory for easier reference. It contains the glassfish's admin password. If you lot forgot to gear upward this you'll larn authentication error.
AS_ADMIN_PASSWORD=my_glassfish_admin_password
Also past times default glassfish:deploy destination is calling asadmin, thence it plant perfectly on linux but non on windows. To hold upward able to produce thence merely delete or rename asadmin to asadmin.sh. This manner the plugin volition read asadmin.bat for windows.
0 komentar:
Please comment if there are any that need to be asked.