I ran into a weird exception when compiling my maven project. This failed even when the project had no code or dependencies. Searching our dear google gave ridiculous results. But finally I found the solution.
Error:
The error is pretty misleading. The solution to this is to check the parent reference in pom.xml
I had missed the pom reference in the below -
Error:
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 8.521s
[INFO] Finished at: Thu May 21 16:59:13 PDT 2015
[INFO] Final Memory: 12M/491M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.codehaus.gmaven:gmaven-plugin:1.3:execute (calculate-srcroot) on project bigsky-ui-tests: groovy.lang.GroovyRuntimeException: Ambiguous method overloading for method java.io.File#<init>.
[ERROR] Cannot resolve which method to invoke for [null, class java.lang.String] due to overlapping prototypes between:
[ERROR] [class java.lang.String, class java.lang.String]
[ERROR] [class java.io.File, class java.lang.String]
[ERROR] -> [Help 1]
The error is pretty misleading. The solution to this is to check the parent reference in pom.xml
I had missed the pom reference in the below -
<parent>
<groupId>com.vmware</groupId>
<artifactId>bigsky</artifactId>
<version>1.0.0-SNAPSHOT</version>
<relativePath>../src/pom.xml</relativePath> <!-- Had not provided this -->
</parent>
No comments:
Post a Comment