maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Halvor Platou <Halvor.Pla...@marinecyb.com>
Subject Re: maven-metadata-local.xml <localCopy>
Date Thu, 22 Apr 2010 21:35:44 GMT
Thanks for the answers!

We are using version 2.2.1. Remember that you need to build the artifact at your computer
for the maven-metadata-local.xml to be written to your local repository with the <localCopy>
tag.

I now also see that there are two maven-metadata-local.xml. One in the root folder of the
artifact in the repository and one inside the x.x-SNAPSHOT folder. It is only the one inside
the x.x-SNAPSHOT folder that has this content. Here is an example:

<?xml version="1.0" encoding="UTF-8"?>
<metadata>
  <groupId>com.mycomp</groupId>
  <artifactId>test</artifactId>
  <version>1.0-SNAPSHOT</version>
  <versioning>
    <snapshot>
      <localCopy>true</localCopy>
    </snapshot>
    <lastUpdated>20100422213001</lastUpdated>
  </versioning>
</metadata>


Halvor



On Apr22, 2010, at 8:23 PM, Ron Wheeler wrote:

> What version of Maven?
> 
> I do not see that tag in my local repo. I only checked a few Artifacts 
> but none of them had that line.
> I am  using Maven 2.2.1 under Eclipse but I am not sure that this would 
> make any difference.
> 
> Sorry that I am not more help but perhaps one of the smart guys might 
> know what is happening.
> 
> Ron
> 
> On 22/04/2010 2:13 PM, Halvor Platou wrote:
>> Yes, these are all SNAPSHOT versions. Earlier this has not bee a problem, but now
it seems to be very consistent behavior. We have tried this with several computers and they
all show the same problem. We have also tried with several remote repositories. Does anyone
know the meaning of the<localCopy>  in maven-metadata.xml?
>> 
>> Halvor
>> 
>> 
>> On Apr22, 2010, at 8:01 PM, Ron Wheeler wrote:
>> 
>> 
>>> On 22/04/2010 11:00 AM, Halvor Platou wrote:
>>> 
>>>> Hello
>>>> 
>>>> We have a problem concerning building of maven snapshot artifacts that seems
very odd.
>>>> 
>>>> Let's say we have artifact: "A" and artifact: "B".
>>>> "A" depends on "B".
>>>> If we build both of these on one computer, everything seems fine.
>>>> 
>>>> If then artifact "B" is built and deployed(Nexus) on a different computer,
"mvn install -U" on artifact "A" on the first computer will not get the new artifact "B",
but use the one in the local repository.
>>>> 
>>>> It seems that when we build locally the file "maven-metadata-local.xml" is
created in the local repository containing<localCopy>true</localCopy>. As long
as this is set to true it will not get any new artifacts from the remote repository(Nexus)
even if they are newer and we specify -U. Removing the localCopy line or changing it to false
will make it download the new artifact.
>>>> 
>>>>  Is it supposed to be like this? And has it always been like this?
>>>> 
>>>> Halvor
>>>> 
>>>> 
>>> Since you are deploying multiple times, you should be using SNAPSHOTS
>>> and you should always get the latest from the Nexus.
>>> 
>>> If they are releases, then it should not matter whether you get it from
>>> your local repo or somewhere else since releases are immutable and all
>>> copies of the same release versions are supposed to be identical.
>>> 
>>> If you make a mistake in a release, you have to delete the bad copy from
>>> everywhere that has the wrong release.
>>> 
>>> 
>>> Ron
>>> 
>>> 
>>> 
>>> ---------------------------------------------------------------------
>>> 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
> 
> 

Mime
View raw message