Ing*_*her 4 maven-2 glassfish glassfish-3 maven-glassfish-plugin
我需要将我的JavaEE应用程序作为目录部署在Glassfish上,而不是打包的WAR文件.是否可以使用Maven Glassfish插件将目录部署到Glassfish?
使用管理控制台,它是可能的.但我希望能够在命令行上执行此操作.
以下配置适用于我(请注意该artifact元素指向目录):
<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>
<passwordFile>${glassfish.home}/domains/${project.artifactId}/master-password</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}</artifact>
</component>
</components>
</configuration>
</plugin>
Run Code Online (Sandbox Code Playgroud)
结果asadmin命令是:
asadmin --host localhost --port 4848 --user admin --passwordfile /home/pascal/opt /glassfishv3/glassfish/domains/maven-glassfish-testcase/master-password --interac tive=false --echo=true --terse=true deploy --name maven-glassfish-testcase --forc e=false --precompilejsp=false --verify=false --enabled=true --generatermistubs=fa lse --availabilityenabled=false --keepreposdir=false --keepfailedstubs=false --lo gReportedErrors=true --upload=false --help=false /home/pascal/Projects/stackoverf low/maven-glassfish-testcase/target/maven-glassfish-testcase
| 归档时间: |
|
| 查看次数: |
3390 次 |
| 最近记录: |