You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Enrico Oliosi <en...@intesys.it> on 2015/04/10 11:18:23 UTC

How to download snapshot artifact from internal Nexus repository?

Hi all.

I have a Nexus internal server repository (which is a mirror too) and I
defined an internal shapshot repository and the release one. Their ids are:
Snapshots and Releases and they are hosted repository.

I configured a Group Repository (named Public with url
http://mynexus/content/groups/public/) that contains the two described
repositories (when I perform a deploy phase on a snapshot artifact then I
find the artifact on the Public).

I added to my settings.xml the mirror section:

<mirror>
  <id>mynexus.it</id>
  <mirrorOf>*</mirrorOf>
  <name>My Maven Nexus Repository</name>
  <url>http://mynexus/content/groups/public/</url>
</mirror>

but when I perform an operation (e.g. mvn compile) which requires a snapshot
artifact (which I haven't into my local repository, but it is on
http://mynexus/content/groups/public/), maven doesn't search the snapshot
artifact on my nexus repository and the operation fails (it seems that maven
looks for the snapshot on local repository only and doesn't look for it on
my mirror).

Why doesn't maven look for and find the snapshot artifact on the mirror when
I execute the compile phase?

Thanks in advance.

Enrico




--
View this message in context: http://maven.40175.n5.nabble.com/How-to-download-snapshot-artifact-from-internal-Nexus-repository-tp5832175.html
Sent from the Maven - Users mailing list archive at Nabble.com.

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


Re: How to download snapshot artifact from internal Nexus repository?

Posted by Enrico Oliosi <en...@intesys.it>.
Thanks a lot Anton.

Enrico



--
View this message in context: http://maven.40175.n5.nabble.com/How-to-download-snapshot-artifact-from-internal-Nexus-repository-tp5832175p5832182.html
Sent from the Maven - Users mailing list archive at Nabble.com.

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


Re: How to download snapshot artifact from internal Nexus repository?

Posted by Anton Tanasenko <at...@gmail.com>.
By default, maven is configured with a single central repository with
snapshots=false.
You need to instruct maven to also start looking for snapshots somewhere.

There is a short snippet in sonatype book (nexus profile) which will do
just that.
http://books.sonatype.com/nexus-book/2.8/reference/maven-sect-single-group.html

2015-04-10 12:18 GMT+03:00 Enrico Oliosi <en...@intesys.it>:

> Hi all.
>
> I have a Nexus internal server repository (which is a mirror too) and I
> defined an internal shapshot repository and the release one. Their ids are:
> Snapshots and Releases and they are hosted repository.
>
> I configured a Group Repository (named Public with url
> http://mynexus/content/groups/public/) that contains the two described
> repositories (when I perform a deploy phase on a snapshot artifact then I
> find the artifact on the Public).
>
> I added to my settings.xml the mirror section:
>
> <mirror>
>   <id>mynexus.it</id>
>   <mirrorOf>*</mirrorOf>
>   <name>My Maven Nexus Repository</name>
>   <url>http://mynexus/content/groups/public/</url>
> </mirror>
>
> but when I perform an operation (e.g. mvn compile) which requires a
> snapshot
> artifact (which I haven't into my local repository, but it is on
> http://mynexus/content/groups/public/), maven doesn't search the snapshot
> artifact on my nexus repository and the operation fails (it seems that
> maven
> looks for the snapshot on local repository only and doesn't look for it on
> my mirror).
>
> Why doesn't maven look for and find the snapshot artifact on the mirror
> when
> I execute the compile phase?
>
> Thanks in advance.
>
> Enrico
>
>
>
>
> --
> View this message in context:
> http://maven.40175.n5.nabble.com/How-to-download-snapshot-artifact-from-internal-Nexus-repository-tp5832175.html
> Sent from the Maven - Users mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>


-- 
Regards,
Anton.