I think you haven't fully understood how Maven works, or how Maven should be used. The basic rule with Maven is that you cannot skip phases. When you execute a build by specifying a phase, all phases up to and including that phase is run. The plugins bound to these phases are then executed. So, if you want to deploy to your repo, you type: mvn deploy
What's the need of doing the steps separately? IMHO, the beauty of Maven is that everything is tied together. I.e., it isn't possible to deploy something that hasn't tested. (yes, it somewhat depends on how your Maven projects are structred, but you get the basic idea). When it comes to snapshots it's different story. You cannot rely on snapshots. Period. You need releases for that. /Anders On Fri, Feb 4, 2011 at 15:51, Brett Cave <[email protected]> wrote: > Hi, > > I have a project that I would like to customize the way the maven lifecycle > is processed. Instead of restarting the lifecycle, is there a way to get > maven to continue its lifecycle from a specific phase? > > I would like to break up the lifecycle into different stages in our CI > system, while using the same binaries through the different phases (i.e. > code is never recompiled or war's are never repackaged between testing, > packaging, verification and deployment to our internal maven repository.) > > e.g. > # compile source code once > mvn compile > > # run tests against compiled source code without re-compiling (starting > from > process-classes) > mvn test -Dtest=SomeTestSuite > > # run a different test suite against the same compiled binaries > mvn test -Dtest=AnotherTestSuite > > mvn verify > mvn deploy > > > In this example, if my project is a war project with some compiled classes, > I want to ensure that the exact binaries that are used in the tests are the > ones that are deployed to my repository, instead of being recompiled (and > potentially newer snapshot versions of dependencies being pulled into war > between packaging and deploy phases). >
