You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Eric Kolotyluk <er...@kolotyluk.net> on 2014/04/15 03:02:10 UTC
Why Is Maven Ignoring My Local Repo?
I seem to keep running into this problem regularly for things not in
Maven Central
[ERROR] Failed to execute goal
org.apache.maven.plugins:maven-site-plugin:3.3:site (default-site) on
project csharp-windows-elevate: Execution default-site of goal
org.apache.maven.plugins:maven-site-plugin:3.3:site failed: Plugin
org.apache.maven.plugins:maven-site-plugin:3.3 or one of its
dependencies could not be resolved: Could not find artifact
net.trajano.wagon:wagon-git:jar:1.0.1-SNAPSHOT in local-nexus
(http://localhost:8081/nexus/content/groups/public) -> [Help 1]
I can see the artifact in my local repo, but maven somehow feels,
because it cannot find it in my nexus repository, then it does not exist.
The side problem is, even though nexus can see the artifact in its
index, it refuses to download it.
Why do maven and nexus work so hard at ignoring artifacts?
Cheers, Eric
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Why Is Maven Ignoring My Local Repo?
Posted by Jörg Schaible <jo...@swisspost.com>.
Stephen Connolly wrote:
> It's not a local repository. It is a local repository cache.
>
> There are files there that record where the artifacts were cached *from*.
>
> If the artifact is there but the cache file is not or indicates a
> different source from the allowed sources for your build, then Maven will
> ignore the artifact in your cache and check the remote sources.
Alas, if only the site plugin would be able to determine the proper source -
then anything would be fine ...
- Jörg
>
>
> On 15 April 2014 02:02, Eric Kolotyluk <er...@kolotyluk.net> wrote:
>
>> I seem to keep running into this problem regularly for things not in
>> Maven Central
>>
>> [ERROR] Failed to execute goal
>> [org.apache.maven.plugins:maven-site-plugin:3.3:site
>> (default-site) on project csharp-windows-elevate: Execution default-site
>> of goal org.apache.maven.plugins:maven-site-plugin:3.3:site failed:
>> Plugin org.apache.maven.plugins:maven-site-plugin:3.3 or one of its
>> dependencies could not be resolved: Could not find artifact
>> net.trajano.wagon:wagon-git:jar:1.0.1-SNAPSHOT in local-nexus
>> (http://localhost:8081/nexus/content/groups/public) ->
>> [Help 1]
>>
>> I can see the artifact in my local repo, but maven somehow feels, because
>> it cannot find it in my nexus repository, then it does not exist.
>>
>> The side problem is, even though nexus can see the artifact in its index,
>> it refuses to download it.
>>
>> Why do maven and nexus work so hard at ignoring artifacts?
>>
>> Cheers, Eric
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>
>>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Why Is Maven Ignoring My Local Repo?
Posted by Eric Kolotyluk <er...@gmail.com>.
Thanks Ben: I have not read the references yet, but plan to.
Normally I have only been removing _maven.repositories in the affected
directory, but I did as you suggested and removed all
_maven.repositories in my <localRepository>, but the problem still exists:
Could not find artifact net.trajano.wagon:wagon-git:jar:1.0.1-SNAPSHOT
in apache.snapshots (http://repository.apache.org/snapshots)
I do not understand why Maven is looking there. I have also manually
downloaded net.trajano.wagon:wagon-git:jar:1.0.1-SNAPSHOT and the pom to
my localRepository, but Maven continues to ignore them.
I am assuming there is a problem with "broken artifacts" as you mention,
as I cannot think of any other explanation for this aspect of 'maven
hell' I am tangling with at the moment.
It is curious that Nexus will download all the artifact pieces, except
the pom, internally, but will not serve them to Maven. Maybe there is
something Nexus does not like about the pom. On the other hand, when I
take Nexus out of my settings.xml, then the
http://repository.apache.org/snapshots problem happens.
I am currently in a dialog with the author of
net.trajano.wagon:wagon-git:jar:1.0.1-SNAPSHOT and I asked him to
release this to Maven Central, but if there is some 'broken artifact'
then I am not sure that will solve the problem either.
Cheers, Eric
On 4/15/2014 2:12 AM, Ben Caradoc-Davies wrote:
> Ah, my favourite Maven 3 unfeature, a response to the war between
> repos that deliver broken artifacts and those that have artifacts that
> legitimately migrate from one repo to another. I do not like the
> solution because it gives Maven an opaque memory of artifact source,
> so your build depends on previous builds with that local repository,
> not the contents of your pom. I do not like this.
>
> A little bedtime reading for the uninitiated:
>
> https://cwiki.apache.org/confluence/display/MAVEN/Maven+3.x+Compatibility+Notes#Maven3.xCompatibilityNotes-ResolutionfromLocalRepository
>
> http://jira.codehaus.org/browse/MNG-5181
> http://jira.codehaus.org/browse/MNG-5185
> http://obscuredclarity.blogspot.com.au/2012/05/using-maven-offline.html
> http://maven.40175.n5.nabble.com/Maven-3-maven-repositories-and-lastUpdated-td4927537.html
>
>
> My solution when all else fails:
>
> find ~/.m2/repository -name "_maven.repositories" -exec rm -f {} \;
>
> Kind regards,
> Ben.
>
> On 15/04/14 16:12, Stephen Connolly wrote:
>> It's not a local repository. It is a local repository cache.
>>
>> There are files there that record where the artifacts were cached
>> *from*.
>>
>> If the artifact is there but the cache file is not or indicates a
>> different
>> source from the allowed sources for your build, then Maven will
>> ignore the
>> artifact in your cache and check the remote sources.
>>
>>
>> On 15 April 2014 02:02, Eric Kolotyluk <er...@kolotyluk.net> wrote:
>>
>>> I seem to keep running into this problem regularly for things not in
>>> Maven
>>> Central
>>>
>>> [ERROR] Failed to execute goal
>>> org.apache.maven.plugins:maven-site-plugin:3.3:site
>>> (default-site) on project csharp-windows-elevate: Execution
>>> default-site of
>>> goal org.apache.maven.plugins:maven-site-plugin:3.3:site failed: Plugin
>>> org.apache.maven.plugins:maven-site-plugin:3.3 or one of its
>>> dependencies
>>> could not be resolved: Could not find artifact
>>> net.trajano.wagon:wagon-git:jar:1.0.1-SNAPSHOT
>>> in local-nexus (http://localhost:8081/nexus/content/groups/public) ->
>>> [Help 1]
>>>
>>> I can see the artifact in my local repo, but maven somehow feels,
>>> because
>>> it cannot find it in my nexus repository, then it does not exist.
>>>
>>> The side problem is, even though nexus can see the artifact in its
>>> index,
>>> it refuses to download it.
>>>
>>> Why do maven and nexus work so hard at ignoring artifacts?
>>>
>>> Cheers, Eric
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>> For additional commands, e-mail: users-help@maven.apache.org
>>>
>>>
>>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Why Is Maven Ignoring My Local Repo?
Posted by Ben Caradoc-Davies <Be...@csiro.au>.
Ah, my favourite Maven 3 unfeature, a response to the war between repos
that deliver broken artifacts and those that have artifacts that
legitimately migrate from one repo to another. I do not like the
solution because it gives Maven an opaque memory of artifact source, so
your build depends on previous builds with that local repository, not
the contents of your pom. I do not like this.
A little bedtime reading for the uninitiated:
https://cwiki.apache.org/confluence/display/MAVEN/Maven+3.x+Compatibility+Notes#Maven3.xCompatibilityNotes-ResolutionfromLocalRepository
http://jira.codehaus.org/browse/MNG-5181
http://jira.codehaus.org/browse/MNG-5185
http://obscuredclarity.blogspot.com.au/2012/05/using-maven-offline.html
http://maven.40175.n5.nabble.com/Maven-3-maven-repositories-and-lastUpdated-td4927537.html
My solution when all else fails:
find ~/.m2/repository -name "_maven.repositories" -exec rm -f {} \;
Kind regards,
Ben.
On 15/04/14 16:12, Stephen Connolly wrote:
> It's not a local repository. It is a local repository cache.
>
> There are files there that record where the artifacts were cached *from*.
>
> If the artifact is there but the cache file is not or indicates a different
> source from the allowed sources for your build, then Maven will ignore the
> artifact in your cache and check the remote sources.
>
>
> On 15 April 2014 02:02, Eric Kolotyluk <er...@kolotyluk.net> wrote:
>
>> I seem to keep running into this problem regularly for things not in Maven
>> Central
>>
>> [ERROR] Failed to execute goal org.apache.maven.plugins:maven-site-plugin:3.3:site
>> (default-site) on project csharp-windows-elevate: Execution default-site of
>> goal org.apache.maven.plugins:maven-site-plugin:3.3:site failed: Plugin
>> org.apache.maven.plugins:maven-site-plugin:3.3 or one of its dependencies
>> could not be resolved: Could not find artifact net.trajano.wagon:wagon-git:jar:1.0.1-SNAPSHOT
>> in local-nexus (http://localhost:8081/nexus/content/groups/public) ->
>> [Help 1]
>>
>> I can see the artifact in my local repo, but maven somehow feels, because
>> it cannot find it in my nexus repository, then it does not exist.
>>
>> The side problem is, even though nexus can see the artifact in its index,
>> it refuses to download it.
>>
>> Why do maven and nexus work so hard at ignoring artifacts?
>>
>> Cheers, Eric
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>
>>
>
--
Ben Caradoc-Davies <Be...@csiro.au>
Software Engineer
CSIRO Earth Science and Resource Engineering
Australian Resources Research Centre
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Why Is Maven Ignoring My Local Repo?
Posted by Stephen Connolly <st...@gmail.com>.
It's not a local repository. It is a local repository cache.
There are files there that record where the artifacts were cached *from*.
If the artifact is there but the cache file is not or indicates a different
source from the allowed sources for your build, then Maven will ignore the
artifact in your cache and check the remote sources.
On 15 April 2014 02:02, Eric Kolotyluk <er...@kolotyluk.net> wrote:
> I seem to keep running into this problem regularly for things not in Maven
> Central
>
> [ERROR] Failed to execute goal org.apache.maven.plugins:maven-site-plugin:3.3:site
> (default-site) on project csharp-windows-elevate: Execution default-site of
> goal org.apache.maven.plugins:maven-site-plugin:3.3:site failed: Plugin
> org.apache.maven.plugins:maven-site-plugin:3.3 or one of its dependencies
> could not be resolved: Could not find artifact net.trajano.wagon:wagon-git:jar:1.0.1-SNAPSHOT
> in local-nexus (http://localhost:8081/nexus/content/groups/public) ->
> [Help 1]
>
> I can see the artifact in my local repo, but maven somehow feels, because
> it cannot find it in my nexus repository, then it does not exist.
>
> The side problem is, even though nexus can see the artifact in its index,
> it refuses to download it.
>
> Why do maven and nexus work so hard at ignoring artifacts?
>
> Cheers, Eric
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>