How can I set a property in a mojo so that it is accessible in a pom?

For example I have a dependency...

 <dependency>
      <groupId>eclipse</groupId>
      <artifactId>org.eclipse.wst.server.core</artifactId>
      <version>${version}</version>
 </dependency>

I have a mojo that needs to dynamically set the versions of my dependencies so I tried adding...

/**
         * @parameter expression="${project}"
         * @required
         * @readonly
         */
        private MavenProject project;

and the setting the version property like so..

project.getProperties().put("version", "1.0.0");

But when the compile phase ran, the ${version} property did not resolve. Any ideas what I'm doing wrong?

Thanks.

- sachin




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to