jira.codehaus.org

  • Log In Access more options
    • Online Help
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What?s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
  • Continuum
  • CONTINUUM-2426

Purge local repo invalidated local repository

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Bug Bug
  • Status: Open Open
  • Priority: Major Major
  • Resolution: Unresolved
  • Affects Version/s: 1.3.4 (Beta)
  • Fix Version/s: 1.4.2 (Beta)
  • Component/s: Purging
  • Labels:
    None
  • Environment:
    Windows Server 2003
    Maven 2.0.9
  • Complexity:
    Intermediate

Description

I'm using the following Purge Configuration to clean the local repositories:

Days Older: 14
Retention Count: 2
Delete All: false
Delete Released Snapshots: false

If a project <X> have not been build longer than <retentionCount> days, continuum deletes the files

<X>-<Version>.pom/jar/...

This leads to a Maven error when this artifact is resolved for a dependend artifact.

Example:

  • the files pdi.kartenleser-9.3.0-SNAPSHOT.pom + pdi.kartenleser-9.3.0-SNAPSHOT.jar are missing

$ ls pdi.kartenleser/9.3.0-SNAPSHOT/
maven-metadata-deploy.p32.xml pdi.kartenleser-9.3.0-20091223.150701-127.jar
maven-metadata-deploy.p32.xml.sha1 pdi.kartenleser-9.3.0-20091223.150701-127.pom
maven-metadata-local.xml pdi.kartenleser-9.3.0-20091223.164758-128-sources.jar
maven-metadata-repo.p32.xml pdi.kartenleser-9.3.0-20091223.164758-128.jar
pdi.kartenleser-9.3.0-20091223.150701-127-sources.jar pdi.kartenleser-9.3.0-20091223.164758-128.pom

Activity

Ascending order - Click to sort in descending order
  • All
  • Comments
  • Work Log
  • History
  • Activity
Hide
Permalink
Wendy Smoak added a comment - 11/Jan/10 4:35 PM

According to http://continuum.apache.org/docs/1.3.4/administrator_guides/purgeConfiguration.html

If you configure days older = 14 and retention count = 2, it should always keep 2 no matter how old they are.

In your directory listing, I think I see that two snapshots were kept:
pdi.kartenleser-9.3.0-20091223.150701-127.jar
pdi.kartenleser-9.3.0-20091223.164758-128.jar

This appears to be working correctly.

If you are getting a Maven build error saying the snapshot is not there, maybe something is wrong with the metadata file. Can you please paste the contents of maven-metadata-local.xml ?

Show
Wendy Smoak added a comment - 11/Jan/10 4:35 PM According to http://continuum.apache.org/docs/1.3.4/administrator_guides/purgeConfiguration.html If you configure days older = 14 and retention count = 2, it should always keep 2 no matter how old they are. In your directory listing, I think I see that two snapshots were kept: pdi.kartenleser-9.3.0-20091223.150701-127.jar pdi.kartenleser-9.3.0-20091223.164758-128.jar This appears to be working correctly. If you are getting a Maven build error saying the snapshot is not there, maybe something is wrong with the metadata file. Can you please paste the contents of maven-metadata-local.xml ?
Hide
Permalink
Frank Förstemann added a comment - 19/Jan/10 9:23 AM

As shown below, for SNAPSHOT-versions maven keeps the latest instances of artifact and pom besides the timestamped copies of these file:

01/19/2010 03:46 PM <DIR> .
01/19/2010 03:46 PM <DIR> ..
01/19/2010 03:42 PM 243,092 core.versionshandling-9.3.0-20100119.144208-216-sources.jar
01/19/2010 03:42 PM 301,912 core.versionshandling-9.3.0-20100119.144208-216.jar
01/19/2010 03:42 PM 5,599 core.versionshandling-9.3.0-20100119.144208-216.pom
01/19/2010 03:46 PM 243,092 core.versionshandling-9.3.0-20100119.144603-217-sources.jar
01/19/2010 03:46 PM 301,912 core.versionshandling-9.3.0-20100119.144603-217.jar
01/19/2010 03:46 PM 5,599 core.versionshandling-9.3.0-20100119.144603-217.pom
01/19/2010 03:46 PM 243,092 core.versionshandling-9.3.0-SNAPSHOT-sources.jar
01/19/2010 03:46 PM 301,912 core.versionshandling-9.3.0-SNAPSHOT.jar
01/19/2010 03:46 PM 5,599 core.versionshandling-9.3.0-SNAPSHOT.pom
01/19/2010 03:46 PM 366 maven-metadata-deploy.p32.xml
01/19/2010 03:46 PM 40 maven-metadata-deploy.p32.xml.sha1
01/19/2010 03:46 PM 318 maven-metadata-local.xml
12 File(s) 1,652,533 bytes
2 Dir(s) 196,755,922,944 bytes free

After purging the repository with continuum (retention count 1 in this example) the files core.versionshandling-9.3.0-SNAPSHOT.jar and core.versionshandling-9.3.0-SNAPSHOT.pom are deleted as well. This leads to errors building dependent projects afterwards.

01/19/2010 04:08 PM <DIR> .
01/19/2010 04:08 PM <DIR> ..
01/19/2010 03:46 PM 243,092 core.versionshandling-9.3.0-20100119.144603-217-sources.jar
01/19/2010 03:46 PM 301,912 core.versionshandling-9.3.0-20100119.144603-217.jar
01/19/2010 03:46 PM 5,599 core.versionshandling-9.3.0-20100119.144603-217.pom
01/19/2010 03:46 PM 366 maven-metadata-deploy.p32.xml
01/19/2010 03:46 PM 40 maven-metadata-deploy.p32.xml.sha1
01/19/2010 03:46 PM 318 maven-metadata-local.xml
6 File(s) 551,327 bytes
2 Dir(s) 196,760,403,968 bytes free

Show
Frank Förstemann added a comment - 19/Jan/10 9:23 AM As shown below, for SNAPSHOT-versions maven keeps the latest instances of artifact and pom besides the timestamped copies of these file: 01/19/2010 03:46 PM <DIR> . 01/19/2010 03:46 PM <DIR> .. 01/19/2010 03:42 PM 243,092 core.versionshandling-9.3.0-20100119.144208-216-sources.jar 01/19/2010 03:42 PM 301,912 core.versionshandling-9.3.0-20100119.144208-216.jar 01/19/2010 03:42 PM 5,599 core.versionshandling-9.3.0-20100119.144208-216.pom 01/19/2010 03:46 PM 243,092 core.versionshandling-9.3.0-20100119.144603-217-sources.jar 01/19/2010 03:46 PM 301,912 core.versionshandling-9.3.0-20100119.144603-217.jar 01/19/2010 03:46 PM 5,599 core.versionshandling-9.3.0-20100119.144603-217.pom 01/19/2010 03:46 PM 243,092 core.versionshandling-9.3.0-SNAPSHOT-sources.jar 01/19/2010 03:46 PM 301,912 core.versionshandling-9.3.0-SNAPSHOT.jar 01/19/2010 03:46 PM 5,599 core.versionshandling-9.3.0-SNAPSHOT.pom 01/19/2010 03:46 PM 366 maven-metadata-deploy.p32.xml 01/19/2010 03:46 PM 40 maven-metadata-deploy.p32.xml.sha1 01/19/2010 03:46 PM 318 maven-metadata-local.xml 12 File(s) 1,652,533 bytes 2 Dir(s) 196,755,922,944 bytes free After purging the repository with continuum (retention count 1 in this example) the files core.versionshandling-9.3.0-SNAPSHOT.jar and core.versionshandling-9.3.0-SNAPSHOT.pom are deleted as well. This leads to errors building dependent projects afterwards. 01/19/2010 04:08 PM <DIR> . 01/19/2010 04:08 PM <DIR> .. 01/19/2010 03:46 PM 243,092 core.versionshandling-9.3.0-20100119.144603-217-sources.jar 01/19/2010 03:46 PM 301,912 core.versionshandling-9.3.0-20100119.144603-217.jar 01/19/2010 03:46 PM 5,599 core.versionshandling-9.3.0-20100119.144603-217.pom 01/19/2010 03:46 PM 366 maven-metadata-deploy.p32.xml 01/19/2010 03:46 PM 40 maven-metadata-deploy.p32.xml.sha1 01/19/2010 03:46 PM 318 maven-metadata-local.xml 6 File(s) 551,327 bytes 2 Dir(s) 196,760,403,968 bytes free
Hide
Permalink
Frank Förstemann added a comment - 19/Jan/10 9:59 AM

... sorry, hit the Add-Button too early ...

After recreating core.versionshandling-9.3.0-SNAPSHOT.jar/pom from the latest timestamped version, dependent projects are building again. To me it seems that maven and continuum are not fully consistent here.

Here's the requested maven-metadata-local.xml for the example above:

<?xml version="1.0" encoding="UTF-8"?><metadata>
<groupId>de.ivu.mb</groupId>
<artifactId>core.versionshandling</artifactId>
<version>9.3.0-SNAPSHOT</version>
<versioning>
<snapshot>
<localCopy>true</localCopy>
</snapshot>
<lastUpdated>20100119154019</lastUpdated>
</versioning>
</metadata>

Regards

Frank

Show
Frank Förstemann added a comment - 19/Jan/10 9:59 AM ... sorry, hit the Add-Button too early ... After recreating core.versionshandling-9.3.0-SNAPSHOT.jar/pom from the latest timestamped version, dependent projects are building again. To me it seems that maven and continuum are not fully consistent here. Here's the requested maven-metadata-local.xml for the example above: <?xml version="1.0" encoding="UTF-8"?><metadata> <groupId>de.ivu.mb</groupId> <artifactId>core.versionshandling</artifactId> <version>9.3.0-SNAPSHOT</version> <versioning> <snapshot> <localCopy>true</localCopy> </snapshot> <lastUpdated>20100119154019</lastUpdated> </versioning> </metadata> Regards Frank
Hide
Permalink
Wendy Smoak added a comment - 30/Jan/10 10:00 AM

Can you confirm whether core.versionhandling is building in Continuum in addition to being resolved from a remote repository?

Are there any other details you can provide about your project and infrastructure to help us reproduce the problem?

I need to understand how the local repo is getting populated in order to figure out how it should be cleaned up.

Show
Wendy Smoak added a comment - 30/Jan/10 10:00 AM Can you confirm whether core.versionhandling is building in Continuum in addition to being resolved from a remote repository? Are there any other details you can provide about your project and infrastructure to help us reproduce the problem? I need to understand how the local repo is getting populated in order to figure out how it should be cleaned up.
Hide
Permalink
Brett Porter added a comment - 18/Feb/10 6:45 PM

Frank, did you resolve the issue already?

Show
Brett Porter added a comment - 18/Feb/10 6:45 PM Frank, did you resolve the issue already?
Hide
Permalink
Reimer Prochnow added a comment - 22/Feb/10 5:00 AM

I can confirm this Bug. After purging, the SNAPSHOT.jar was deleted, and retention-count timestamped versions remained. The maven-metadata-local.xml is referencing a non timestamped version and this file is not found. A build with maven is impossible, but working after just deleting "maven-metadata-local.xml", since than a update is triggered from a global repository.

Show
Reimer Prochnow added a comment - 22/Feb/10 5:00 AM I can confirm this Bug. After purging, the SNAPSHOT.jar was deleted, and retention-count timestamped versions remained. The maven-metadata-local.xml is referencing a non timestamped version and this file is not found. A build with maven is impossible, but working after just deleting "maven-metadata-local.xml", since than a update is triggered from a global repository.
Hide
Permalink
Frank Förstemann added a comment - 25/Feb/10 3:14 PM

Exactly:
The problem occurs for artifacts that have been build with "mvn deploy" by Continuum: in the local repository mvn creates:
1. a timestamped version of the artifact referenced by maven-metadata-<repository>.xml .
2. a non-timestamped version of the artifact referenced by maven-metadata-local.xml.
Continuum purges the non-timestamped version of the artifact but keeps maven-metadata-local.xml. If the non-timestamped version of the artifact is purged, maven-metadata-local.xml should be deleted as well.

Downloaded (i.e. not locally built) Artifacts in Snapshot-version does not seem to be affected as the non-timestamped version and it's metadata-file are not created.

Show
Frank Förstemann added a comment - 25/Feb/10 3:14 PM Exactly: The problem occurs for artifacts that have been build with "mvn deploy" by Continuum: in the local repository mvn creates: 1. a timestamped version of the artifact referenced by maven-metadata-<repository>.xml . 2. a non-timestamped version of the artifact referenced by maven-metadata-local.xml. Continuum purges the non-timestamped version of the artifact but keeps maven-metadata-local.xml. If the non-timestamped version of the artifact is purged, maven-metadata-local.xml should be deleted as well. Downloaded (i.e. not locally built) Artifacts in Snapshot-version does not seem to be affected as the non-timestamped version and it's metadata-file are not created.

People

  • Assignee:
    Unassigned
    Reporter:
    Frank Förstemann
Vote (1)
Watch (1)

Dates

  • Created:
    07/Jan/10 4:32 AM
    Updated:
    17/Jul/11 8:07 AM
  • Atlassian JIRA (v5.0.4#731-sha1:3aa7374)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for Codehaus. Try JIRA - bug tracking software for your team.