Atitit maven 编译与资源文件与web目录自定义配置 与eclipse的集成与war包打包
1.1. 配置webapp目录 plugin设置 webappDirectory 1
1.2. Maven 配置maven不要乱编译, 指定sourceDirectory为srcnone 2
1.3. 指定maven不要乱复制一些src文件资源 指定resource为 resnone 2
2. Maven只需要打包war就可以了。。这个eclipse必须要web项目才可,maven还是比较好用 3
2.3. 设置C:\0wkspc\hislog\pom2tomcat.xml与运行 4
1.1. 配置webapp目录 plugin设置 webappDirectory
默认貌似在 src/main/webapp 太深了不好着,可维护性不好。。所以我们单独指定
<build>
<plugins>
<!-- 修改webapp目录为WebContent -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<configuration>
<!-- 设置WebContent目录为Web目录 -->
<webappDirectory>${basedir}/WebContent</webappDirectory>
<warSourceDirectory>${basedir}/WebContent3</warSourceDirectory>
</configuration>
</plugin>
</plugins>
warSourceDirectory好像是个资源文件包,最后俩个合并在一起,使用起来差不多。。
1.2. Maven 配置maven不要乱编译, 指定sourceDirectory为srcnone
Maven