我正在尝试使用glassfish-maven-plugin(https://maven-glassfish-plugin.dev.java.net/)与GlassFish v3(我在Mac上并使用Eclipse),我似乎无法让我的Web应用程序部署.我一直遇到:
启动域需要主密码.没有控制台,没有提示可能.您应该使用--savemasterpassword = true创建域,或者使用--passwordfile选项提供密码文件.
这是我的POM文件的相关部分.
<profiles>
<profile>
<id>development</id>
<activation>
<property>
<name>phase</name>
<value>development</value>
</property>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.glassfish.maven.plugin</groupId>
<artifactId>maven-glassfish-plugin</artifactId>
<version>2.2-SNAPSHOT</version>
<configuration>
<glassfishDirectory>${glassfish.directory}</glassfishDirectory>
<user>${glassfish.user}</user>
<passFile>${glassfish.directory}/domains/${project.artifactId}/config/domain-passwords</passFile>
<domain>
<name>${project.artifactId}</name>
</domain>
<components>
<component>
<name>${project.artifactId}</name>
<artifact>${project.build.directory}/artifacts/${project.artifactId}.war</artifact>
</component>
</components>
</configuration>
</plugin>
</plugins>
</build>
<pluginRepositories>
<pluginRepository>
<id>ocean</id>
<url>http://maven.ocean.net.au/snapshot</url>
<releases>
<enabled>false</enabled>
<updatePolicy>never</updatePolicy>
</releases>
<snapshots>
<enabled>true</enabled>
<updatePolicy>always</updatePolicy>
</snapshots>
</pluginRepository>
</pluginRepositories>
</profile>
</profiles>
Run Code Online (Sandbox Code Playgroud)
这是Maven正在执行的start-domain命令.
asadmin --host localhost --port 4848 --user admin --passwordfile /var/folders/sk/skcc8rAVGSynOBBaOwWN3U+++TI--Tmp-/mgfp5377058868244877698.tmp --interactive = false --echo = true --terse = true start-domain --debug = false --domaindir/Applications/GlassFish/v3/glassfish/domains …