Maven 2 & 3

Maven creates empty plugin metadata during offline mode, causing successive online builds to fail

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Cannot Reproduce
  • Affects Version/s: 2.0.7
  • Fix Version/s: 2.0.9
  • Labels:
    None
  • Number of attachments :
    0

Description

Cd to any Maven project that's lying around, then do this:

rm -rf ~/.m2/repository/org/apache/maven/plugins/maven-clean-plugin
mvn -o clean

This fails, as expected, because the maven-clean-plugin doesn't exist locally. Now try this:

mvn clean

Even though now Maven is online, it still fails with the same error. No download is attempted (unless I add -U.)

This is because even in the offline mode, Maven creates ~/.m2/repository/org/apache/maven/plugins/maven-clean-plugin and put empty repository metadata. This causes the later online Maven build to believe that the repository was checked and no plugin was found there.

Maven shouldn't create an empty repository metadata in the local repository if In the offline mode.

Issue Links

Activity

Hide
Brett Porter added a comment -

I believe this was fixed in 2.0.9

Show
Brett Porter added a comment - I believe this was fixed in 2.0.9

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: