Hi

Use the MavenEmbedder to this.

Hermod

-----Original Message-----
From: Matt Wheeler [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 12, 2006 5:00 PM
To: [email protected]
Subject: Calling mvn commands from Java


I was wondering if there is a Java API for Maven, from which to call mvn 
commands?  For instance, we would like to (OS agnostically - maybe the cd and 
rmdir cannot be OS agnostic) perform the following operations, checking for any 
errors that occur:

mvn archetype:create -DarchetypeArtifactId=stack-fuse 
-DarchetypeGroupId=abc.def.stack -DarchetypeVersion=2.0-SNAPSHOT 
-DartifactId=testproject -DgroupId=abc.def 
-DremoteRepositories=http://somelib:1234/maven2

cd testproject

mvn package site eclipse:eclipse -Dwtpversion=1.0

cd ..

rmdir testproject

Thanks,

Matt W.
------------------------------------------------------------------------------

 
NOTICE: This email message is for the sole use of the
 intended recipient(s) and may contain confidential and
 privileged information. Any unauthorized review, use,
 disclosure or distribution is prohibited. If you are not the
 intended recipient, please contact the sender by reply email
 and destroy all copies of the original message.

------------------------------------------------------------------------------


* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

This email with attachments is solely for the use of the individual or
entity to whom it is addressed. Please also be aware that the DnB NOR Group
cannot accept any payment orders or other legally binding correspondence with
customers as a part of an email. 

This email message has been virus checked by the anti virus programs used
in the DnB NOR Group.

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

Reply via email to