daydreamer
daydreamer

Reputation: 91969

Maven: must be a valid version but is 'RELEASE'

I am very new to Maven and trying to use the CarbonFive DB Migration from Maven.

Following their documentation, I added the following in my pom.xml

<pluginRepositories>
    <pluginRepository>
        <id>c5-public-repository</id>
        <url>http://mvn.carbonfive.com/public</url>
    </pluginRepository>
</pluginRepositories>

and

     <plugins>
       <plugin>
            <groupId>com.carbonfive.db-support</groupId>
            <artifactId>db-migration-maven-plugin</artifactId>
            <version>RELEASE</version>
            <configuration>
                <url>jdbc:mysql://localhost:3306/bb</url>
                <username>bb</username>
                <password>bb</password>
            </configuration>
            <dependencies>
                <dependency>
                    <groupId>mysql</groupId>
                    <artifactId>mysql-connector-java</artifactId>
                    <version>5.1.6</version>
                </dependency>
            </dependencies>
        </plugin>
      </plugins>

Now when I try to run migration

$ mvn db-migration:migrate

I see error saying

[ERROR]     'build.plugins.plugin.version' for com.carbonfive.db-support:db-migration-maven-plugin must be a valid version but is 'RELEASE'. @ line 165, column 26

and line 165 is

<version>RELEASE</version>

which is as per their documentation.

How do I resolve this issue?

Upvotes: 2

Views: 3782

Answers (2)

asgoth
asgoth

Reputation: 35829

Maven has version rules. It is possible to change them, but normally there is no need.

If you look at their Nexus, you'll see that the latest stable version of db-migration-maven-plugin is 0.9.8.

Upvotes: 1

djechlin
djechlin

Reputation: 60778

Well, you need to fill in the release you want. Looks like, from http://code.google.com/p/c5-db-migration/:

Latest Version: 0.9.9-m5 (check out the new check goal!)

So try 0.9.9-m5 in place of RELEASE.

Maven versions are always in the format x.y.z-DESCRIPTOR with y, z and DESCRIPTOR optional.

Upvotes: 2

Related Questions