You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Ch...@emc.com on 2012/07/13 22:53:42 UTC

snapshot built locally

I understand that a SNAPSHOT dependency will be pulled from my local repository, and once a day maven will make a check for a newer version in remote repositories known to the build.  Is this behavior the same if the SNAPSHOT dependency in local was built and installed from a local build?

Re: snapshot built locally

Posted by Wayne Fay <wa...@gmail.com>.
> I understand that a SNAPSHOT dependency will be pulled from my local
> repository, and once a day maven will make a check for a newer version
> in remote repositories known to the build.  Is this behavior the same if the
> SNAPSHOT dependency in local was built and installed from a local build?

I don't understand the question.

Maven will use the latest SNAPSHOT in your local repo cache, period.

If this happens to be a built-locally SNAPSHOT, it will be used.

If this happens to be a
built-remotely-and-downloaded-from-corporate-repo SNAPSHOT (eg your
local SNAPSHOT is older than this one), then it will be used -- until
you build and install a newer one locally.

The "fun" stuff happens when multiple people are working on branches
of the same artifact... and colliding with each other in local and
remote repos with their various jars... which causes some people to
either "lock down" a given artifact to one person/group each day or
insert a branch-id into the artifact-id or other things.

Wayne

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: snapshot built locally

Posted by Aliaksei Lahachou <al...@gmail.com>.
Hello Chad,

I think the behavior is the same, here's what I did:

* I built multi-module project with mvn clean install - now all artifact
are in my local repository.
* I changed directory to the "top-level" module, which depends on other
modules in the project and executed mvn clean install -U - Maven went to
the remote repository for maven-metadata.xml.

The only thing to check is whether Maven does the same next day without -U
option. But I think it's logical that Maven checks for updates even for
locally installed snapshots - otherwise, if you installed snapshot locally,
it would block updates from remote repository.


Regards,
htfv (Aliaksei Lahachou)


On Fri, Jul 13, 2012 at 10:53 PM, <Ch...@emc.com> wrote:

> I understand that a SNAPSHOT dependency will be pulled from my local
> repository, and once a day maven will make a check for a newer version in
> remote repositories known to the build.  Is this behavior the same if the
> SNAPSHOT dependency in local was built and installed from a local build?
>