Hi Tim,

There are already two solutions like that you describe.  The first is the
Maven 'Console' plugin.  Take a look here:


http://jakarta.apache.org/turbine/maven/reference/plugins/console/index.html

I've not had a go with that yet.  The other solution is to add the
following goal to your maven.xml file:

     <goal name="interactive">

      <interaction:ask question="Which goal do you want to complete ?"
                    answer="maven.ask.goal.name"
                    default="${maven.ask.goal.name}"/>

      <echo>Trying to attain goal "${maven.ask.goal.name}" !</echo>

      <!-- Here we need to catch exceptions so that if it fails, we can
            still use it -->

      <attainGoal name="${maven.ask.goal.name}"/>

      <attainGoal name="interactive"/>

     </goal>

This has the disadvantage that if the build fails for any reason it drops
out (as per the comment) and you have to restart it.  I can't remember
where I got this from - someone else on the list may have a better version
by now...

Good luck!

     Mike






Tim Stephenson <[EMAIL PROTECTED]> on 03/01/2003
08:40:55

Please respond to "Turbine Maven Users List"
      <[EMAIL PROTECTED]>



To:   "'Turbine Maven Users List'" <[EMAIL PROTECTED]>
cc:
Subject:  RE: Reducing Maven build times

A slightly different subject but also with the goal of speeding up the use
of maven: Has anyone thought about making an interactive mode?

Basically I was thinking of investigating using the commons cli project to
allow all the pom, plugins and repository stuff to be loaded up once and
then for the user to run (the same or different) goals repeatedly as an
interactive session.

Does this sound like a viable suggestion? Is anyone interested in it?


Tim
-----Original Message-----
From: Jason van Zyl [mailto:[EMAIL PROTECTED]]
Sent: Friday, 3 January 2003 2:06 PM
To: Turbine Maven Users List
Subject: Re: Reducing Maven build times


On Thu, 2003-01-02 at 22:06, Nick Minutello wrote:
> Is there any way to get Maven to avoid building a project once it has
> already been built and none of the source/dependancies changed?

More than likely, it's just the way the jelly is structured at the moment
and I need to do some work with werkz. Werkz knows if a goal has been
attained for a session so I'll play with this and get that fixed up. With
the recent refactoring it should be easier. But yes, once a goal is
attained
during a session it should not be attained again.

> Currently, if you run "dist:deploy site:deploy jar:install" it will
> compile/javadoc/etc etc multiple times and it takes ages.
> Consequently, our automated project build (made up of two maven
> projects), using reactor, takes 13+ minutes...

Yup, we'll get that sorted out.

> It would be nice if there was some equivilent of Ant's <uptodate> task
> and "unless" features....
>
> Regards,
> Nick
--
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:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>



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







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

Reply via email to