When I run mvn clean compile
on my project I get a build success.
But when I run mvn install
straight afterwards, I get a Build Failure because of a compilation error.
The error I get is:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:testCompile (default-testCompile) on project auto-tests: Compilation failure: Compilation failure:
I have this in my pom.xml
:
<plugin>
<inherited>true</inherited>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<encoding>UTF-8</encoding>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>
and
<dependency>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
</dependency>
The failure is because it cannot find the classes which sit in another module. The dependency for these classes is added in my pom file and intellij never complains about it.
Am I missing something here?