[size=large]1.在项目使用maven进行构建时,对于在本地上的jar包没有上传到maven库中,常用的办法是放到webapp/WEB-INF/lib目录下,但是在最后进行项目打包时就会报错,可以通过以下配置解决:[/size]
[size=large]2.对于某些不想进行打包的目录可以进行过滤,配置如下:[/size]
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.5.1</version>
<configuration>
<source>1.7</source>
<target>1.7</target>
<compilerArgument>-Xlint:all</compilerArgument>
<showWarnings>true</showWarnings>
<showDeprecation>true</showDeprecation>
<compilerArguments>
<extdirs>src\main\webapp\WEB-INF\lib</extdirs>
</compilerArguments>
</configuration>
</plugin>
[size=large]2.对于某些不想进行打包的目录可以进行过滤,配置如下:[/size]
<plugin>
<artifactId>maven-war-plugin</artifactId>
<version>2.1.1</version>
<configuration>
<packagingExcludes>WEB-INF/web.xml</packagingExcludes>
<warSourceExcludes>sql/**</warSourceExcludes>
</configuration>
</plugin>