You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Christian Clauss <Ch...@ptv.de> on 2007/07/02 10:42:41 UTC
Change project version
Hello everybody,
I would like to change the version in the pom.xml using a self-developed
plug-in. I tried to get access via
/**
* Project instance
* @parameter default-value="${project}"
*
*/
private MavenProject project;
and then
project.setVersion("222");
but it doesn't work. The compiler tells me that MavenProject is an
unknown type: can't find the symbol: class MavenProject
Does anyone have a clue what to do?
Thanks a lot.
Christian
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Change project version
Posted by Tim Kettler <ti...@udo.edu>.
Hi,
well, most probably the class just isn't in your classpath.
Have you declared a dependency to:
<groupId>org.apache.maven</groupId>
<artifactId>maven-project</artifactId>
<version>2.0.7</version>
in your pom?
And if you don't mind: May I ask what your usecase is that forces you to
alter the project version?
-Tim
Christian Clauss schrieb:
> Hello everybody,
>
> I would like to change the version in the pom.xml using a self-developed
> plug-in. I tried to get access via
>
> /**
> * Project instance
> * @parameter default-value="${project}"
> *
> */
> private MavenProject project;
>
> and then
>
> project.setVersion("222");
>
> but it doesn't work. The compiler tells me that MavenProject is an
> unknown type: can't find the symbol: class MavenProject
>
> Does anyone have a clue what to do?
>
> Thanks a lot.
>
> Christian
>
>
>
> ---------------------------------------------------------------------
> 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