Nexus has that feature... staged deployment

You can emulate that feature yourself using a few plugins... e.g.
http://mojo.codehaus.org/wagon-maven-plugin/merge-maven-repos-mojo.html

I have not tried this myself, but the following "should" do what you want

mvn deploy -DaltDeploymentRepository=stage::default::file:///tmp/stage/repo
&& \
mvn org.codehaus.mojo:wagon-maven-plugin:1.0-beta-1:merge-maven-repos \
 -Dwagon.source=file:///tmp/stage/repo \
 -Dwagon.target=http://maven.mycompany.com/content/repositories/mycompany/ \
 -Djava.io.tmpdir=/tmp/stage/tmp

Though you'll probably have to tweak it somewhat

2009/10/15 Anders Hammar <[email protected]>

> What comes to my mind is a feature that is planned for Nexus to handle this
> kind of atomic deploy.
>
> Or, you could run your process in two steps. First run "mvn install" and
> then, if successful, run "mvn deploy". Not so clean, but it will do the
> job.
> This is kind of how the release plugin works.
>
> /Anders
>
> On Thu, Oct 15, 2009 at 01:01, Max Grigoriev <[email protected]
> >wrote:
>
> > Hi everybody,
> >
> >
> >
> > I have parent module(pom) and 2 children - jar + war. Is it possible to
> > make rule that in case of failure of war module, jar module isn't
> > installed to repository? Because now jar module is OK and it's installed
> > to rep, but then in war module there're errors in integration tests and
> > war isn't installed. So I have in reps just one good project -  it would
> > be great if I can configure maven to install to rep only in case of all
> > children modules pass test and integration-test
> >
> >
> >
> >
>

Reply via email to