What happened to maven2gradle in 1.2? Is it still there or…? I see no reference to it in the release note.
The maven2gradle feature is part of 1.2 but didn’t get much press because it’s incubating and in an early stage.
Thanks for the reply. I tried it out when it came out in the RC and when I revisited using it in the new release my impression was that somehow it had become more sensitive to obscurities in our pom files.
… so I wasn’t sure if this was because the plugin was broken in 1.2 or what had happened.
I’ve since been able to get on track again. FYI, maven2Gradle appears to take issue with:
< packaging >ourcustompackaging< /packaging >
< parent >
< /parent >
Since these are in our case (don’t know about other use cases) Maven specific hacks that would not survive a gradle migration, it would probably make sense if it ignored it somehow.
As it is now, it just dies with:
Wait, obtaining effective pom…
FAILURE: Build failed with an exception.
- What went wrong:
Execution failed for task ‘:maven2Gradle’.
exec returned: 1
which is as useful as Maven is. But maybe this is because that is what Gradle is doing at this step, ie. calling Maven?
Is there a way to feed in a variable to Maven when using the maven2Gradle plugin?
(sorry for the many updates, I wasn’t familiar with the markdown syntax)
Can you try using the maven2Gradle from gradle nightly? We’ve just improved it, so that it no longer needs ‘mvn’ on the path. It’s using embedded maven.
“exec returned: 1” is probably because the “mvn help:effectivePom” command that was issued had failed. I would check if it successfully runs from the command line. However, I’m not sure if it makes sense to dig into that since we no longer fork off a separate ‘exec’ process to obtain the effective pom.
I tried just now with a PATH that didn’t contain any mvn.
It still fails ungracefully with:
11:42:15.051 [LIFECYCLE] [org.gradle.TaskExecutionLogger] :maven2Gradle FAILED
11:42:15.058 [ERROR] [org.gradle.BuildExceptionReporter]
11:42:15.059 [ERROR] [org.gradle.BuildExceptionReporter] FAILURE: Build failed with an exception.
11:42:15.060 [ERROR] [org.gradle.BuildExceptionReporter]
11:42:15.061 [ERROR] [org.gradle.BuildExceptionReporter] * What went wrong:
11:42:15.062 [ERROR] [org.gradle.BuildExceptionReporter] Execution failed for task ‘:maven2Gradle’.
11:42:15.062 [ERROR] [org.gradle.BuildExceptionReporter] > Unable to create MavenProject model.
11:42:15.065 [ERROR] [org.gradle.BuildExceptionReporter]
11:42:15.066 [ERROR] [org.gradle.BuildExceptionReporter] * Exception is:
11:42:15.067 [ERROR] [org.gradle.BuildExceptionReporter] org.gradle.api.tasks.TaskExecutionException: Execution failed for task ‘:maven2Gradle’.
11:42:15.067 [ERROR] [org.gradle.BuildExceptionReporter]
Can you provide the stack trace (please past it in https://gist.github.com)?
Using the latest nightly build:
The url does not work for me. Can you double check?
Same issue for me
Can you provide more details on what is causing this problem? E.g. is there anything specific in the poms? Is it still the case of problematic parent and packaging declarations as reported initially in this report?
I can confirm the issue also here on my side.
Using gradle 1.4, I just tried to convert my maven pom.xml to gradle, but it fails.
I followed the steps at http://www.gradle.org/docs/current/us…
Error log at: http://pastebin.com/FLKh6kQq