We're running a multi-server build system setup using Hudson.
Assume that we have two artifacts module M1 and M2,where M2 depends on M1.
We also have 2 build-servers S1 and S2. We also have a Nexus repository
setup where the built artifacts are deployed.

Now we build M1 on S1 and installs M1 in the local repository om M1 and
deployed to Nexus. Then a build of M2 is triggered (since a dependency
artifact was built) and the build takes place on S1, installing M2 in the
local repository and deployed to Nexus.

Next time a commit is made to M1 a build is triggered on S2 instead and M1
is installed in the local repository as well as published to the Nexus
repository.
Now M2 will be build, on S1, and now we get a problem.
Since S1's local repository contains M1 (which was built on S1) the new
version from the Nexus repository is not resolved and downloaded resulting
in a failing build (or in the worse case; a build that is not failing but
using the wrong dependency!).

The reason for this (haven't checked the source so I'm guessing here) is
that the maven-metadata-local.xml file contains:
 <versioning>
    <snapshot>
      <localCopy>true</localCopy>
    </snapshot>
    <lastUpdated>20091130093006</lastUpdated>
  </versioning>

If I remove the <localCopy> tag the Nexus repository is consulted for a new
version and downloaded, which is what I expect.

Possible workarounds:
* Use dependency:purge-local-repository on every build - the purge target
doesn't allow an INCLUDE (only EXCLUDE) so I must specify ALL third party
dependencies (which I don't want to purge).
* Use a private repository for every Hudson build (I have about 100...) -
waste of disk space

Are there any other (better) solutions to this?
Would be nice if the install target didn't write the localCopy tag, or if
the -U flag actually ignored the localCopy flag and performed an Update like
the documentation says.

-- 
View this message in context: 
http://old.nabble.com/Snapshot-dependencies-not-updated-from-remote-repository-tp26572230p26572230.html
Sent from the Maven - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to