Class maven在war文件中不构建类
我无法在war文件中看到类文件。这是ma使用的pom文件,这是我项目的文件夹结构 javaResources -->src-->包-->类 -->网络内容 -->pom.xml 你能看看我在这里使用的pom.xml文件吗?请告诉我应该怎么做才能将这些类放入war文件的web inf文件夹?我可以看到我创建的web.xml库和jsp文件 代码--> xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance"Class maven在war文件中不构建类,class,maven,pom.xml,web-project,Class,Maven,Pom.xml,Web Project,我无法在war文件中看到类文件。这是ma使用的pom文件,这是我项目的文件夹结构 javaResources -->src-->包-->类 -->网络内容 -->pom.xml 你能看看我在这里使用的pom.xml文件吗?请告诉我应该怎么做才能将这些类放入war文件的web inf文件夹?我可以看到我创建的web.xml库和jsp文件 代码--> xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation=”
xsi:schemaLocation=”http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd">
4.0.0
com.capitalone.data.modeling
数据模型自动化
战争
01.00.00.01-快照
http://maven.apache.org
朱尼特
朱尼特
3.8.1
测试
数据模型自动化
org.apache.maven.plugins
maven战争插件
WebContent\WEB-INF\WEB.xml
org.apache.maven.plugins
maven依赖插件
复制依赖项
准备包装
复制依赖项
${project.build.directory}\DataModelAutomation\WEB-INF\lib
假的
假的
真的
org.apache.maven.plugins
maven战争插件
网络内容
真的
org.apache.maven.plugins
maven编译器插件
src
检查。不要使用maven dependency plugin插件将库复制到
WEB-INF/lib
文件夹中,因为maven war插件会自动处理此问题,是的,请遵循标准目录布局。。。
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>