Uploaded image for project: 'Archiva'
  1. Archiva
  2. MRM-1005

Certain remote Maven2 artifacts require special leading slash in whitelist filter

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Cannot Reproduce
    • 1.2-M1
    • None
    • None
    • None

    Description

      Problem
      -------------------
      Unable to initialize/setup m2 repository with archiva as the default mirror

      Debug observation
      -----------------------------
      With log4j debug settings enabled (./apps/archiva/WEB-INF/classes/log4j.xml), hints about the problem surfaced. I did not look any further into the code to determine the exact cause of the problem.

      Here's the archiva log entry:
      -------------------------------
      2008-11-17 23:47:30,144 [btpool0-4] DEBUG org.apache.maven.archiva.proxy.DefaultRepositoryProxyConnectors - Path [/org/apache/maven/plugins/maven-metadata.xml] is not part of defined whitelist (skipping transfer from repository [Central Repository]).

      Remedy/Work-around
      -------------------------------
      Added the following to the whitelist filter set:
      /*/

      Steps to reproduce (DO NOT FOLLOW unless you're willing to lose local & archiva m2 data!)
      -------------------------------------------------------------------------------------------------------------
      1) move/hide client .m2/repository to temporary location
      2) move/hide server [archiva]/data/repositories/internal/* files and subdirectories to temporary locaton
      3) Rescan "Archiva Managed Internal Repository" - should show zero entries
      4) "Update Database Now"
      5) Make sure the "Central Repository" proxy connector whitelist only contains the default fiter: */
      6) To initialize local m2, run from client: mvn -X -e -U -up archetype:create -DgroupId=com.mycompany.app -DartifactId=my-appp

      The client throws the following:
      org.apache.maven.lifecycle.LifecycleExecutionException: The plugin 'org.apache.maven.plugins:maven-archetype-plugin' does not exist or no valid version could be found

      Remedy/Work-around
      -------------------------------
      Added the following entry to the whitelist filter set:
      /*/

      Remember to click "Save Proxy Connector" after defining the extra pattern/filter

      The connector whitelist now has the following entries

      */
      /*/

      Rerun step #6 above and the local m2 repo should build properly.

      Attachments

        Issue Links

          Activity

            People

              brett Brett Porter
              bvj b v j
              Votes:
              1 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: