From 39819a074ceffd6b4f31e5ef3692f8f4a7fca3d2 Mon Sep 17 00:00:00 2001 From: Jason van Zyl Date: Wed, 11 Oct 2006 22:19:42 +0000 Subject: git-svn-id: https://svn.apache.org/repos/asf/maven/archiva/trunk@463003 13f79535-47bb-0310-9956-ffa450edef68 --- maven-meeper/src/bin/synchronize.properties | 3 ++ maven-meeper/src/bin/synchronize.sh | 11 +++++ .../src/bin/synchronize/deploy-ibiblio-htaccess.sh | 10 ----- maven-meeper/src/bin/synchronize/ibiblio-htaccess | 47 ---------------------- .../bin/synchronize/m1-m2-mod-rewrite-rules.txt | 47 ++++++++++++++++++++++ 5 files changed, 61 insertions(+), 57 deletions(-) delete mode 100755 maven-meeper/src/bin/synchronize/deploy-ibiblio-htaccess.sh delete mode 100644 maven-meeper/src/bin/synchronize/ibiblio-htaccess create mode 100644 maven-meeper/src/bin/synchronize/m1-m2-mod-rewrite-rules.txt (limited to 'maven-meeper/src/bin') diff --git a/maven-meeper/src/bin/synchronize.properties b/maven-meeper/src/bin/synchronize.properties index 361464a32..82da23196 100644 --- a/maven-meeper/src/bin/synchronize.properties +++ b/maven-meeper/src/bin/synchronize.properties @@ -1,5 +1,8 @@ +#!/bin/sh + export CENTRAL_HOST=maven01.managed.contegix.com export TOOLS_BASE=$HOME/components/maven-meeper/src/bin export SYNC_TOOLS=$TOOLS_BASE/synchronize export SYNCOPATE=$SYNC_TOOLS/syncopate export REPOCLEAN=$TOOLS_BASE/m1-m2-conversion +export M1_M2_REWRITE_RULES=$SYNC_TOOLS/m1-m2-mod-rewrite-rules.txt diff --git a/maven-meeper/src/bin/synchronize.sh b/maven-meeper/src/bin/synchronize.sh index 87dd4e1e9..f6a6de401 100755 --- a/maven-meeper/src/bin/synchronize.sh +++ b/maven-meeper/src/bin/synchronize.sh @@ -5,6 +5,7 @@ # 2. Convert Maven 1.x repository to Maven 2.x repository # 3. Manual fixes # 4. Sync the Maven 2.x repository to Ibiblio +# 5. Copy the mod_rewrite rules to the Maven 2.x repository # ------------------------------------------------------------------------ PID=$$ @@ -65,3 +66,13 @@ echo Synchronizing to ibiblio ) retval=$?; if [ $retval != 0 ]; then exit $retval; fi +# ------------------------------------------------------------------------ +# Copy the mod_rewrite rules to the Maven 1.x repository +# ------------------------------------------------------------------------ +if [ "hostname" == $CENTRAL_HOST ]; then + cp $M1_M2_REWRITE_RULES $HOME/repository-staging/to-ibiblio/maven/.htaccess +else + scp $M1_M2_REWRITE_RULES maven@maven.org:~maven/repository-staging/to-ibiblio/maven/.htaccess +fi + +scp $M1_M2_REWRITE_RULES maven@login.ibiblio.org:/public/html/maven/.htaccess diff --git a/maven-meeper/src/bin/synchronize/deploy-ibiblio-htaccess.sh b/maven-meeper/src/bin/synchronize/deploy-ibiblio-htaccess.sh deleted file mode 100755 index bdfe41888..000000000 --- a/maven-meeper/src/bin/synchronize/deploy-ibiblio-htaccess.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/sh - -if [ "`hostname`" == $CENTRAL_HOST ]; then - cp ibiblio-htaccess $HOME/repository-staging/to-ibiblio/maven/.htaccess -else - scp ibiblio-htaccess maven@maven.org:~maven/repository-staging/to-ibiblio/maven/.htaccess -fi - -scp ibiblio-htaccess maven@login.ibiblio.org:/public/html/maven/.htaccess - diff --git a/maven-meeper/src/bin/synchronize/ibiblio-htaccess b/maven-meeper/src/bin/synchronize/ibiblio-htaccess deleted file mode 100644 index 7baa12450..000000000 --- a/maven-meeper/src/bin/synchronize/ibiblio-htaccess +++ /dev/null @@ -1,47 +0,0 @@ -## IF YOU MODIFY THIS FILE, MAKE SURE IT GETS UPDATED IN SVN - -## MAVEN 1.0.2 doesn't deal with redirects. Avoid them - -RewriteEngine on -#RewriteLog c:/home/brett/scm/codehaus/maven/maven/rewrite.log -#RewriteLogLevel 9 - -RewriteBase /maven/ - -RewriteRule org.codehaus.modello/jars/modello-plugin-dom4j-(.+).jar(.*)$ /maven2/org/codehaus/modello/modello-plugin-dom4j/$1/modello-plugin-dom4j-$1.jar$2 [L] -RewriteRule org.codehaus.modello/jars/modello-plugin-xpp3-(.+).jar(.*)$ /maven2/org/codehaus/modello/modello-plugin-xpp3/$1/modello-plugin-xpp3-$1.jar$2 [L] -RewriteRule maven/jars/dom4j-(.+).jar(.*)$ /maven2/maven/dom4j/$1/dom4j-$1.jar$2 [L] -RewriteRule dom4j/jars/dom4j-(.+).jar(.*)$ /maven2/dom4j/dom4j/$1/dom4j-$1.jar$2 [L] -RewriteRule jaxen/jars/jaxen-1.0-FCS-full.jar$ /maven2/jaxen/jaxen/1.0-FCS/jaxen-1.0-FCS-full.jar [L] -RewriteRule cactus/jars/cactus-([0-9]+)-(.+).jar$ /maven2/cactus/cactus/$1-$2/cactus-$1-$2.jar [L] -RewriteRule commons-logging/jars/commons-logging-1.1-dev.jar /maven2/commons-logging/commons-logging/1.0.4/commons-logging-1.0.4.jar [L] -RewriteRule strutstestcase/jars/strutstestcase-(.+).jar /maven2/strutstestcase/strutstestcase/$1/strutstestcase-$1.jar [L] -RewriteRule stax-utils/jars/stax-utils-snapshot-(.+).jar /maven2/stax-utils/stax-utils/snapshot-$1/stax-utils-snapshot-$1.jar [L] -RewriteRule batik/jars/batik-1.5-fop-(.+).jar /maven2/batik/batik-1.5-fop/$1/batik-1.5-fop-$1.jar [L] -RewriteRule poi/jars/poi-(.+)-final-(.+).jar /maven2/poi/poi-$1-final/$2/poi-$1-final-$2.jar [L] -RewriteRule jython/jars/jython-20020827-no-oro.jar /maven2/jython/jython/20020827/jython-20020827-no-oro.jar [L] -RewriteRule xpp3/jars/xpp3-1.1.3.4-(.+?).jar /maven2/xpp3/xpp3/1.1.3.4/xpp3-1.1.3.4-$1.jar [L] - -# rewrite // to / -#RewriteRule ^/maven//(.*) /maven/$1 -RewriteRule ^/(.*)$ /maven/$1 -#RewriteRule ^/(.*)$ /maven/$1 [R] -# rewrite mapped artifact -#RewriteRule ^(.*)(\.sha1)$ ${artifact-map:$1|$1}$2 [PT] -#RewriteRule ^(.*)(\.md5)$ ${artifact-map:$1|$1}$2 [PT] -#RewriteRule ^(.*)$ ${artifact-map:$1|$1} -# rewrite artifact -# don't translate plugins - they aren't copied in the reposync -RewriteRule ^([^/]+)/(jar|pom|config|distribution|java-source|dist|dtd|ear|ejb|license|licence|nbm|rar|sar|tld|war|xml|zip)s/([^0-9]+)-([0-9].+)\.([^0-9]+)(\.md5|\.sha1){0,1}$ r/$1/$3/$4/$3-$4.$5$6 [PT] -RewriteRule ^([^/]+)/(jar|pom|config|distribution|java-source|dist|dtd|ear|ejb|license|licence|nbm|rar|sar|tld|war|xml|zip)s/(.+)-([0-9].+)\.([^0-9]+)(\.md5|\.sha1){0,1}$ r/$1/$3/$4/$3-$4.$5$6 [PT] -# rewrite dotted groups -RewriteRule ^r/([^/]+)\.(.*)$ r/$1/$2 [PT] [N] -# final redirect -RewriteRule ^r/(.*)$ /maven2/$1 -#RewriteRule ^r/(.*)$ /maven2/$ [R] - -# rewrite for browsing -#RewriteRule ^/maven$ /maven2/ [R] -#RewriteRule ^/maven/([^/]+)/(.+)s/(.*)$ /maven2/$1/$3 [R] -#RewriteRule ^/maven/(.*)$ /maven2/$1 [R] - diff --git a/maven-meeper/src/bin/synchronize/m1-m2-mod-rewrite-rules.txt b/maven-meeper/src/bin/synchronize/m1-m2-mod-rewrite-rules.txt new file mode 100644 index 000000000..7baa12450 --- /dev/null +++ b/maven-meeper/src/bin/synchronize/m1-m2-mod-rewrite-rules.txt @@ -0,0 +1,47 @@ +## IF YOU MODIFY THIS FILE, MAKE SURE IT GETS UPDATED IN SVN + +## MAVEN 1.0.2 doesn't deal with redirects. Avoid them + +RewriteEngine on +#RewriteLog c:/home/brett/scm/codehaus/maven/maven/rewrite.log +#RewriteLogLevel 9 + +RewriteBase /maven/ + +RewriteRule org.codehaus.modello/jars/modello-plugin-dom4j-(.+).jar(.*)$ /maven2/org/codehaus/modello/modello-plugin-dom4j/$1/modello-plugin-dom4j-$1.jar$2 [L] +RewriteRule org.codehaus.modello/jars/modello-plugin-xpp3-(.+).jar(.*)$ /maven2/org/codehaus/modello/modello-plugin-xpp3/$1/modello-plugin-xpp3-$1.jar$2 [L] +RewriteRule maven/jars/dom4j-(.+).jar(.*)$ /maven2/maven/dom4j/$1/dom4j-$1.jar$2 [L] +RewriteRule dom4j/jars/dom4j-(.+).jar(.*)$ /maven2/dom4j/dom4j/$1/dom4j-$1.jar$2 [L] +RewriteRule jaxen/jars/jaxen-1.0-FCS-full.jar$ /maven2/jaxen/jaxen/1.0-FCS/jaxen-1.0-FCS-full.jar [L] +RewriteRule cactus/jars/cactus-([0-9]+)-(.+).jar$ /maven2/cactus/cactus/$1-$2/cactus-$1-$2.jar [L] +RewriteRule commons-logging/jars/commons-logging-1.1-dev.jar /maven2/commons-logging/commons-logging/1.0.4/commons-logging-1.0.4.jar [L] +RewriteRule strutstestcase/jars/strutstestcase-(.+).jar /maven2/strutstestcase/strutstestcase/$1/strutstestcase-$1.jar [L] +RewriteRule stax-utils/jars/stax-utils-snapshot-(.+).jar /maven2/stax-utils/stax-utils/snapshot-$1/stax-utils-snapshot-$1.jar [L] +RewriteRule batik/jars/batik-1.5-fop-(.+).jar /maven2/batik/batik-1.5-fop/$1/batik-1.5-fop-$1.jar [L] +RewriteRule poi/jars/poi-(.+)-final-(.+).jar /maven2/poi/poi-$1-final/$2/poi-$1-final-$2.jar [L] +RewriteRule jython/jars/jython-20020827-no-oro.jar /maven2/jython/jython/20020827/jython-20020827-no-oro.jar [L] +RewriteRule xpp3/jars/xpp3-1.1.3.4-(.+?).jar /maven2/xpp3/xpp3/1.1.3.4/xpp3-1.1.3.4-$1.jar [L] + +# rewrite // to / +#RewriteRule ^/maven//(.*) /maven/$1 +RewriteRule ^/(.*)$ /maven/$1 +#RewriteRule ^/(.*)$ /maven/$1 [R] +# rewrite mapped artifact +#RewriteRule ^(.*)(\.sha1)$ ${artifact-map:$1|$1}$2 [PT] +#RewriteRule ^(.*)(\.md5)$ ${artifact-map:$1|$1}$2 [PT] +#RewriteRule ^(.*)$ ${artifact-map:$1|$1} +# rewrite artifact +# don't translate plugins - they aren't copied in the reposync +RewriteRule ^([^/]+)/(jar|pom|config|distribution|java-source|dist|dtd|ear|ejb|license|licence|nbm|rar|sar|tld|war|xml|zip)s/([^0-9]+)-([0-9].+)\.([^0-9]+)(\.md5|\.sha1){0,1}$ r/$1/$3/$4/$3-$4.$5$6 [PT] +RewriteRule ^([^/]+)/(jar|pom|config|distribution|java-source|dist|dtd|ear|ejb|license|licence|nbm|rar|sar|tld|war|xml|zip)s/(.+)-([0-9].+)\.([^0-9]+)(\.md5|\.sha1){0,1}$ r/$1/$3/$4/$3-$4.$5$6 [PT] +# rewrite dotted groups +RewriteRule ^r/([^/]+)\.(.*)$ r/$1/$2 [PT] [N] +# final redirect +RewriteRule ^r/(.*)$ /maven2/$1 +#RewriteRule ^r/(.*)$ /maven2/$ [R] + +# rewrite for browsing +#RewriteRule ^/maven$ /maven2/ [R] +#RewriteRule ^/maven/([^/]+)/(.+)s/(.*)$ /maven2/$1/$3 [R] +#RewriteRule ^/maven/(.*)$ /maven2/$1 [R] + -- cgit v1.2.3