Guilherme Gotardo
Guilherme Gotardo

Reputation: 69

Maven development time and release time

I'm starting working with Eclipse + Maven (2.2.1) and I have some question about it:

1- I have an internal framework MyFramework that is dependency in another project, something like that:

<dependency>
    <groupId>com.mycompany</groupId>
    <artifactId>MyFramework</artifactId>
    <version>[7.0.0,),[LATEST]</version>
</dependency>

The version is a range because I want to work with my workspace framework version, or with the latest (in case I don't have the project in workspace). My project is building fine, but when I try to make a relase (maven-release-plugin 2.3.2) I got:

NullPointerException: version of MyFramework is null

Is that a bug or am I doing something wrong?


2- Suppose that I have a version 7.0.4-SNAPSHOT and I want to roll the second version number instead of third like that:

7.0.4-SNAPSHOT -> 7.1.0-SNAPSHOT or 7.1.4-SNAPSHOT (whatever)

Can I do it with maven-release-plugin?


3- I'm starting with Maven, so I don't need to care about migrations, should I start with Maven 3 instead of Maven 2?


Please, I need help with it. Thanks in advanced.

Upvotes: 0

Views: 61

Answers (1)

Duncan Jones
Duncan Jones

Reputation: 69369

Answers:

  1. This appears to be a known issue: http://jira.codehaus.org/browse/MRELEASE-318

  2. Yes, every time you perform a release you can override the default version number. If you release using the command line, you will be prompted to select the next version number (with a sensible default displayed).

  3. Use Maven 3. Read this blog post for a list of reasons why it is superior.

Upvotes: 1

Related Questions