You are viewing a plain text version of this content. The canonical link for it is here.
Posted to builds@apache.org by sebb <se...@gmail.com> on 2012/02/24 02:51:08 UTC

Deploy snapshots to Maven repo?

Do any of the build systems support deployment of Maven snapshots?

If so, how can this be added to a build?

Re: Deploy snapshots to Maven repo?

Posted by Sandro Martini <sa...@gmail.com>.
Hi,

> I've had a look at the Pivot build - as far as I can tell the deploy target merely installs the output locally; it does not deploy to the snapshot staging repo.
Yes, because we already had the maven target to deploy in a local
maven repository, so I simply put even it in Jenkins builds ...

> In fact I cannot find any pivot jars or even the top-level folder in the snapshot repos.
Yes, it's one of the many things I have to finish ...

So if/when someone of us has some news on this, let's update :-) .

Bye,
Sandro

Re: Deploy snapshots to Maven repo?

Posted by sebb <se...@gmail.com>.
On 24 February 2012 15:46, Sandro Martini <sa...@gmail.com> wrote:
> Hi all,
> in Pivot we have a similar setup (even in Jenkins): build made with
> ant, and use ant maven tasks for some things, if you want, take a look
> at it ... or ask to me if you need some info (I assume that our setup
> in Jenkins is right :-) ).

Thanks.

I've had a look at the Pivot build - as far as I can tell the deploy
target merely installs the output locally; it does not deploy to the
snapshot staging repo.

In fact I cannot find any pivot jars or even the top-level folder in
the snapshot repos.

> Note that I tried to enable the "Publish artifacts to SCP Repository",
> but then the listbox where to chose the snapshot repository is empty
> ... someone knows how to do to set there the right value ?
>
> Bye,
> Sandro
>
>
> 2012/2/24 sebb <se...@gmail.com>:
>> On 24 February 2012 09:19, Olivier Lamy <ol...@apache.org> wrote:
>>> 2012/2/24 sebb <se...@gmail.com>:
>>>> On 24 February 2012 03:08, Benson Margulies <bi...@gmail.com> wrote:
>>>>> On Thu, Feb 23, 2012 at 8:51 PM, sebb <se...@gmail.com> wrote:
>>>>>> Do any of the build systems support deployment of Maven snapshots?
>>>>>>
>>>>>
>>>>> yes.
>>>>>
>>>>>> If so, how can this be added to a build?
>>>>>
>>>>> In Jenkins by ticking the box in the job config or adding 'deploy' to
>>>>> the list of maven goals.
>>>>
>>>> Which box is that?
>>>> If it is "Publish artifacts to SCP Repository" then there does not
>>>> seem to be an SCP site; also it's not clear what the target path
>>>> should be.
>>>>
>>>> [The build does not use Maven]
>>>
>>> In such case, you must use ant (if your build is ant based) maven
>>> tasks to deploy snapshots to
>>> https://repository.apache.org/content/repositories/snapshots (server
>>> id to use: apache.snapshots.https ).
>>> Jenkins nodes have the necessary ~/.m2/settings.xml (normally :-) ).
>>
>> The build uses Ant, but does not use the ant maven tasks - are those
>> installed on Jenkins nodes?
>>
>> Alternatively, is there a standard location or env variable that
>> points to the Maven installation on Jenkins nodes?
>>
>> The script currently uses Java to run Maven as per [1]
>> This relies on finding the maven home directory via the M2_HOME
>> variable, which does not seem to be set on Jenkins.
>>
>> [1] http://maven.apache.org/ant-tasks/examples/mvn.html#Using_the_Java_Task
>>
>>> --
>>> Olivier Lamy
>>> Talend: http://coders.talend.com
>>> http://twitter.com/olamy | http://linkedin.com/in/olamy

Re: Deploy snapshots to Maven repo?

Posted by Sandro Martini <sa...@gmail.com>.
Hi all,
in Pivot we have a similar setup (even in Jenkins): build made with
ant, and use ant maven tasks for some things, if you want, take a look
at it ... or ask to me if you need some info (I assume that our setup
in Jenkins is right :-) ).

Note that I tried to enable the "Publish artifacts to SCP Repository",
but then the listbox where to chose the snapshot repository is empty
... someone knows how to do to set there the right value ?

Bye,
Sandro


2012/2/24 sebb <se...@gmail.com>:
> On 24 February 2012 09:19, Olivier Lamy <ol...@apache.org> wrote:
>> 2012/2/24 sebb <se...@gmail.com>:
>>> On 24 February 2012 03:08, Benson Margulies <bi...@gmail.com> wrote:
>>>> On Thu, Feb 23, 2012 at 8:51 PM, sebb <se...@gmail.com> wrote:
>>>>> Do any of the build systems support deployment of Maven snapshots?
>>>>>
>>>>
>>>> yes.
>>>>
>>>>> If so, how can this be added to a build?
>>>>
>>>> In Jenkins by ticking the box in the job config or adding 'deploy' to
>>>> the list of maven goals.
>>>
>>> Which box is that?
>>> If it is "Publish artifacts to SCP Repository" then there does not
>>> seem to be an SCP site; also it's not clear what the target path
>>> should be.
>>>
>>> [The build does not use Maven]
>>
>> In such case, you must use ant (if your build is ant based) maven
>> tasks to deploy snapshots to
>> https://repository.apache.org/content/repositories/snapshots (server
>> id to use: apache.snapshots.https ).
>> Jenkins nodes have the necessary ~/.m2/settings.xml (normally :-) ).
>
> The build uses Ant, but does not use the ant maven tasks - are those
> installed on Jenkins nodes?
>
> Alternatively, is there a standard location or env variable that
> points to the Maven installation on Jenkins nodes?
>
> The script currently uses Java to run Maven as per [1]
> This relies on finding the maven home directory via the M2_HOME
> variable, which does not seem to be set on Jenkins.
>
> [1] http://maven.apache.org/ant-tasks/examples/mvn.html#Using_the_Java_Task
>
>> --
>> Olivier Lamy
>> Talend: http://coders.talend.com
>> http://twitter.com/olamy | http://linkedin.com/in/olamy

Re: Deploy snapshots to Maven repo?

Posted by sebb <se...@gmail.com>.
On 24 February 2012 15:09, sebb <se...@gmail.com> wrote:
> On 24 February 2012 14:37, Olivier Lamy <ol...@apache.org> wrote:
>> 2012/2/24 sebb <se...@gmail.com>:
>>> On 24 February 2012 09:19, Olivier Lamy <ol...@apache.org> wrote:
>>>> 2012/2/24 sebb <se...@gmail.com>:
>>>>> On 24 February 2012 03:08, Benson Margulies <bi...@gmail.com> wrote:
>>>>>> On Thu, Feb 23, 2012 at 8:51 PM, sebb <se...@gmail.com> wrote:
>>>>>>> Do any of the build systems support deployment of Maven snapshots?
>>>>>>>
>>>>>>
>>>>>> yes.
>>>>>>
>>>>>>> If so, how can this be added to a build?
>>>>>>
>>>>>> In Jenkins by ticking the box in the job config or adding 'deploy' to
>>>>>> the list of maven goals.
>>>>>
>>>>> Which box is that?
>>>>> If it is "Publish artifacts to SCP Repository" then there does not
>>>>> seem to be an SCP site; also it's not clear what the target path
>>>>> should be.
>>>>>
>>>>> [The build does not use Maven]
>>>>
>>>> In such case, you must use ant (if your build is ant based) maven
>>>> tasks to deploy snapshots to
>>>> https://repository.apache.org/content/repositories/snapshots (server
>>>> id to use: apache.snapshots.https ).
>>>> Jenkins nodes have the necessary ~/.m2/settings.xml (normally :-) ).
>>>
>>> The build uses Ant, but does not use the ant maven tasks - are those
>>> installed on Jenkins nodes?
>> AFAIK nope. (as you use ant what about storing the jar in your project ? )
>
> Could do, but was hoping to avoid that, as it's yet another dependenccy.
> Also will need to change the build file to use it instead of java.
>
> However, it might be better in the long run.

If only ...

I've been trying to use it to deploy from my PC to the Nexus snapshot repo.

However, the first problem is that the plugin seems to treat encrypted
passwords as if they were normal passwords.
[Looks like http://jira.codehaus.org/browse/MANTTASKS-177 which has
yet to be addressed after 2 years]

That's a blocker as far as I'm concerned.

I did try using plain text password, but that failed with error code
400 - not sure what is going on there.
[Bad password gives 401, so I know it is not that]

So basically no go unless I can find a way to determine the location
of maven home so I can use the real maven.

>>>
>>> Alternatively, is there a standard location or env variable that
>>> points to the Maven installation on Jenkins nodes?
>>>
>>> The script currently uses Java to run Maven as per [1]
>>> This relies on finding the maven home directory via the M2_HOME
>>> variable, which does not seem to be set on Jenkins.
>> Jenkins doesn't set this env var. As users are free to use different
>> maven versions.
>> So it's define when you choose a maven version for your build.
>
> Which of course is not done for Maven builds.
>
>>>
>>> [1] http://maven.apache.org/ant-tasks/examples/mvn.html#Using_the_Java_Task
>>>
>>>> --
>>>> Olivier Lamy
>>>> Talend: http://coders.talend.com
>>>> http://twitter.com/olamy | http://linkedin.com/in/olamy

Re: Deploy snapshots to Maven repo?

Posted by sebb <se...@gmail.com>.
On 24 February 2012 14:37, Olivier Lamy <ol...@apache.org> wrote:
> 2012/2/24 sebb <se...@gmail.com>:
>> On 24 February 2012 09:19, Olivier Lamy <ol...@apache.org> wrote:
>>> 2012/2/24 sebb <se...@gmail.com>:
>>>> On 24 February 2012 03:08, Benson Margulies <bi...@gmail.com> wrote:
>>>>> On Thu, Feb 23, 2012 at 8:51 PM, sebb <se...@gmail.com> wrote:
>>>>>> Do any of the build systems support deployment of Maven snapshots?
>>>>>>
>>>>>
>>>>> yes.
>>>>>
>>>>>> If so, how can this be added to a build?
>>>>>
>>>>> In Jenkins by ticking the box in the job config or adding 'deploy' to
>>>>> the list of maven goals.
>>>>
>>>> Which box is that?
>>>> If it is "Publish artifacts to SCP Repository" then there does not
>>>> seem to be an SCP site; also it's not clear what the target path
>>>> should be.
>>>>
>>>> [The build does not use Maven]
>>>
>>> In such case, you must use ant (if your build is ant based) maven
>>> tasks to deploy snapshots to
>>> https://repository.apache.org/content/repositories/snapshots (server
>>> id to use: apache.snapshots.https ).
>>> Jenkins nodes have the necessary ~/.m2/settings.xml (normally :-) ).
>>
>> The build uses Ant, but does not use the ant maven tasks - are those
>> installed on Jenkins nodes?
> AFAIK nope. (as you use ant what about storing the jar in your project ? )

Could do, but was hoping to avoid that, as it's yet another dependenccy.
Also will need to change the build file to use it instead of java.

However, it might be better in the long run.

>>
>> Alternatively, is there a standard location or env variable that
>> points to the Maven installation on Jenkins nodes?
>>
>> The script currently uses Java to run Maven as per [1]
>> This relies on finding the maven home directory via the M2_HOME
>> variable, which does not seem to be set on Jenkins.
> Jenkins doesn't set this env var. As users are free to use different
> maven versions.
> So it's define when you choose a maven version for your build.

Which of course is not done for Maven builds.

>>
>> [1] http://maven.apache.org/ant-tasks/examples/mvn.html#Using_the_Java_Task
>>
>>> --
>>> Olivier Lamy
>>> Talend: http://coders.talend.com
>>> http://twitter.com/olamy | http://linkedin.com/in/olamy

Re: Deploy snapshots to Maven repo?

Posted by Olivier Lamy <ol...@apache.org>.
2012/2/24 sebb <se...@gmail.com>:
> On 24 February 2012 09:19, Olivier Lamy <ol...@apache.org> wrote:
>> 2012/2/24 sebb <se...@gmail.com>:
>>> On 24 February 2012 03:08, Benson Margulies <bi...@gmail.com> wrote:
>>>> On Thu, Feb 23, 2012 at 8:51 PM, sebb <se...@gmail.com> wrote:
>>>>> Do any of the build systems support deployment of Maven snapshots?
>>>>>
>>>>
>>>> yes.
>>>>
>>>>> If so, how can this be added to a build?
>>>>
>>>> In Jenkins by ticking the box in the job config or adding 'deploy' to
>>>> the list of maven goals.
>>>
>>> Which box is that?
>>> If it is "Publish artifacts to SCP Repository" then there does not
>>> seem to be an SCP site; also it's not clear what the target path
>>> should be.
>>>
>>> [The build does not use Maven]
>>
>> In such case, you must use ant (if your build is ant based) maven
>> tasks to deploy snapshots to
>> https://repository.apache.org/content/repositories/snapshots (server
>> id to use: apache.snapshots.https ).
>> Jenkins nodes have the necessary ~/.m2/settings.xml (normally :-) ).
>
> The build uses Ant, but does not use the ant maven tasks - are those
> installed on Jenkins nodes?
AFAIK nope. (as you use ant what about storing the jar in your project ? )
>
> Alternatively, is there a standard location or env variable that
> points to the Maven installation on Jenkins nodes?
>
> The script currently uses Java to run Maven as per [1]
> This relies on finding the maven home directory via the M2_HOME
> variable, which does not seem to be set on Jenkins.
Jenkins doesn't set this env var. As users are free to use different
maven versions.
So it's define when you choose a maven version for your build.
>
> [1] http://maven.apache.org/ant-tasks/examples/mvn.html#Using_the_Java_Task
>
>> --
>> Olivier Lamy
>> Talend: http://coders.talend.com
>> http://twitter.com/olamy | http://linkedin.com/in/olamy

Re: Deploy snapshots to Maven repo?

Posted by sebb <se...@gmail.com>.
On 24 February 2012 09:19, Olivier Lamy <ol...@apache.org> wrote:
> 2012/2/24 sebb <se...@gmail.com>:
>> On 24 February 2012 03:08, Benson Margulies <bi...@gmail.com> wrote:
>>> On Thu, Feb 23, 2012 at 8:51 PM, sebb <se...@gmail.com> wrote:
>>>> Do any of the build systems support deployment of Maven snapshots?
>>>>
>>>
>>> yes.
>>>
>>>> If so, how can this be added to a build?
>>>
>>> In Jenkins by ticking the box in the job config or adding 'deploy' to
>>> the list of maven goals.
>>
>> Which box is that?
>> If it is "Publish artifacts to SCP Repository" then there does not
>> seem to be an SCP site; also it's not clear what the target path
>> should be.
>>
>> [The build does not use Maven]
>
> In such case, you must use ant (if your build is ant based) maven
> tasks to deploy snapshots to
> https://repository.apache.org/content/repositories/snapshots (server
> id to use: apache.snapshots.https ).
> Jenkins nodes have the necessary ~/.m2/settings.xml (normally :-) ).

The build uses Ant, but does not use the ant maven tasks - are those
installed on Jenkins nodes?

Alternatively, is there a standard location or env variable that
points to the Maven installation on Jenkins nodes?

The script currently uses Java to run Maven as per [1]
This relies on finding the maven home directory via the M2_HOME
variable, which does not seem to be set on Jenkins.

[1] http://maven.apache.org/ant-tasks/examples/mvn.html#Using_the_Java_Task

> --
> Olivier Lamy
> Talend: http://coders.talend.com
> http://twitter.com/olamy | http://linkedin.com/in/olamy

Re: Deploy snapshots to Maven repo?

Posted by Olivier Lamy <ol...@apache.org>.
2012/2/24 sebb <se...@gmail.com>:
> On 24 February 2012 03:08, Benson Margulies <bi...@gmail.com> wrote:
>> On Thu, Feb 23, 2012 at 8:51 PM, sebb <se...@gmail.com> wrote:
>>> Do any of the build systems support deployment of Maven snapshots?
>>>
>>
>> yes.
>>
>>> If so, how can this be added to a build?
>>
>> In Jenkins by ticking the box in the job config or adding 'deploy' to
>> the list of maven goals.
>
> Which box is that?
> If it is "Publish artifacts to SCP Repository" then there does not
> seem to be an SCP site; also it's not clear what the target path
> should be.
>
> [The build does not use Maven]

In such case, you must use ant (if your build is ant based) maven
tasks to deploy snapshots to
https://repository.apache.org/content/repositories/snapshots (server
id to use: apache.snapshots.https ).
Jenkins nodes have the necessary ~/.m2/settings.xml (normally :-) ).

-- 
Olivier Lamy
Talend: http://coders.talend.com
http://twitter.com/olamy | http://linkedin.com/in/olamy

Re: Deploy snapshots to Maven repo?

Posted by sebb <se...@gmail.com>.
On 24 February 2012 03:08, Benson Margulies <bi...@gmail.com> wrote:
> On Thu, Feb 23, 2012 at 8:51 PM, sebb <se...@gmail.com> wrote:
>> Do any of the build systems support deployment of Maven snapshots?
>>
>
> yes.
>
>> If so, how can this be added to a build?
>
> In Jenkins by ticking the box in the job config or adding 'deploy' to
> the list of maven goals.

Which box is that?
If it is "Publish artifacts to SCP Repository" then there does not
seem to be an SCP site; also it's not clear what the target path
should be.

[The build does not use Maven]

Re: Deploy snapshots to Maven repo?

Posted by Benson Margulies <bi...@gmail.com>.
On Thu, Feb 23, 2012 at 8:51 PM, sebb <se...@gmail.com> wrote:
> Do any of the build systems support deployment of Maven snapshots?
>

yes.

> If so, how can this be added to a build?

In Jenkins by ticking the box in the job config or adding 'deploy' to
the list of maven goals.