Maven 2 & 3

Do not update metadata unless the artifact actually made it down

Details

  • Complexity:
    Intermediate
  • Number of attachments :
    0

Description

We can also have a secondary check to see that if a metadata file contains no valid versions to nuke it and try to download a valid one. This will correct anything left over from previous versions of Maven.

Issue Links

Activity

Hide
Wendy Smoak added a comment -

To reproduce (with 2.0.7):

mvn archetype:create -DgroupId=com.example -DartifactId=test
cd test

  1. build offline with clean local repo, which fails
    mvn install -Dmaven.repo.local=/path/to/tempdir -o
  2. repeat build while online-- still fails
    mvn install -Dmaven.repo.local/path/to/tempdir

Example plugin metadata file:
<?xml version="1.0" encoding="UTF-8" ?>

  • <metadata>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-resources-plugin</artifactId>
    </metadata>
Show
Wendy Smoak added a comment - To reproduce (with 2.0.7): mvn archetype:create -DgroupId=com.example -DartifactId=test cd test
  1. build offline with clean local repo, which fails mvn install -Dmaven.repo.local=/path/to/tempdir -o
  2. repeat build while online-- still fails mvn install -Dmaven.repo.local/path/to/tempdir
Example plugin metadata file: <?xml version="1.0" encoding="UTF-8" ?>
  • <metadata> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-resources-plugin</artifactId> </metadata>
Hide
Wendy Smoak added a comment -

Related to MNG-2408 which is marked fixed for 2.0.5.

Show
Wendy Smoak added a comment - Related to MNG-2408 which is marked fixed for 2.0.5.
Hide
Brian Fox added a comment -

bumping to the next version

Show
Brian Fox added a comment - bumping to the next version
Hide
Jason van Zyl added a comment -

I'm going to fix this in Maven Artifact and we can decide to use that in 2.0.9 for the fix.

Show
Jason van Zyl added a comment - I'm going to fix this in Maven Artifact and we can decide to use that in 2.0.9 for the fix.
Hide
Jason van Zyl added a comment -

In Maven Artifact we won't write out anything if we can't get hold of the actual metadata.

Show
Jason van Zyl added a comment - In Maven Artifact we won't write out anything if we can't get hold of the actual metadata.

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: