You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by "Rahamim, Zvi (Zvi)" <zr...@avaya.com> on 2006/11/15 10:16:58 UTC

ZQ: Changing the version when using the maven embedder

Hi,
I write a java program that gets a pom.xml file, read it, get from the
user the version to build and runs maven according to that.
What I need to do is to change the version of the built project
according to the user input.
Can you tell me how to do it?
Thanks!

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: ZQ: Changing the version when using the maven embedder

Posted by franz see <fr...@gmail.com>.
Good day to you, Rahamim

The maven-model under the components directory handles that. You will see
there the models and the Xpp3 Reader and Writer. You may want to use its
Xpp3 Reader to read the pom, then modify its version, the use the Xpp3
Writer to write the pom back.

But that should be done before maven-embedder should be executed. If so, you
can use your app as a utility that should be called before running your
maven ( meaning, before executing maven-embedder).

Cheers,
Franz


Rahamim, Zvi (Zvi) wrote:
> 
> Hi,
> I write a java program that gets a pom.xml file, read it, get from the
> user the version to build and runs maven according to that.
> What I need to do is to change the version of the built project
> according to the user input.
> Can you tell me how to do it?
> Thanks!
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/ZQ%3A-Changing-the-version-when-using-the-maven-embedder-tf2634869s177.html#a7393599
Sent from the Maven - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org