您的位置:首页 > 其它

程序包xxx不存在,找不到符号

2017-09-16 13:31 447 查看
使用mvn命令打包时发现程序包xxx不存在,找不到符号。发现是因为maven编译时只加载maven库中的jar包,而手动添加到lib下的包maven无法自动加载。

解决办法:

在pom.xml文件中添加配置:

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.3</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
<encoding>UTF-8</encoding>
<compilerArguments>
<extdirs>${basedir}/webapp/WEB-INF/lib</extdirs>
</compilerArguments>
</configuration>
</plugin>
</plugins>
</build>
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  maven jar
相关文章推荐