maven - Error when using groovy-eclipse-plugin and @Grab -
getting following error when running mvn clean compile
on new system. works fine on local (windows) environment.
[error] failed execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project visa-threatintel: compilation failure: compilation failure: [error] /path/to/class.groovy:[2,2] 1. error in /path/to/class.groovy (at line 2) [error] @grab(group="javax.mail", module="mail", version="1.5.0-b01", type="jar"), [error] ^^^ [error] groovy:ambiguous method overloading method org.apache.ivy.core.settings.ivysettings#load.
both local , new system use maven 3.2.5 , pom identical. relevant excerpts below:
<groovy.version>2.2.1</groovy.version> <ivy.version>2.4.0</ivy.version> <build> <plugins> <plugin> <groupid>org.apache.maven.plugins</groupid> <artifactid>maven-compiler-plugin</artifactid> <version>3.1</version> <extensions>true</extensions> <configuration> <!-- http://maven.apache.org/plugins/maven-compiler-plugin/ --> <source>1.6</source> <target>1.6</target> <compilerid>groovy-eclipse-compiler</compilerid> </configuration> <dependencies> <dependency> <groupid>org.codehaus.groovy</groupid> <artifactid>groovy-eclipse-compiler</artifactid> <version>2.9.0-01</version> </dependency> <!-- 2.2.1 version isn't available release, needs acquired codehaus nexus repository --> <dependency> <groupid>org.codehaus.groovy</groupid> <artifactid>groovy-eclipse-batch</artifactid> <version>${groovy.version}-01-snapshot</version> </dependency> <!-- allow @grab annotations --> <dependency> <groupid>org.apache.ivy</groupid> <artifactid>ivy</artifactid> <version>${ivy.version}</version> </dependency> </dependencies> </plugin> <plugin> <groupid>org.codehaus.mojo</groupid> <artifactid>build-helper-maven-plugin</artifactid> <version>1.9.1</version> <executions> <execution> <id>add-source</id> <phase>generate-sources</phase> <goals> <goal>add-source</goal> </goals> <configuration> <sources> <source>src/main/groovy</source> </sources> </configuration> </execution>
i tried changing groovy version 2.4.3 got same error. seen before?
having encountered similar issue, found had 2 issues:
maven deps failed download
a maven dependency (maven-assembly-plugin) had failed download.
deleting .lastupdated
files in local m2 repository:
#> find ~/.m2/repository -name *.lastupdated ~/.m2/repository/org/apache/maven/plugins/maven-assembly-plugin/2.2-beta-5/maven-assembly-plugin-2.2-beta-5.pom.lastupdated #> find ~/.m2/repository -name *.lastupdated -delete
grapeconfig.xml & repository ssl certificate
also ~/.groovy/grapeconfig.xml
file needs configured tell groovy pull dependencies - in case corporate nexus repository, meant had install https certificate in jre cacerts file.
how test
one suggestion test have set correctly call grape install
on test dependency , give clearer sense of wrong (grape distributed part of groovy binaries, include on path, or qualify path):
grape install javax.mail mail 1.5.0-b01
Comments
Post a Comment