www-builds mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Justin Mason ...@jmason.org>
Subject Fwd: Hudson - Deploy artifacts to Maven repository
Date Thu, 09 Jul 2009 09:01:08 GMT
Some advice to anyone who's deploying artifacts from Hudson to a Maven
repository...

--j.


---------- Forwarded message ----------
From: John Casey <jdcasey@commonjava.org>
Date: Thu, Jul 9, 2009 at 04:15
Subject: Re: Hudson - Deploy artifacts to Maven repository
To: Wes Wannemacher <wesw@wantii.com>
Cc: infrastructure@apache.org


Wes Wannemacher wrote:
>
> On Wednesday 08 July 2009 02:44:51 Snitkovsky, Martin wrote:
>>
>> Hi,
>>
>> I am a member in Apache Wink project. We are facing some issue with Hudson
>> which I hope you can assist us to solve.
>>
>> I have configured Hudson to deploy Wink artifacts using "Deploy artifacts
>> to Maven repository"  (did not want to run explicitly mvn deploy, to avoid
>> possible repository inconsistency).
>>
>> What is happening is that only main jars are uploaded to the repository.
>> All other artifacts (e.g zip files)  are ignored.
>>
>> I searched the web for similar issues, and bumped into this one
>> http://www.nabble.com/"Deploy-artifacts-to-Maven-repository"-Issues-to18239
>> 802.html#a21810414
>>
>> Wink job configuration
>> http://hudson.zones.apache.org/hudson/view/Wink/job/Wink-Trunk-JDK15/config
>> ure
>>
>
>
> I have hudson push struts builds to the maven snapshot repo. I'm guessing that the problem
is most likely your maven pom.xml. I'm thinking that hudson will deploy projects... I'm not
exactly a maven guru, so you will have to forgive me if I get the vocabulary wrong, but we
have struts setup as multi-module builds. Hudson pushes out each artifact that is built as
part of the hudson build. So, I initiate the build from the top-level project (struts2-parent,
I think) and each of the child modules that creates an artifact is deployed. There were a
few tricks I had to pull to get the deployment correct. For instance, I created a key on the
zone and put it in my people.a.o authorized_keys file so that hudson could push to people
as me (since my account is in the struts group). Then, I updated the settings.xml in hudson's
home directory so that when using the snapshot repo that matches the server id specified in
the struts pom files, it would push over to using my people.a.o account.
>
> I hope this helps, but if I remember correctly, there is a nexus repo now in apache space
somewhere and this would probably be a better option if you are just starting to automate
your project builds, etc.
>
> -Wes
>

I've been running a Hudson build farm for around 9 months now that
deploys most if not all of its builds to a Nexus instance. I do use
Maven's 'deploy' lifecycle phase (`mvn clean deploy` + options) rather
than any functionality build into Hudson itself, though.

For me, this is far better than having a Hudson-specific process
deploying artifacts, since it means that what works for users will
(probably) work on Hudson. This includes attached artifacts (the
non-primary artifacts mentioned above in the original post).

I'm not sure what concerns you have about consistency WRT maven
deploy, but I will say that Nexus makes this setup even simpler, since
you don't need to worry about any of the quirks in SSH and such. Also,
we're using two different flavors of settings.xml in our build farm:
one that's used in slave VMs that are allowed to do a real deployment
of artifacts, and one that diverts the deployment to a dummy location
on the slave's localhost. This means that for any given build, we only
have a single slave VM that has the ability to deploy an artifact,
which side-steps the problems you might have with multiple slave VMs
deploying artifacts for the same project simultaneously.

BTW, this is my bread and butter, and I've done several Hudson and
Nexus configurations. If you want some specific help, I'm happy to
talk to you more here, via private email, or on IRC:
irc.codehaus.org#maven

Hope that helps,

-john

---
John Casey
Developer and PMC Member, Apache Maven (http://maven.apache.org)
Member, Apache Software Foundation

"What we have to learn to do, we learn by doing."
      -Aristotle

Mime
View raw message