IDEA maven 编译 出错 具体 显示
Exception in thread "main" java.lang.AssertionError
解决办法:
错误原因是maven编译插件的Bug,需要添加下面选项。
<forceJavacCompilerUse>true</forceJavacCompilerUse>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.3</version>
<configuration>
<source>${project.build.java.version}</source>
<target>${project.build.java.version}</target>
<!-- "Since 3.0, the default compiler is javax.tools.JavaCompiler -->
<!-- (if you are using java 1.6) and is used to compile Java sources. -->
<!-- If you want to force the plugin using javac, you must configure -->
<!-- the plugin option forceJavacCompilerUse." -->
<!-- ElPaaso compilation failed if set to false with multitrhead -->
<!-- compilation enabled (-T3). -->
<!-- Try to disable it after switching to jdk 1.7 -->
<forceJavacCompilerUse>true</forceJavacCompilerUse>
<!-- workaround maven compiler 3.1 bug which incorrectly recompiles some resources that have not changed See https://jira.codehaus.org/browse/MCOMPILER-209
and http://stackoverflow.com/questions/17944108/maven-compiler-plugin-always-detecting-a-set-of-sources-as-stale -->
<useIncrementalCompilation>false</useIncrementalCompilation>
</configuration>
</plugin>
打印出所有引用
mvn dependency:tree 显示出所有的