I'd like to write a plugin that allows me to change the version of the
current project during the build.  Is this considered bad form?  Is it
even possible?

My use case is that I'd like to replicate what release:prepare is
doing but w/o tagging and w/o checking out new source and running the
build on that source.  I'd like to run mvn deploy -P release and in
doing so have my -SNAPSHOT version replaced with the release version
and then have my build progress as normal.

I've tried using MavenProject.setVersion() but that seemed to have no
effect.  I next tried MavenProject.getArtifact().setVersion().  This
seemed to work better however the assembly plugin used later in my
build started to fail with a NPE.  Haven't tracked down exactly what
the connection is yet but thought I'd send an email out to see if
anyone else has done this and/or if this is a bad idea.

Thanks,
Mike

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to