2
這是我第一次用Maven在Glassfish服務器上部署Web應用程序。glassfish部署期間發生錯誤 - 這裏沒有默認名稱的web組件
我執行以下行家目標一步一步:
mvn glassfish:create-domain -P glassfish
mvn glassfish:start-domain -P glassfish
mvn glassfish:deploy -P glassfish
一切順利,直到第三步驟(glassfish:deploy
)和錯誤消息是
[ERROR] remote failure: Error occurred during deployment: Exception while deploying the app [herald-web-services] : There is no web component by the name of default here.. Please see server.log for more details.
[ERROR] Deployment of /Users/Ray/workspace/herald-web-services/target/herald-web-services-1.1-SNAPSHOT.war failed.
[ERROR] For more detail on what might be causing the problem try running maven with the --debug option
[ERROR] or setting the maven-glassfish-plugin "echo" property to "true".
而且,這裏是我的一部分pom.xml
:
<project>
...
<build>
<plugins>
<plugin>
<groupId>org.glassfish.maven.plugin</groupId>
<artifactId>maven-glassfish-plugin</artifactId>
<version>2.1</version>
<configuration>
<glassfishDirectory>${glassfish.home}</glassfishDirectory>
<user>${domain.user}</user>
<adminPassword>${domain.password}</adminPassword>
<passwordFile>${glassfish.home}/domains/${project.artifactId}/config/domain-passwords</passwordFile>
<autoCreate>true</autoCreate>
<debug>true</debug>
<echo>true</echo>
<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>
</domain>
<components>
<component>
<name>${project.artifactId}</name>
<artifact>${project.build.directory}/${project.build.finalName}.war</artifact>
</component>
</components>
</configuration>
</plugin>
</plugins>
</build>
...
</project>
和settings.xml
,
<profile>
<id>glassfish</id>
<properties>
<glassfish.home>/Users/Ray/glassfish3</glassfish.home>
<domain.user>admin</domain.user>
<domain.password>changeit</domain.password>
<test.int.skip>true</test.int.skip>
</properties>
</profile>
我懷念我的pom.xml
或Glassfish的配置些什麼呢?
請添加web.xml的片段,並顯示您在其中更改了哪些內容以進行部署工作。這會讓你的回答更清晰,值得投票。 – vkraemer 2013-05-13 02:37:11
關於你如何發現這個問題的信息也會有用。 – vkraemer 2013-05-13 02:38:18