release:prepare, release:perform fails due to grails:validate #10

Closed
iamkristian opened this Issue Mar 5, 2012 · 3 comments

Comments

Projects
None yet
2 participants
Contributor

iamkristian commented Mar 5, 2012

When running the ordinary mvn clean install etc - everything checks out. But when starting the release cycle with release:prepare - Things start to break:

[INFO] [ERROR] BUILD FAILURE
[INFO] [INFO] ------------------------------------------------------------------------
[INFO] [INFO] app.version [2.0.1-SNAPSHOT] in application.properties is different of the version [2.0.1] in the pom.xml
[INFO] [INFO] ------------------------------------------------------------------------

release:prepare updates the pom version and calls mvn clean - which again calls grails:validate which fails with

app.version [2.0.1-SNAPSHOT] in application.properties is different of the version [2.0.1] in the pom.xml

Here 2.0.1-SNAPSHOT is the version my project is at - the reason is that the pom version isn't synced to application.properties app.version. From what it looks like, you do this with app.grails.version?

Thanks for a great framework :-)

@ghost

ghost commented Mar 7, 2012

Try using set-version mojo in release cycle or adding it to default execution before validate goal. This one sets application.properties version to one that is used in pom. Unfortunately won't work for multi-module projects due to http://jira.grails.org/browse/MAVEN-157 which make it a show stopper for me.

Contributor

iamkristian commented Mar 9, 2012

Thanks for the hint - unfortunately my project is a multimodule project as well :-(

I'm trying to make a patch, which I'm currently testing. Hopefully I can make a pull request soon :-D

graemerocher added a commit that referenced this issue Mar 12, 2012

Merge pull request #11 from iamkristian/master
Fixes issue #10 - release:prepare, release:perform fails due to grails:validate
@ghost

ghost commented Mar 12, 2012

I'm affraid this won't work with plugin projects, since version in *Plugin.groovy file is not updated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment