maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From motes motes <>
Subject Calling versions plugin from code?
Date Wed, 27 Mar 2013 12:24:16 GMT
I am writing a java class where I need to use the
versions-maven-plugin to basically do what I normally do from command

mvn versions:set -DnewVersion=1.0.1-SNAPSHOT

Having maven installed locally (and on the path) is not an option. In
a project I have added:


an started work on at test:

    SetMojo ss = new SetMojo();
    Model model = new Model();
    MavenProject project = new MavenProject(model);
    project.setFile(new File("test/pom.xml"));
    try {
    } catch (MojoExecutionException e) {
    } catch (MojoFailureException e) {

But it could be nice with some examples/unit tests that shows how to
do this the right way. Any recommendations for this?

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message