提问人:bharath kollareddy 提问时间:11/13/2015 最后编辑:bharath kollareddy 更新时间:11/13/2015 访问量:814
maven 在 war 文件中构建没有类
maven build no classes in war file
问:
我无法在 war 文件中看到类文件。这是马使用的pom文件,这是我项目的文件夹结构
java资源
--> src--> package-->类
--> 网页内容
-->绒球.xml
你能看看我在这里使用的pom.xml文件吗,请让我知道应该怎么做才能将类放入war文件的web-inf文件夹中?我能够看到我创建的 web.xml lib 和 jsp 文件。
代码-->
xmlns:xsi=“http://www.w3.org/2001/XMLSchema-instance”
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.capitalone.data.modeling</groupId>
<artifactId>DataModelAutomation</artifactId>
<packaging>war</packaging>
<version>01.00.00.01-SNAPSHOT</version>
<url>http://maven.apache.org</url>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<finalName>DataModelAutomation</finalName>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<configuration>
<webXml>WebContent\WEB-INF\web.xml</webXml>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>copy-dependencies</id>
<phase>prepare-package</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}\DataModelAutomation\WEB-INF\lib</outputDirectory>
<overWriteReleases>false</overWriteReleases>
<overWriteSnapshots>false</overWriteSnapshots>
<overWriteIfNewer>true</overWriteIfNewer>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<configuration>
<webResources>
<resource>
<directory>WebContent</directory>
<filtering>true</filtering>
</resource>
</webResources>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<directory>src</directory>
</configuration>
</plugin>
</plugins>
</build>
答: 暂无答案
评论
WEB-INF/lib