On 12 May 2011 01:21, Barrie Treloar <[email protected]> wrote:

> On Thu, May 12, 2011 at 5:20 AM, EJ Ciramella <[email protected]>
> wrote:
> > Starting and stopping maven like that will be slower than just doing a
> "mvn clean install" to begin with.
>
> Yeah, but I've seen odd behaviour doing them in one step.
> I can't recall the details, it may be something to do with upgrading
> versions and the clean fails because the version needed for
> dependencies don't exist yet (which they wont until you run install).
>
>
your build should work on a clean system with no local repo cache and with
new version numbers if you do

mvn verify

if your build fails with the above then you are doing maven wrong. (which
could be ok for you, but in the truest sense you are doing it wrong)

You should not have to go as far as install.  Going as far as install is a
symptom of:

   - using dependency:copy when you should be using
   dependency:copy-dependencies; and/or
   - using dependency:unpack when you should be using
   dependency:unpack-dependencies; and/or
   - using plugins that do not know about resolving artifacts preferentially
   from the reactor; and/or
   - writing test cases that violate module encapsulation; and/or
   - using antrun to violate module encapsulation

If you have a build that does not require install to be invoked to run the
build (with new version numbers and a clean local repo) then the issues you
encountered will arise.

My recommendation is to fix your build so that you don't need to run
"install" to get your build to work. You can then _choose_ to run install so
that you can work on one specific module and not have to rebuild everything.

-Stephen

It may be I've stuffed something else up in the past and I'm being
> overly cautious.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>

Reply via email to