You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by William Ferguson <Wi...@yarris.com> on 2007/05/16 08:54:32 UTC
Determining project.version from maven-release-plugin
I have a plugin that needs to run either during after the
maven-release-plugin has doen a prepare.
I suspect after will be easier to manage.
My plugin needs as a minimum the ${project.version} at which the project
was released. Ie not the SNAPSHOT version either before or after.
How do I get that intermediate ${project.version}?
William
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Determining project.version from maven-release-plugin
Posted by Steven Rowe <sa...@syr.edu>.
Hi William,
The way I do this is by reading in the release.properties file that
release:prepare generates, something like:
import java.util.Properties;
...
Properties releaseProps = new Properties();
releaseProps.load(new FileInputStream("release.properties"));
String releaseVersion = releaseProps.get
("project.rel." + groupId + ":" + artifactId);
Steve
William Ferguson wrote:
> I have a plugin that needs to run either during after the
> maven-release-plugin has doen a prepare.
> I suspect after will be easier to manage.
>
> My plugin needs as a minimum the ${project.version} at which the project
> was released. Ie not the SNAPSHOT version either before or after.
>
> How do I get that intermediate ${project.version}?
>
> William
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org