Hi Just add the dependency on MavenEmbedder in your pom, and then Maven will handle the rest for you through transitive dependencies.
Hermod -----Original Message----- From: Subhash Chandran [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 13, 2006 8:59 AM To: Maven Users List Subject: Re: Calling mvn commands from Java Check here for the API: http://maven.apache.org/guides/mini/guide-embedding-m2.html I got this from a search, I still don't know what all jars I need to have in the classpath to use this... - Subhash. On 9/13/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > 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. > > * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * > * > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
