You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by ca...@accenture.com on 2012/11/02 17:05:30 UTC

How to configure a profile to NOT upload build aritfact to a repository?

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

________________________________

This message is for the designated recipient only and may contain privileged, proprietary, or otherwise private information. If you have received it in error, please notify the sender immediately and delete the original. Any other use of the e-mail by you is prohibited. Where allowed by local law, electronic communications with Accenture and its affiliates, including e-mail and instant messaging (including content), may be scanned by our systems for the purposes of information security and assessment of internal compliance with Accenture policy. .
______________________________________________________________________________________

www.accenture.com

Re: How to configure a profile to NOT upload build aritfact to a repository?

Posted by Anders Hammar <an...@hammar.net>.
> 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 <an...@hammar.net>:
> > 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 <ba...@gmail.com>
> wrote:
> >
> >> On Sat, Nov 3, 2012 at 2:35 AM, <ca...@accenture.com>
> 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: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

Re: How to configure a profile to NOT upload build aritfact to a repository?

Posted by Olivier Lamy <ol...@apache.org>.
deploy plugin has a skip option [1]
So add this option in a profile ?

HTH,
--
Olivier
[1] http://maven.apache.org/plugins/maven-deploy-plugin/faq.html#skip

2012/11/3 Anders Hammar <an...@hammar.net>:
> 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 <ba...@gmail.com> wrote:
>
>> On Sat, Nov 3, 2012 at 2:35 AM, <ca...@accenture.com> 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: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: How to configure a profile to NOT upload build aritfact to a repository?

Posted by Anders Hammar <an...@hammar.net>.
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 <ba...@gmail.com> wrote:

> On Sat, Nov 3, 2012 at 2:35 AM, <ca...@accenture.com> 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".
>

Re: How to configure a profile to NOT upload build aritfact to a repository?

Posted by Barrie Treloar <ba...@gmail.com>.
On Sat, Nov 3, 2012 at 2:35 AM, <ca...@accenture.com> 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".