Uploaded image for project: 'Maven'
  1. Maven
  2. MNG-3312

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

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Cannot Reproduce
    • 2.0.7
    • None
    • None

    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.

      Attachments

        Issue Links

          Activity

            People

              brett Brett Porter
              kohsuke Kohsuke Kawaguchi
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: