Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Execution default-clean of goal org.grails:grails-maven-plugin:2.4.4:clean failed #66

Open
mmaryo opened this issue Apr 12, 2015 · 1 comment

Comments

@mmaryo
Copy link

mmaryo commented Apr 12, 2015

Hi,

I can't use maven because of an error during clean.

To reproduce :

Java 8
Grails 2.5.0
New project

execute :
grails create-pom test

then :
mvn clean install package

the output :
[INFO] Scanning for projects...
[WARNING]
[WARNING] Some problems were encountered while building the effective model for test:test250:grails-app:0.1
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-surefire-plugin is missing. @ line 160, column 21
[WARNING]
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING]
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING]
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building test250 0.1
[INFO] ------------------------------------------------------------------------
[WARNING] The POM for org.apache.maven.plugins:maven-clean-plugin:jar:2.4.0 is missing, no dependency information available
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.333 s
[INFO] Finished at: 2015-04-12T00:43:19+02:00
[INFO] Final Memory: 6M/240M
[INFO] ------------------------------------------------------------------------
[ERROR] Plugin org.apache.maven.plugins:maven-clean-plugin:2.4.0 or one of its dependencies could not be resolved: Failure to find org.apache.maven.plugins:maven-clean-plugin:jar:2.4.0 in https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginResolutionException

So I changed the maven-clean-plugin from 2.4.0 to 2.6.1

then execute :
mvn install package

the output :
[INFO] Scanning for projects...
[WARNING]
[WARNING] Some problems were encountered while building the effective model for test:test250:grails-app:0.1
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-surefire-plugin is missing. @ line 160, column 21
[WARNING]
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING]
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING]
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building test250 0.1
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.6.1:clean (default-clean) @ test250 ---
[INFO]
[INFO] --- grails-maven-plugin:2.4.4:clean (default-clean) @ test250 ---
|Loading Grails 2.5.0
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.294 s
[INFO] Finished at: 2015-04-12T08:37:50+02:00
[INFO] Final Memory: 23M/255M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.grails:grails-maven-plugin:2.4.4:clean (default-clean) on project test250: Execution default-clean of goal org.grails:grails-maven-plugin:2.4.4:clean failed: java.lang.reflect.InvocationTargetException: org.codehaus.groovy.runtime.DefaultGroovyMethods.each(Ljava/util/Collection;Lgroovy/lang/Closure;)Ljava/util/Collection; -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionException

Is there a solution ?
Thanks

@maartenvs
Copy link

In the mean time, a new version of grails-maven-plugin is released that is compatible with Grails 2.5.1. You can now work around the second reported error by changing the generated POM to use version 2.4.6 of grails-maven-plugin.

The wrong version numbers causing both errors originate from grails-core/grails-resources/src/grails/templates/maven/project.pom.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants