> deploy plugin has a skip option [1]
> So add this option in a profile ?
>

I'd say the only use case for the skip param would be if you have some
Maven project the should NEVER upload it's artifact. Then you could
configure this so that it will not be uploaded even if "mvn deploy"
 is executed. But it should then not be in a profile.

But if you have a project that normally should upload it's artifact and you
have some scenario where it shouldn't (like one of your CI build jobs),
then you should just do "mvn install" in that case. A profile using skip
brings no advantage but is just a step away from Maven conventions IMO.

/Anders


>
> HTH,
> --
> Olivier
> [1] http://maven.apache.org/plugins/maven-deploy-plugin/faq.html#skip
>
> 2012/11/3 Anders Hammar <[email protected]>:
> > As Berrie explained, the correct solution here is to just do a "mvn
> > install" build in this case. Starting to use profiles is not the
> solution.
> > It (almost) never is.
> >
> > /Anders
> >
> > On Sat, Nov 3, 2012 at 10:22 AM, Barrie Treloar <[email protected]>
> wrote:
> >
> >> On Sat, Nov 3, 2012 at 2:35 AM, <[email protected]>
> wrote:
> >>
> >> > Greetings,
> >> >
> >> > I have a project that builds and then artifacts are automatically
> >> uploaded
> >> > to our Nexus repository.  I have a special case where I need the code
> to
> >> > build but I don't want the artifacts to be uploaded.
> >> >
> >> > I set up a profile for the special case.  However it is still trying
> to
> >> > upload because it is inheriting the <distributionManagement>
> attributes
> >> > from the parent.
> >> >
> >> > How can I tell this profile to NOT upload to the Nexus repo?  I tried
> >> > putting dummy data under a <distributionManagement> tag inside the
> >> profile
> >> > but that is causing the builds to fail.
> >> >
> >> > Thanks,
> >> >
> >> > Carlos
> >> >
> >>
> >> What command are you using?
> >>
> >> mvn install
> >> does everything locally, does not upload anything.
> >>
> >> mvn deploy
> >> does everything that "mvn install" does, plus uploads to
> >> distributionManagement.
> >>
> >> mvn release:perform
> >> Automated some of the steps that you should be doing if you were to
> >> manually run "mvn deploy".
> >>
>
>
>
> --
> Olivier Lamy
> Talend: http://coders.talend.com
> http://twitter.com/olamy | http://linkedin.com/in/olamy
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>

Reply via email to