我有一个带有父POM的3个模块的Maven项目。当我从父级运行maven clean-compile-test时,它在测试阶段失败,并给出了大量的编译错误,说我的本地类“符号未找到”。
我发现使用IntelliJ ide,如果我在运行maven测试之前使用“Make Project”按钮,那么maven测试就可以工作了!
编辑:现在我发现问题是maven编译由于某种原因没有在目标文件夹中创建类文件,这是我在父POM文件中的maven编译器插件配置:
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
<excludes>
<exclude>**/*.*</exclude>
</excludes>
</configuration>
</plugin>
</plugins>
</build>
有任何想法吗?