我是Maven的新手,所以我的问题可能有点基础。但经过大量网上搜索,我无法找到答案。我正在尝试将我的Web项目转换为Maven。我已经创建了所有必需的项目文件夹结构我的POM.xml看起来像这样:
<plugin>
<groupId>org.glassfish.maven.plugin</groupId>
<artifactId>maven-glassfish-plugin</artifactId>
<version>2.1</version>
<executions>
<execution>
<id>gf-undeploy</id>
<goals>
<goal>undeploy</goal>
</goals>
<phase>clean</phase>
</execution>
<execution>
<id>gf-deploy</id>
<goals>
<goal>deploy</goal>
</goals>
<phase>package</phase>
</execution>
</executions>
<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>8181</httpsPort>
<iiopPort>3700</iiopPort>
<jmsPort>7676</jmsPort>
<reuse>false</reuse>
</domain>
<components>
<component>
<name>${project.artifactId}</name>
<artifact>${project.build.directory}/${project.build.finalName}.war
</artifact>
</component>
</components>
</configuration>
</plugin>
</plugins>
<finalName>final_app</finalName>
</build>
我执行maven命令:mvn glassfish:deploy。应用程序正在部署,但是当我尝试访问JSP / servlet时,我获得了404状态。我检查了Glassfish目录中的webapps,文件夹结构似乎已经在部署后严重创建了。请提出任何解决方案。