You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@aries.apache.org by Holly Cummins <cu...@uk.ibm.com> on 2010/08/09 14:44:17 UTC

Making a maven mirror for building aries - properties-maven-plugin refuses to cooperate

Hi all, 

I'm trying to set up a local mirror of the maven repository required by 
Aries. The central repository has been a bit too unavailable lately for 
production use. 

These are the steps I'm following:

1. Build Aries normally. 
2. Move my .m2 cache to a new location on my filesystem, ${myrepository}.
3. Configure a new .m2/settings.xml to use the ${myrepository} as a 
mirror.
4. Build aries. All dependencies are downloaded normally, until we get to 
properties-maven-plugin, and then it dies in a heap:

...
Downloading: 
file:///home/cumminsh/.m2good/repository/org/apache/maven/plugins/maven-antrun-plugin/1.2/maven-antrun-plugin-1.2.jar
22K downloaded  (maven-antrun-plugin-1.2.jar)
[INFO] artifact org.codehaus.mojo:properties-maven-plugin: checking for 
updates from central
[INFO] 
------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] 
------------------------------------------------------------------------
[INFO] The plugin 'org.codehaus.mojo:properties-maven-plugin' does not 
exist or no valid version could be found

No amount of wiping my local cache fixes it.

A few things are mystifying me. I know the metadata in my local mirror is 
good, because it's what just got downloaded from the central repository 
into my bundle cache. So why does running against the central repository 
pass, but an apparently identical local copy fail? If I download the 
properties-maven-plugin jars and metadata manually and drop them into my 
local cache, I can build fine, so it's just the download which is causing 
issues, not the usage. 

The second perplexing thing is that a few months ago, when we were on 
0.1-SNAPSHOT, this process worked fine. What's changed between now and 
then?

I could try a repository management tool like Nexus, but I can't imagine 
they'd produce metadata more valid than the metadata I produce myself by 
doing a local build and generating a cache.

I guess this is a more general maven question, or perhaps even a question 
for the properties-maven-plugin list, but I know there are a lot of maven 
experts among the aries community. Google throws up a more general 
codehaus bug http://jira.codehaus.org/browse/MNG-4001, but no suggested 
workarounds except for moving to maven 3.

Anyone have any inspiration?

Thanks,
Holly
--
Holly Cummins
IBM Hursley, UK
cumminsh@uk.ibm.com 
Phone: External +44 (0) 1962 815104 ; Internal 7-245104;





Unless stated otherwise above:
IBM United Kingdom Limited - Registered in England and Wales with number 
741598. 
Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU






Re: Making a maven mirror for building aries - properties-maven-plugin refuses to cooperate

Posted by Holly Cummins <cu...@uk.ibm.com>.
Thanks everyone for all your suggestions, as a result of which I now have 
my build working against a private maven mirror. Archiva was a bit of a 
non-starter for me because it won't run with an IBM JVM (a known bug, it 
seems). However, the maven-proxy project did the trick. My requirements 
are so simple that even the obsolete implementation was good enough. :) 

I hit a second problem with the 0.0.313 version of the aQute bndlib plugin 
required by pax-swissbox, which was only available from the aQute maven 
repository. I'm not sure why this doesn't cause more general problems, but 
it was easily solved by adding the aQute repo to my mirror's configuration 
file. 
 
Cheers,
Holly
--
Holly Cummins
OSGi Applications
IBM Hursley, UK
cumminsh@uk.ibm.com 






Unless stated otherwise above:
IBM United Kingdom Limited - Registered in England and Wales with number 
741598. 
Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU






Re: Making a maven mirror for building aries - properties-maven-plugin refuses to cooperate

Posted by Donald Woods <dw...@apache.org>.
I would suggest trying to specify a local central mirror first -

http://maven.apache.org/guides/mini/guide-mirror-settings.html
http://docs.codehaus.org/display/MAVENUSER/Mirrors+Repositories

If that doesn't work or you need repeatable builds (like for production
usage) then I'd suggest going with Nexus, which is easy to setup as a
caching proxy for all of the repos your builds need.

http://nexus.sonatype.org/


-Donald


On 8/9/10 5:41 PM, Lin Sun wrote:
> Hi Holly
> 
> I wonder how you config the new settings.xml.   Does it contain any
> reference to the maven central repo?  If not, I think we should not
> see a message like "checking for updates from central" as it can be
> configured to only to download from your local repo or internal repo.
> 
> Lin
> 
> 
> On Mon, Aug 9, 2010 at 8:44 AM, Holly Cummins <cu...@uk.ibm.com> wrote:
>> Hi all,
>>
>> I'm trying to set up a local mirror of the maven repository required by
>> Aries. The central repository has been a bit too unavailable lately for
>> production use.
>>
>> These are the steps I'm following:
>>
>> 1. Build Aries normally.
>> 2. Move my .m2 cache to a new location on my filesystem, ${myrepository}.
>> 3. Configure a new .m2/settings.xml to use the ${myrepository} as a
>> mirror.
>> 4. Build aries. All dependencies are downloaded normally, until we get to
>> properties-maven-plugin, and then it dies in a heap:
>>
>> ...
>> Downloading:
>> file:///home/cumminsh/.m2good/repository/org/apache/maven/plugins/maven-antrun-plugin/1.2/maven-antrun-plugin-1.2.jar
>> 22K downloaded  (maven-antrun-plugin-1.2.jar)
>> [INFO] artifact org.codehaus.mojo:properties-maven-plugin: checking for
>> updates from central
> 

Re: Making a maven mirror for building aries - properties-maven-plugin refuses to cooperate

Posted by Lin Sun <li...@gmail.com>.
Hi Holly

I wonder how you config the new settings.xml.   Does it contain any
reference to the maven central repo?  If not, I think we should not
see a message like "checking for updates from central" as it can be
configured to only to download from your local repo or internal repo.

Lin


On Mon, Aug 9, 2010 at 8:44 AM, Holly Cummins <cu...@uk.ibm.com> wrote:
> Hi all,
>
> I'm trying to set up a local mirror of the maven repository required by
> Aries. The central repository has been a bit too unavailable lately for
> production use.
>
> These are the steps I'm following:
>
> 1. Build Aries normally.
> 2. Move my .m2 cache to a new location on my filesystem, ${myrepository}.
> 3. Configure a new .m2/settings.xml to use the ${myrepository} as a
> mirror.
> 4. Build aries. All dependencies are downloaded normally, until we get to
> properties-maven-plugin, and then it dies in a heap:
>
> ...
> Downloading:
> file:///home/cumminsh/.m2good/repository/org/apache/maven/plugins/maven-antrun-plugin/1.2/maven-antrun-plugin-1.2.jar
> 22K downloaded  (maven-antrun-plugin-1.2.jar)
> [INFO] artifact org.codehaus.mojo:properties-maven-plugin: checking for
> updates from central

Re: Making a maven mirror for building aries - properties-maven-plugin refuses to cooperate

Posted by Justin Edelson <ju...@gmail.com>.
AFAIK, the only problem with using a local repository as a remote repository is the metadata, so theoretically if you specify plugin versions and don't use version ranges anywhere, it might work. But don't be surprised if it doesn't :)

On Aug 9, 2010, at 11:05 AM, Holly Cummins <cu...@uk.ibm.com> wrote:

> Hi Justin, 
> 
> Thanks for the speedy reply. I was trying to avoid the overhead of a 
> repository manager for what's a pretty simple use case (one consuming 
> product, shared filesystem already available) but I will have a go. 
> 
>> The contents of local repository cannot be used as a remote 
>> repository. You should use a repository manager.
> 
> That's a good point about the local repository, thanks. What I'd tried 
> first was manually mirroring the org.codehaus.mojo metadata and archives 
> down to my private mirror, similarly without success. (The private mirror 
> worked great for building our aries 0.1 levels, but not for our 0.2 
> levels.) 
> 
> As with the local repository-copy, everything worked except up until the 
> download of the properties-maven-plugin. I'm not convinced even the 
> repository manager will solve the problem, but I'll try and eliminate my 
> repository management techniques as a cause of the problem before I 
> investigate further. :)
> 
> Holly
> 
> 
> 
> 
> 
> Unless stated otherwise above:
> IBM United Kingdom Limited - Registered in England and Wales with number 
> 741598. 
> Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU
> 
> 
> 
> 
> 

Re: Making a maven mirror for building aries - properties-maven-plugin refuses to cooperate

Posted by Justin Edelson <ju...@gmail.com>.
I don't think mvnproxy is maintained anymore. More modern solutions are Nexus, Archiva, and Artifactory.

On Aug 9, 2010, at 12:01 PM, Jeremy Hughes <hu...@apache.org> wrote:

> Have you looked at mvnproxy
> 
> http://docs.codehaus.org/display/MAVENUSER/Creating+a+Maven+proxy+%28mvnproxy%29
> 
> Cheers,
> Jeremy
> 
> On 9 August 2010 16:05, Holly Cummins <cu...@uk.ibm.com> wrote:
>> Hi Justin,
>> 
>> Thanks for the speedy reply. I was trying to avoid the overhead of a
>> repository manager for what's a pretty simple use case (one consuming
>> product, shared filesystem already available) but I will have a go.
>> 
>>> The contents of local repository cannot be used as a remote
>>> repository. You should use a repository manager.
>> 
>> That's a good point about the local repository, thanks. What I'd tried
>> first was manually mirroring the org.codehaus.mojo metadata and archives
>> down to my private mirror, similarly without success. (The private mirror
>> worked great for building our aries 0.1 levels, but not for our 0.2
>> levels.)
>> 
>> As with the local repository-copy, everything worked except up until the
>> download of the properties-maven-plugin. I'm not convinced even the
>> repository manager will solve the problem, but I'll try and eliminate my
>> repository management techniques as a cause of the problem before I
>> investigate further. :)
>> 
>> Holly
>> 
>> 
>> 
>> 
>> 
>> Unless stated otherwise above:
>> IBM United Kingdom Limited - Registered in England and Wales with number
>> 741598.
>> Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU
>> 
>> 
>> 
>> 
>> 
>> 

Re: Making a maven mirror for building aries - properties-maven-plugin refuses to cooperate

Posted by Jeremy Hughes <hu...@apache.org>.
Have you looked at mvnproxy

http://docs.codehaus.org/display/MAVENUSER/Creating+a+Maven+proxy+%28mvnproxy%29

Cheers,
Jeremy

On 9 August 2010 16:05, Holly Cummins <cu...@uk.ibm.com> wrote:
> Hi Justin,
>
> Thanks for the speedy reply. I was trying to avoid the overhead of a
> repository manager for what's a pretty simple use case (one consuming
> product, shared filesystem already available) but I will have a go.
>
>> The contents of local repository cannot be used as a remote
>> repository. You should use a repository manager.
>
> That's a good point about the local repository, thanks. What I'd tried
> first was manually mirroring the org.codehaus.mojo metadata and archives
> down to my private mirror, similarly without success. (The private mirror
> worked great for building our aries 0.1 levels, but not for our 0.2
> levels.)
>
> As with the local repository-copy, everything worked except up until the
> download of the properties-maven-plugin. I'm not convinced even the
> repository manager will solve the problem, but I'll try and eliminate my
> repository management techniques as a cause of the problem before I
> investigate further. :)
>
> Holly
>
>
>
>
>
> Unless stated otherwise above:
> IBM United Kingdom Limited - Registered in England and Wales with number
> 741598.
> Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU
>
>
>
>
>
>

Re: Making a maven mirror for building aries - properties-maven-plugin refuses to cooperate

Posted by Holly Cummins <cu...@uk.ibm.com>.
Hi Justin, 

Thanks for the speedy reply. I was trying to avoid the overhead of a 
repository manager for what's a pretty simple use case (one consuming 
product, shared filesystem already available) but I will have a go. 

> The contents of local repository cannot be used as a remote 
> repository. You should use a repository manager.

That's a good point about the local repository, thanks. What I'd tried 
first was manually mirroring the org.codehaus.mojo metadata and archives 
down to my private mirror, similarly without success. (The private mirror 
worked great for building our aries 0.1 levels, but not for our 0.2 
levels.) 

As with the local repository-copy, everything worked except up until the 
download of the properties-maven-plugin. I'm not convinced even the 
repository manager will solve the problem, but I'll try and eliminate my 
repository management techniques as a cause of the problem before I 
investigate further. :)

Holly





Unless stated otherwise above:
IBM United Kingdom Limited - Registered in England and Wales with number 
741598. 
Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU






Re: Making a maven mirror for building aries - properties-maven-plugin refuses to cooperate

Posted by Justin Edelson <ju...@gmail.com>.
The contents of local repository cannot be used as a remote repository. You should use a repository manager.

Justin

On Aug 9, 2010, at 8:44 AM, Holly Cummins <cu...@uk.ibm.com> wrote:

> Hi all, 
> 
> I'm trying to set up a local mirror of the maven repository required by 
> Aries. The central repository has been a bit too unavailable lately for 
> production use. 
> 
> These are the steps I'm following:
> 
> 1. Build Aries normally. 
> 2. Move my .m2 cache to a new location on my filesystem, ${myrepository}.
> 3. Configure a new .m2/settings.xml to use the ${myrepository} as a 
> mirror.
> 4. Build aries. All dependencies are downloaded normally, until we get to 
> properties-maven-plugin, and then it dies in a heap:
> 
> ...
> Downloading: 
> file:///home/cumminsh/.m2good/repository/org/apache/maven/plugins/maven-antrun-plugin/1.2/maven-antrun-plugin-1.2.jar
> 22K downloaded  (maven-antrun-plugin-1.2.jar)
> [INFO] artifact org.codehaus.mojo:properties-maven-plugin: checking for 
> updates from central
> [INFO] 
> ------------------------------------------------------------------------
> [ERROR] BUILD ERROR
> [INFO] 
> ------------------------------------------------------------------------
> [INFO] The plugin 'org.codehaus.mojo:properties-maven-plugin' does not 
> exist or no valid version could be found
> 
> No amount of wiping my local cache fixes it.
> 
> A few things are mystifying me. I know the metadata in my local mirror is 
> good, because it's what just got downloaded from the central repository 
> into my bundle cache. So why does running against the central repository 
> pass, but an apparently identical local copy fail? If I download the 
> properties-maven-plugin jars and metadata manually and drop them into my 
> local cache, I can build fine, so it's just the download which is causing 
> issues, not the usage. 
> 
> The second perplexing thing is that a few months ago, when we were on 
> 0.1-SNAPSHOT, this process worked fine. What's changed between now and 
> then?
> 
> I could try a repository management tool like Nexus, but I can't imagine 
> they'd produce metadata more valid than the metadata I produce myself by 
> doing a local build and generating a cache.
> 
> I guess this is a more general maven question, or perhaps even a question 
> for the properties-maven-plugin list, but I know there are a lot of maven 
> experts among the aries community. Google throws up a more general 
> codehaus bug http://jira.codehaus.org/browse/MNG-4001, but no suggested 
> workarounds except for moving to maven 3.
> 
> Anyone have any inspiration?
> 
> Thanks,
> Holly
> --
> Holly Cummins
> IBM Hursley, UK
> cumminsh@uk.ibm.com 
> Phone: External +44 (0) 1962 815104 ; Internal 7-245104;
> 
> 
> 
> 
> 
> Unless stated otherwise above:
> IBM United Kingdom Limited - Registered in England and Wales with number 
> 741598. 
> Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU
> 
> 
> 
> 
>