0
votes

Can I use only fixed versions (eg: 1.1.2.4) instead of the SNAPSHOT (eg: 1.1.2.3-SNAPSHOT) versions in my project's poms ? That way a daily build can be used as it is for the release. After the daily build is complete I can run the maven release:update-versions plugin to increment the pom versions.

If we use fixed versions only then the daily build will deploy directly to the releases repository.

The advantages in maven release plugin is:
1. updates to fixed versions & creates a Tag in SCM
2. Increments versions to the snapshot version
3. Deploys built code to release repository

But the release prepare and release perform means building 2 times which is a bottleneck for early releases and takes too long.

Does any one have these issues and what solution did you opt for ?

Thanks in advance

1

1 Answers

0
votes

You are free to set what version you want in your POMs. To my knowledge, only the release plugin and some aspects of deploy (visavi release/snapshot repositories) care about "SNAPSHOT" in your version string.

You do not have to build the full project on "release:prepare". If you are confident that the project is in sane state and all tests are passing, you can set your prepare goal to "clean", which typically does not take that long.

As an aside, we have found that using SSDs for Maven builds and integration tests can cut build time by as much as 80%. Also, on multicore boxen with maven3, you can get performance gains in multimodule projects if they are functionally modularized (rather than structurally modularized).