Archiva
  1. Archiva
  2. MRM-1005

Certain remote Maven2 artifacts require special leading slash in whitelist filter

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Cannot Reproduce
    • Affects Version/s: 1.2-M1
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Environment:
    • Number of attachments :
      0

      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.

        Issue Links

          Activity

          Hide
          b v j added a comment -

          Since MRM-902 is closed, this issue was created and linked to MRM-902

          Show
          b v j added a comment - Since MRM-902 is closed, this issue was created and linked to MRM-902
          Hide
          b v j added a comment - - edited

          The asterisks in the filter expressions got chewed up in the Jira post. Maybe an administrator can fix the whiltelist patterns in the post.

          Here's an attempt to correctly display the filter expressions by tricking Jira (through self-escaping the asterisks)

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

          SLASH-ASTERISK-ASTERISK-SLASH-ASTERISK

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

          The connector whitelist now has the following entries

          **/*
          /**/*

          Show
          b v j added a comment - - edited The asterisks in the filter expressions got chewed up in the Jira post. Maybe an administrator can fix the whiltelist patterns in the post. Here's an attempt to correctly display the filter expressions by tricking Jira (through self-escaping the asterisks) Remedy/Work-around ------------------------------- Added the following entry to the whitelist filter set: /** / * SLASH-ASTERISK-ASTERISK-SLASH-ASTERISK Remember to click "Save Proxy Connector" after defining the extra pattern/filter The connector whitelist now has the following entries ** / * /** / *
          Hide
          Brett Porter added a comment -

          it seems like this is because the request contains //, maybe we should trim leading / before evaluating the b/w lists

          Show
          Brett Porter added a comment - it seems like this is because the request contains //, maybe we should trim leading / before evaluating the b/w lists
          Hide
          Brett Porter added a comment -

          can't reproduce this on trunk

          Show
          Brett Porter added a comment - can't reproduce this on trunk

            People

            • Assignee:
              Brett Porter
              Reporter:
              b v j
            • Votes:
              1 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: