On Sun, 2003-10-05 at 21:22, Jean-Noel Filippi wrote:
> Hi there,
> 
> After instanciating a maven Project object, how can I attain a goal (like
> java:compile)?
> 
> I tried to add a goal with a MavenSession object and run 'attaingoal'
> but it does not work. Here is my code:
> Project p = MavenUtils.getProject("project.xml");
> p.initialize();
> MavenSession mavenSession = new MavenSession();
> mavenSession.setRootProject(p);
> mavenSession.addGoalName("java:compile");
> mavenSession.attainGoals();
> 
> Thank you for your help !

The current incarnation of Maven is not very bean-like. Brett has been
working on merging some changes that I made to enable Maven to work in a
more bean like way but what is present now does not make embedding easy.

I assume you are trying to embed Maven?

> Jn
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
-- 
jvz.

Jason van Zyl
[EMAIL PROTECTED]
http://tambora.zenplex.org

In short, man creates for himself a new religion of a rational
and technical order to justify his work and to be justified in it.
  
  -- Jacques Ellul, The Technological Society


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

Reply via email to