You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Matt Wheeler <Wh...@ldschurch.org> on 2006/09/12 16:59:44 UTC
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.
------------------------------------------------------------------------------
Re: Calling mvn commands from Java
Posted by Arnaud Bailly <ab...@oqube.com>.
"Matt Wheeler" <Wh...@ldschurch.org> writes:
> 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
Did you try maven-embedder ?
http://maven.apache.org/guides/mini/guide-embedding-m2.html
regards
--
OQube < software engineering \ génie logiciel >
Arnaud Bailly, Dr.
\web> http://www.oqube.com
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Calling mvn commands from Java
Posted by Geoffrey De Smet <ge...@gmail.com>.
See guides about embedding maven.
Matt Wheeler wrote, On 2006-09-12 4:59 PM:
> 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.
>
>
--
With kind regards,
Geoffrey De Smet
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org