o moving to archiva

git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@433637 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Jason van Zyl 2006-08-22 14:00:00 +00:00
parent 5ebedbf64a
commit 42360ab766
43 changed files with 0 additions and 3562 deletions

View File

@ -1,32 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright 2005-2006 The Apache Software Foundation.
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<parent>
<artifactId>maven</artifactId>
<groupId>org.apache.maven</groupId>
<version>2.1-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>maven-meeper</artifactId>
<packaging>jar</packaging>
<name>Maven Meeper</name>
<version>0.1-SNAPSHOT</version>
<description></description>
</project>

View File

@ -1 +0,0 @@
#groupId/jars/artifactId-version.jar groupId/artifactId/version/artifactId-version.jar

View File

@ -1,24 +0,0 @@
#!/bin/sh
GROUPID=$1
basesrc=$HOME/repository-staging/pom-svn-repository
basedest=$HOME/repository-staging/to-ibiblio/maven2
if [ ! -z $GROUPID ]
then
src=$basesrc/$GROUPID
dest=$basedest/$GROUPID
else
src=$basesrc
dest=$basedest
fi
rsync -e ssh -v -rpt --exclude=.svn --exclude=updated-poms.log $src/ $dest/ > $basesrc/updated-poms.log
for f in `grep .pom $basesrc/updated-poms.log` ; do
md5sum $dest/$f > $dest/$f.md5 ;
sha1sum $dest/$f > $dest/$f.sha1;
done

View File

@ -1,7 +0,0 @@
#!/bin/sh
for i in `find -regex '.*\.jar\|.*\.pom'`
do
md5sum $i | sed 's/ .*$//' > $i.md5
chown --reference $i $i.md5
done

View File

@ -1,2 +0,0 @@
perl -p -n -i.bak -e 's/\r\n/\n/' $1
rm $1.bak

View File

@ -1,203 +0,0 @@
#!/bin/sh
BUNDLEURL=$1
GROUPID=$2
VERSION=$3
[ "${BUNDLEURL}" = "" ] && echo && echo "You must specify a bundle URL!" && echo && exit
WORKDIR=bundle.tmp
base=`basename $0`
mylocation=`which $base`
SCRIPTDIR=`dirname $mylocation`
[ -d $SCRIPTDIR ] || SCRIPTDIR=.
echo "Script directory is: ${SCRIPTDIR}"
# repo dir relative to WORKDIR
REPODIR=$HOME/repository-staging/to-ibiblio/maven
REPO2DIR=$HOME/repository-staging/to-ibiblio/maven2
rm -rf $WORKDIR > /dev/null 2>&1
mkdir $WORKDIR
cd $WORKDIR
echo "Retrieving URL: '${BUNDLEURL}'"
wget $BUNDLEURL
BUNDLE=`echo $BUNDLEURL | sed -e 's#^.*/##;'`
echo $BUNDLE
mv $BUNDLE tmp.jar
BUNDLE=tmp.jar
(
echo "Unzipping original bundle."
jar xf $BUNDLE || unzip $BUNDLE
# copy files in subdirs to workdir
echo "Copying files to working directory."
for d in `find ./* -type d` ; do
for f in `find $d -type f` ; do cp $f .; done;
done
echo "Searching for POM:"
echo "...checking for 'project.xml'"
POM=project.xml
if [ ! -f ${POM} ]
then
echo "...checking for 'pom.xml'"
POM=pom.xml
fi
if [ ! -f ${POM} ]
then
echo "...searching for **/*.pom"
POM=`find . -iname *.pom`
fi
[ "" == "${POM}" ] && echo && echo "Cannot deploy without the pom.xml or project.xml file!" && echo && exit
[ ! -f ${POM} ] && echo && echo "Cannot deploy without the pom.xml or project.xml file!" && echo && exit
echo "POM is: '${POM}'"
less $POM
$SCRIPTDIR/d2u ${POM}
if [ ! -z $VERSION ]
then
version=$VERSION
else
version=`cat ${POM} | tr '\n' ' ' | sed 's#<build>.*</build>##' | sed 's#<versions>.*</versions>##' | sed 's#<dependencies>.*</dependencies>##' | sed 's#<reporting>.*</reporting>##' | sed 's#<parent>.*</parent>##' | grep '<version>' | sed -e 's#^.*<version>##;s#</version>.*$##'`
if [ -z $version ]
then
version=`grep currentVersion ${POM} | sed -e 's#^.*<currentVersion>##;s#</currentVersion>.*$##'`
fi
fi
artifactId=`cat ${POM} | tr '\n' ' ' | sed 's#<build>.*</build>##' | sed 's#<dependencies>.*</dependencies>##' | sed 's#<contributors>.*</contributors>##' | sed 's#<dependencies>.*</dependencies>##' | sed 's#<reporting>.*</reporting>##' | sed 's#<parent>.*</parent>##' | grep '<artifactId>' | sed -e 's#^.*<artifactId>##;s#</artifactId>.*$##'`
if [ -z $artifactId ]
then
artifactId=`cat ${POM} | tr '\n' ' ' | sed 's#<build>.*</build>##' | sed 's#<versions>.*</versions>##' | sed 's#<developers>.*</developers>##' | sed 's#<dependencies>.*</dependencies>##' | sed 's#<reporting>.*</reporting>##' | sed 's#<contributors>.*</contributors>##' | sed 's#<parent>.*</parent>##' | grep '<id>' | sed -e 's#^.*<id>##;s#</id>.*$##'`
fi
if [ ! -z $GROUPID ]
then
groupId=${GROUPID}
else
groupId=`cat ${POM} | tr '\n' ' ' | sed 's#<build>.*</build>##' | sed 's#<dependencies>.*</dependencies>##' | sed 's#<reporting>.*</reporting>##' | sed 's#<parent>.*</parent>##' | grep '<groupId>' | sed -e 's#^.*<groupId>##;s#</groupId>.*$##'`
if [ -z $groupId ]
then
groupId=${artifactId}
fi
fi
version=`echo ${version} | sed -e 's/ *$//'`
artifactId=`echo ${artifactId} | sed -e 's/ *$//'`
groupId=`echo ${groupId} | sed -e 's/ *$//'`
groupDir=`echo ${groupId} | sed -e 's/\./\//g'`
maven2=`cat ${POM} | grep '<modelVersion>'`
echo
if [ ! -z "${maven2}" ]
then
echo " ========= MAVEN 2 ========= "
fi
echo
echo " version: [${version}]"
echo " groupId: [${groupId}]"
echo "artifactId: [${artifactId}]"
echo
if [ -d $REPO2DIR/${groupDir} ]
then
echo "The group already exists"
else
echo "The group does NOT already exist"
fi
echo
echo -n Hit Enter to continue or Ctrl-C to abort...
read
LIC=LICENSE.txt
# A little help for manually created upload bundles
[ -f license.txt ] && mv license.txt $LIC
if [ -f $LIC ]
then
$SCRIPTDIR/d2u $LIC
mkdir -p $REPODIR/${groupId}/licenses
cp -i $LIC $REPODIR/${groupId}/licenses/${artifactId}-${version}.license
fi
cp ${POM} ${artifactId}-${version}.pom
m2dir=$REPO2DIR/${groupDir}/${artifactId}/${version}
mkdir -p ${m2dir}
mkdir -p $REPODIR/${groupId}/poms
cp -i ${artifactId}-${version}.pom $REPODIR/${groupId}/poms
if [ ! -z "${maven2}" ]
then
cp -i ${artifactId}-${version}.pom ${m2dir}
md5sum ${m2dir}/${artifactId}-${version}.pom > ${m2dir}/${artifactId}-${version}.pom.md5
sha1sum ${m2dir}/${artifactId}-${version}.pom > ${m2dir}/${artifactId}-${version}.pom.sha1
fi
artifactType=`echo ${artifactId} | sed -e 's/maven-.*-plugin//'`
if [ -z ${artifactType} ]
then
echo "Deploying Plugin ..."
mkdir -p $REPODIR/${groupId}/plugins
cp -i ${artifactId}-${version}.jar $REPODIR/${groupId}/plugins
else
echo "Deploying JAR ..."
mkdir -p $REPODIR/${groupId}/jars
cp -i ${artifactId}-${version}.jar $REPODIR/${groupId}/jars
cp -i ${artifactId}-${version}.jar ${m2dir}
if [ -f ${m2dir}/${artifactId}-${version}.jar ]
then
md5sum ${m2dir}/${artifactId}-${version}.jar > ${m2dir}/${artifactId}-${version}.jar.md5
sha1sum ${m2dir}/${artifactId}-${version}.jar > ${m2dir}/${artifactId}-${version}.jar.sha1
fi
fi
if [ -f ${artifactId}-${version}-sources.jar ]
then
echo "Deploying Java sources ..."
mkdir -p $REPODIR/${groupId}/java-sources
cp -i ${artifactId}-${version}-sources.jar $REPODIR/${groupId}/java-sources
cp -i ${artifactId}-${version}-sources.jar ${m2dir}
md5sum ${m2dir}/${artifactId}-${version}-sources.jar > ${m2dir}/${artifactId}-${version}-sources.jar.md5
sha1sum ${m2dir}/${artifactId}-${version}-sources.jar > ${m2dir}/${artifactId}-${version}-sources.jar.sha1
else
echo "No Java sources available in upload bundle, skipping ..."
fi
if [ -f ${artifactId}-${version}-javadoc.jar ]
then
echo "Deploying Javadocs ..."
mkdir -p $REPODIR/${groupId}/javadoc
cp -i ${artifactId}-${version}-javadoc.jar $REPODIR/${groupId}/javadoc
cp -i ${artifactId}-${version}-javadoc.jar ${m2dir}
md5sum ${m2dir}/${artifactId}-${version}-javadoc.jar > ${m2dir}/${artifactId}-${version}-javadoc.jar.md5
sha1sum ${m2dir}/${artifactId}-${version}-javadoc.jar > ${m2dir}/${artifactId}-${version}-javadoc.jar.sha1
else
echo "No Javadocs available in upload bundle, skipping ..."
fi
)

View File

@ -1,10 +0,0 @@
#!/bin/sh
if [ "`hostname`" == "maven01.managed.contegix.com" ]; 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

View File

@ -1,45 +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 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]

View File

@ -1,27 +0,0 @@
#!/bin/bash
dest=/home/maven/repository-staging/to-ibiblio
rsync -e ssh --delete --max-delete=10 -v -riplt $dest/maven2/ login.ibiblio.org:/public/html/maven2
date > $dest/maven2/last-sync.txt
chmod a+r $dest/maven2/last-sync.txt
# NO MORE m1 SYNC
#date > $dest/maven/last-sync.txt
#chmod a+r $dest/maven/last-sync.txt
#rsync -e ssh --delete --max-delete=10 -v -riplt $dest/maven/ login.ibiblio.org:/public/html/maven
# EXCEPT FOR PLUGINS
# TODO - FIX
rsync -e ssh --delete --max-delete=10 -v -riplt $dest/maven/ login.ibiblio.org:/public/html/maven
#(
#cd $dest/maven
#rsync -n -e ssh --delete --max-delete=10 -v -riplt --include='*/plugins/*' ./ login.ibiblio.org:/public/html/maven
#for i in */plugins
#do
#rsync -e ssh --delete --max-delete=10 -v -riplt $i login.ibiblio.org:/public/html/maven/$i
#done
#)

View File

@ -1,9 +0,0 @@
#!/bin/bash
dest=/home/maven/repository-staging/to-ibiblio
#-a = -rlptgoD
rsync -e ssh -v -ript login.ibiblio.org:/public/html/maven/ $dest/maven
rsync -e ssh -v -ript login.ibiblio.org:/public/html/maven2/ $dest/maven2
find -user $USER | xargs chmod g+rw

View File

@ -1,9 +0,0 @@
#!/bin/sh
FROM=mavensync@repository.codehaus.org:/repository/
TO=.
SSH_OPTS="-i $HOME/.ssh/new-id_dsa"
#RSYNC_OPTS="-L"
## NOTE that codehaus only honours some rsync options. Others may be summarily discarded and/or cause the rsync to break - check
## with them if changing them

View File

@ -1,4 +0,0 @@
#!/bin/sh
FROM=carlossg@shell.sourceforge.net:/home/groups/d/di/displaytag/htdocs/m2repo/displaytag/
TO=displaytag/

View File

@ -1,8 +0,0 @@
#!/bin/sh
# Contact: Nathan Hamblen nathan@technically.us
FROM=rsync://databinder.net/maven/net/databinder/
TO=net/databinder/
NO_SSH=true

View File

@ -1,4 +0,0 @@
#!/bin/sh
FROM=carlossg@shell.sourceforge.net:/home/groups/j/jw/jwebunit/htdocs/m2-repo/net/sourceforge/jwebunit/
TO=net/sourceforge/jwebunit/

View File

@ -1,4 +0,0 @@
#!/bin/sh
FROM=carlossg@shell.sourceforge.net:/home/groups/m/ma/maven-taglib/htdocs/m2repo/net/sourceforge/maven-taglib/
TO=net/sourceforge/maven-taglib/

View File

@ -1,4 +0,0 @@
#!/bin/sh
FROM=carlossg@shell.sourceforge.net:/home/groups/a/ac/acegisecurity/htdocs/repository/releases/org/acegisecurity/
TO=org/acegisecurity/

View File

@ -1,4 +0,0 @@
#!/bin/sh
FROM=jvanzyl@people.apache.org:/www/people.apache.org/repo/m2-ibiblio-rsync-repository/org/apache/
TO=org/apache/

View File

@ -1,4 +0,0 @@
#!/bin/sh
FROM=rsync@jetty.mortbay.org:maven2/release/org/mortbay/
TO=org/mortbay/

View File

@ -1,4 +0,0 @@
#!/bin/sh
FROM=maven@forge.objectweb.org:../../groups/maven/htdocs/maven2/org/objectweb/
TO=org/objectweb/

View File

@ -1,4 +0,0 @@
#!/bin/sh
FROM=carlossg@shell.sourceforge.net:/home/groups/w/wi/wicket/htdocs/maven2/wicket/
TO=wicket/

View File

@ -1,61 +0,0 @@
#!/bin/sh
echo This script is very temporary. Please validate all input files in the source repository before blindly copying them in.
echo Ensure all artifacts have a valid POM.
echo This will be removed when the repository manager is in place.
echo
echo
echo For a better explanation of the output flags please check --itemize-changes at rsync man page
echo
if [ "$1" == "go" ]; then
echo Doing sync for real
else
echo Not syncing
RSYNC_OPTS="$RSYNC_OPTS -n"
fi
BASEDIR=$HOME/repository-staging/to-ibiblio/maven2
CHANGED_LOG=/tmp/sync-changed.log
rm $CHANGED_LOG
for f in `find conf -iname "*.sh"`
do
FROM=
TO=
NO_SSH=
SSH_OPTS=
RSYNC_SSH=
source $f
if [ -z $NO_SSH ]
then
if [ -z $SSH_OPTS ]
then
RSYNC_SSH="-e ssh"
else
RSYNC_SSH="-e \"ssh $SSH_OPTS\""
fi
fi
echo "Syncing $FROM -> $TO"
rsync --include=*/ --include=**/maven-metadata.xml* --exclude=* --exclude-from=$HOME/components/maven-meeper/src/bin/syncopate/exclusions.txt $RSYNC_OPTS -Lrtivz $RSYNC_SSH $FROM $BASEDIR/$TO
rsync --exclude-from=$HOME/components/maven-meeper/src/bin/syncopate/exclusions.txt --ignore-existing $RSYNC_OPTS -Lrtivz $RSYNC_SSH $FROM $BASEDIR/$TO
# check for changed files
rsync -n --exclude=**/maven-metadata.xml* --exclude-from=$HOME/components/maven-meeper/src/bin/syncopate/exclusions.txt --existing $RSYNC_OPTS -Lrtivzc $RSYNC_SSH $FROM $BASEDIR/$TO >> $CHANGED_LOG
done
echo "*******************************************************************************"
echo "******************************* CHANGED FILES *******************************"
echo "*******************************************************************************"
cat $CHANGED_LOG
echo "*******************************************************************************"
echo "*******************************************************************************"
echo "*******************************************************************************"

View File

@ -1,18 +0,0 @@
#!/bin/sh
set -x
svnlook=/usr/local/subversion/bin/svnlook
repos=$HOME/repository-staging/to-ibiblio/maven2
# TODO: handle deletions
$svnlook changed -r $2 $1 | egrep '\.pom$' | while read t1 t2
do
file=$repos/`echo $t2 | sed 's/^repository\///'`
mkdir -p `dirname $file`
$svnlook cat -r $2 $1 $t2 >$file
sha1sum $file >$file.sha1
md5sum $file >$file.md5
chgrp maven $file $file.md5 $file.sha1
done

View File

@ -1,23 +0,0 @@
#!/bin/bash
dir=/home/maven/repository-staging/to-ibiblio
repocleanhome=$HOME/repository-tools/repoclean
log=$repocleanhome/last-changes-java.net.log
src=maven2-repoclean-java.net/com/sun
dst=maven2/com/sun
cd $dir/maven-java.net
cvs update -P
$repocleanhome/repoclean.sh ~/components/maven-meeper/src/bin/repoclean/java.net/synchronize.properties
rsync --ignore-existing -rvpl $dir/$src/ $dir/$dst/ > $log
for f in `cat $log | grep maven-metadata.xml$` ; do
md5sum $dir/$dst/$f > $dir/$dst/$f.md5;
sha1sum $dir/$dst/$f > $dir/$dst/$f.sha1;
md5sum $dir/$src/$f > $dir/$src/$f.md5;
sha1sum $dir/$src/$f > $dir/$src/$f.sha1;
done

View File

@ -1,27 +0,0 @@
# [REQUIRED OPTIONS]
sourceRepositoryPath=/home/maven/repository-staging/to-ibiblio/maven-java.net
targetRepositoryPath=/home/maven/repository-staging/to-ibiblio/maven2-repoclean-java.net
reportsPath=/home/maven/repository-staging/to-ibiblio/reports/repoclean
blacklistedPatterns=**/*.pom
reportOnly=false
reportWarnings=false
errorReport.mailOnError=true
errorReport.fromName=REPOCLEAN
errorReport.fromAddress=maven@codehaus.org
errorReport.toName=Maven Developer List
errorReport.toAddress=notifications@maven.apache.org
errorReport.subject=[REPOCLEAN] Error(s) occurred while converting repository
errorReport.link=http://www.maven.org/reports/repoclean/#date/repository.report.txt
# [DEFAULT VALUE: legacy]
#sourceRepositoryLayout=[legacy|default]
# [DEFAULT VALUE: v3]
#sourcePomType=[v3|v4]
# [DEFAULT VALUE: default]
#targetRepositoryLayout=[legacy|default]

View File

@ -1,19 +0,0 @@
#!/bin/bash
dir=/home/maven/repository-staging/to-ibiblio
repocleanhome=$HOME/repository-tools/repoclean
log=$repocleanhome/last-changes.log
src=maven2-repoclean
dst=maven2
$repocleanhome/repoclean.sh ~/components/maven-meeper/src/bin/repoclean/synchronize.properties
rsync --ignore-existing -rvpl $dir/$src/ $dir/$dst/ > $log
for f in `cat $log | grep maven-metadata.xml$` ; do
md5sum $dir/$dst/$f > $dir/$dst/$f.md5;
sha1sum $dir/$dst/$f > $dir/$dst/$f.sha1;
md5sum $dir/$src/$f > $dir/$src/$f.md5;
sha1sum $dir/$src/$f > $dir/$src/$f.sha1;
done

View File

@ -1,27 +0,0 @@
# [REQUIRED OPTIONS]
sourceRepositoryPath=/home/maven/repository-staging/to-ibiblio/maven
targetRepositoryPath=/home/maven/repository-staging/to-ibiblio/maven2-repoclean
reportsPath=/home/maven/repository-staging/to-ibiblio/reports/repoclean
blacklistedPatterns=**/*.pom,**/activation/**,**/javamail/**,**/jaxm/**,**/jaxp/**,**/jaxrpc/**,**/jca/**,**/jce/**,**/jdbc/**,**/jdo/**,**/jms/**,**/jndi/**,**/saaj/**
reportOnly=false
reportWarnings=false
errorReport.mailOnError=true
errorReport.fromName=REPOCLEAN
errorReport.fromAddress=maven@codehaus.org
errorReport.toName=Maven Developer List
errorReport.toAddress=notifications@maven.apache.org
errorReport.subject=[REPOCLEAN] Error(s) occurred while converting repository
errorReport.link=http://www.maven.org/reports/repoclean/#date/repository.report.txt
# [DEFAULT VALUE: legacy]
#sourceRepositoryLayout=[legacy|default]
# [DEFAULT VALUE: v3]
#sourcePomType=[v3|v4]
# [DEFAULT VALUE: default]
#targetRepositoryLayout=[legacy|default]

View File

@ -1,24 +0,0 @@
RewriteEngine on
#RewriteLog rewrite.log
#RewriteLogLevel 9
RewriteMap artifact-map txt:/home/projects/maven/components/maven-meeper/src/bin/artifact-map.txt
# rewrite // to /
RewriteRule ^/maven//(.*) /maven/$1
# rewrite mapped artifact
RewriteRule ^/maven/(.*)(\.sha1) /maven/${artifact-map:$1|$1}$2
RewriteRule ^/maven/(.*)(\.md5) /maven/${artifact-map:$1|$1}$2
RewriteRule ^/maven/(.*) /maven/${artifact-map:$1|$1}
# rewrite artifact
RewriteRule ^/maven/([^/]+)/(.+)s/(.+)-([0-9].+)\.([^0-9]+)(\.md5|\.sha1){0,1}$ /r/$1/$3/$4/$3-$4.$5$6
# rewrite dotted groups
RewriteRule ^/r/([^/]+)\.(.*)$ /r/$1/$2 [N]
# final redirect
#RewriteRule ^/r/(.*)$ /maven2/$1 [R]
RewriteRule ^/r/(.*)$ /maven2/$1
# rewrite for browsing
RewriteRule ^/maven$ /maven2/ [R]
RewriteRule ^/maven/([^/]+)/(.+)s/(.*)$ /maven2/$1/$3 [R]
RewriteRule ^/maven/(.*)$ /maven2/$1 [R]

View File

@ -1,49 +0,0 @@
#!/bin/sh
PID=$$
RUNNING=`ps -ef | grep synchronize.sh | grep -v 'sh -c' | grep -v grep | grep -v $PID`
if [ ! -z "$RUNNING" ]; then
echo Sync already running... exiting
echo $RUNNING
exit 1
fi
TOOLS_BASE=$HOME/components/maven-meeper/src/bin
echo Running Syncopate
(
cd $TOOLS_BASE/syncopate
./sync
retval=$?; if [ $retval != 0 ]; then exit $retval; fi
)
retval=$?; if [ $retval != 0 ]; then exit $retval; fi
echo Running repoclean
(
$TOOLS_BASE/repoclean/sync-repoclean.sh
retval=$?; if [ $retval != 0 ]; then exit $retval; fi
)
retval=$?; if [ $retval != 0 ]; then exit $retval; fi
echo Removing commons-logging 1.1-dev
# hack prevent commons-logging-1.1-dev
CL=$HOME/repository-staging/to-ibiblio/maven2/commons-logging/commons-logging
rm -rf $CL/1.1-dev
grep -v 1.1-dev $CL/maven-metadata.xml > $CL/maven-metadata.xml.tmp
mv $CL/maven-metadata.xml.tmp $CL/maven-metadata.xml
md5sum $CL/maven-metadata.xml > $CL/maven-metadata.xml.md5
sha1sum $CL/maven-metadata.xml > $CL/maven-metadata.xml.sha1
echo Synchronizing to ibiblio
(
cd $TOOLS_BASE/ibiblio-sync
./synchronize-codehaus-to-ibiblio.sh
retval=$?; if [ $retval != 0 ]; then exit $retval; fi
)
retval=$?; if [ $retval != 0 ]; then exit $retval; fi

File diff suppressed because it is too large Load Diff

View File

@ -1,10 +0,0 @@
[info]
id = apache
name = Apache Software Foundation
#contact = repository@apache.org
contact = carlos@apache.org
[host]
address=people.apache.org
directory=/www/people.apache.org/repo/m1-ibiblio-rsync-repository
rsyncUser=jvanzyl

View File

@ -1,10 +0,0 @@
[info]
id = codehaus
name = Codehaus
contact = carlos@apache.org
[host]
address=repository.codehaus.org
directory=/dist
rsyncUser=mavensync
identity=/home/maven/.ssh/new-id_dsa

View File

@ -1,10 +0,0 @@
[info]
id = maven-plugins-sf
name = Maven Plugins @ SourceForge
#contact = maven-plugins-developer@lists.sourceforge.net
contact = carlos@apache.org
[host]
address=shell.sourceforge.net
directory=/home/groups/m/ma/maven-plugins/htdocs/repository
rsyncUser=brettporter

View File

@ -1,8 +0,0 @@
[info]
id = mortbay
name = Mortbay Consulting
contact = gregw@mortbay.com
[host]
address=jetty.mortbay.org
directory=maven

View File

@ -1,9 +0,0 @@
[info]
id = objectweb
name = ObjectWeb
contact = xavier.moghrabi@objectweb.org
[host]
address=forge.objectweb.org
directory=../../groups/maven/htdocs/maven1
rsyncUser=maven

View File

@ -1,10 +0,0 @@
[info]
id = opensymphony
name = Open Symphony
#contact = christopher.pearson@formicary.net
contact = carlos@apache.org
[host]
address=opensymphony.com
directory=/home/ibiblio/repository
rsyncUser=ibiblio

View File

@ -1,9 +0,0 @@
[info]
id = osjava
name = OS Java
contact = bayard@generationjava.com
[host]
address=www.osjava.org
directory=/home/sites/org.osjava/dist/maven
options=--exclude=".svn" --exclude="README.txt" --exclude="_templates"

View File

@ -1,10 +0,0 @@
[info]
id = ibiblio
name = Ibiblio staging area
contact = jason@maven.org
batchDisabled = true
[host]
address=beaver.codehaus.org
directory=~/ibiblio-sync/repository
rsyncUser=maven

View File

@ -1,12 +0,0 @@
[info]
id = codehaus
name = Codehaus
contact = jason@maven.org
batchDisabled = true
[host]
address=beaver.codehaus.org
#directory=~/testRepo
directory=/dist
rsyncUser=rsync
repoDirectory=testRepo

View File

@ -1,10 +0,0 @@
.htaccess
**/.*
**/distributions
**SNAPSHOT*
**snapshot*
**-dev.*
**-DEV.*
**/dist
**-200*
README.txt

View File

@ -1,299 +0,0 @@
#!/usr/bin/perl
use strict;
use IniFiles;
use Net::SMTP;
my $configuration = new Config::IniFiles( -file => "syncopate.conf" );
my $globalRepoDirectory = $configuration->val( "syncopate", "repoDirectory" );
my $repoDirectory = $configuration->val( "syncopate", "repoDirectory" );
my $standardOptions = $configuration->val( "syncopate", "options" );
my $rsyncUser = $configuration->val( "syncopate", "rsyncUser" );
my $reportDirectory = $configuration->val( "syncopate", "reportDirectory" );
my $smtpServer = $configuration->val( "syncopate", "smtpServer" );
my $reportUrl = $configuration->val( "syncopate", "reportUrl" );
if ( defined( $ARGV[0] ) )
{
my $sourceConfiguration = new Config::IniFiles( -file => "conf/$ARGV[0]" . ".conf" );
syncSource( $sourceConfiguration );
}
else
{
syncSources();
}
# -----------------------------------------------------------------------------
#
#
# -----------------------------------------------------------------------------
sub syncSources
{
my @sources = glob( "conf/*.conf" );
for my $source (@sources)
{
my $sourceConfiguration = new Config::IniFiles( -file => $source );
my $batchDisabled = $sourceConfiguration->val( "info", "batchDisabled" );
if ( not defined( $batchDisabled ) )
{
syncSource( $sourceConfiguration );
}
}
}
# -----------------------------------------------------------------------------
#
#
# -----------------------------------------------------------------------------
sub syncSource()
{
my $sourceConfiguration = shift;
print "Syncing " . $sourceConfiguration->val( "info", "name" ) . "\n";
my $address = $sourceConfiguration->val( "host", "address" );
my $directory = $sourceConfiguration->val( "host", "directory" );
my $options = $sourceConfiguration->val( "host", "options" );
my $rsyncUser = $configuration->val( "syncopate", "rsyncUser" );
my $identity = $configuration->val( "syncopate", "identity" );
if ( $sourceConfiguration->val( "host", "rsyncUser" ) )
{
$rsyncUser = $sourceConfiguration->val( "host", "rsyncUser" );
}
if ( $sourceConfiguration->val( "host", "identity" ) )
{
$identity = "-i " . $sourceConfiguration->val( "host", "identity" );
}
if ( $sourceConfiguration->val( "host", "repoDirectory" ) )
{
$repoDirectory = $sourceConfiguration->val( "host", "repoDirectory" );
}
my $cmd = "rsync $standardOptions $options --rsh=\"ssh -oBatchMode=yes $identity -T -l $rsyncUser\" $address:$directory/ $repoDirectory";
runRsync( $cmd, $sourceConfiguration );
$repoDirectory = $globalRepoDirectory;
}
# -----------------------------------------------------------------------------
#
#
# -----------------------------------------------------------------------------
sub runRsync()
{
my $cmd = shift;
my $sourceConfiguration = shift;
# -------------------------------------------------------------------------
# Now we want to run rsync and generate a small xdoc which describes the
# syncronization that just occurred.
# -------------------------------------------------------------------------
my $id = $sourceConfiguration->val( "info", "id" );
my $name = $sourceConfiguration->val( "info", "name" );
my $reportName = "Synchronization report for " . $name;
my @date = date();
my $date = $date[0] . "-" . $date[1] . "-" . $date[2];
my $dir = $date;
$dir =~ s/-/\//g;
$dir = $id . "/" . $dir;
my $rdir = $reportDirectory . "/" . $dir;
system( "mkdir -p $rdir > /dev/null 2>&1" );
my $base = $id . "-" . $date[0] . $date[1] . $date[2] . "-" . $date[3] . $date[4] . $date[5];
my $xmlReport = $rdir . "/" . $base . ".xml";
my $rawReport = $rdir . "/" . $base . ".txt";
open( REPORT, "> $xmlReport" );
open( RAW_REPORT, "> $rawReport" );
print REPORT "<document>" . "\n";
print REPORT "<properties>" . "\n";
print REPORT "<author>meeper</author>" . "\n";
print REPORT "<title>$reportName</title>" . "\n";
print REPORT "</properties>" . "\n";
print REPORT "<body>" . "\n";
print REPORT "<section name=\"$reportName\">" . "\n";
print REPORT "<table>" . "\n";
print REPORT "<tr>" . "\n";
print REPORT "<th>Artifact</th>" . "\n";
print REPORT "<th>Size (in bytes)</th>" . "\n";
print REPORT "<th>Date</th>" . "\n";
print REPORT "</tr>" . "\n";
open( SYNC, "$cmd 2>&1 |" );
my $rawReportText;
while( <SYNC> )
{
# --------------------------------------------------------------------
# We have a line that tells us about an artifact that was synced.
# --------------------------------------------------------------------
if ( /^artifact/ )
{
my @details = split;
print REPORT "<tr>" . "\n";
print REPORT "<td>" . $details[1] . "</td>" . "\n";
print REPORT "<td>" . $details[2] . "</td>" . "\n";
print REPORT "<td>" . $details[3] . " " . $details[4] . "</td>" . "\n";
print REPORT "</tr>" . "\n";
}
else
{
$rawReportText = $rawReportText . $_;
print RAW_REPORT;
}
}
print REPORT "</table>" . "\n";
print REPORT "<p><a href=\"$rawReport\">Raw report</a></p>";
print REPORT "</section>" . "\n";
print REPORT "</body>" . "\n";
print REPORT "</document>" . "\n";
close( REPORT );
close( RAW_REPORT );
if ( $rawReportText )
{
$rawReportText = $rawReportText . "\n\nYou can view the syncronization reports for today here: \n\n";
$rawReportText = $rawReportText . $reportUrl . "/" . $dir;
notify( $sourceConfiguration, $reportName, $rawReportText );
}
}
sub date
{
my $second;
my $minute;
my $hour;
my $day;
my $month;
my $year;
($second, $minute,$hour,$day, $month, $year) = (localtime)[0..5];
$year = $year + 1900; #got 2004
$month = $month + 1;
$second = $second + 1;
$minute = $minute + 1;
$hour = $hour + 1;
if ( $second <= 9 )
{
$second = "0".$second;
}
if ( $minute <= 9 )
{
$minute = "0".$minute;
}
if ( $hour <= 9 )
{
$hour = "0".$hour;
}
if ( $day <= 9 )
{
$day = "0".$day;
}
if ( $month <= 9)
{
$month = "0".$month;
}
return ($year,$month,$day,$hour,$minute,$second);
}
sub notify()
{
my $sourceConfiguration = shift;
my $subject = shift;
my $text = shift;
my $smtp = new Net::SMTP( $smtpServer );
$smtp->mail( "meeper\@maven.org" );
$smtp->to( $sourceConfiguration->val( "info", "contact" ) );
$smtp->data();
$smtp->datasend( "Subject: $subject\n" );
$smtp->datasend( "From: meeper\@maven.org\n" );
$smtp->datasend( "\n" );
$smtp->datasend( $text );
$smtp->dataend();
$smtp->quit();
}

View File

@ -1,8 +0,0 @@
[syncopate]
repoDirectory=/home/maven/repository-staging/to-ibiblio/maven
options=--log-format="artifact %f %l %t" -rvt -L --size-only --exclude-from=$HOME/components/maven-meeper/src/bin/syncopate/exclusions.txt
rsyncUser=rsync
reportUrl=http://test.maven.codehaus.org/reports/syncopate
reportDirectory=/home/maven/repository-staging/to-ibiblio/reports/syncopate
smtpServer=localhost

View File

@ -1,8 +0,0 @@
#!/bin/sh
src=$HOME/repository-staging/pom-svn-repository
dest=$HOME/repository-staging/to-ibiblio/maven2
svn update $src
./copy-updated-poms.sh

View File

@ -1,110 +0,0 @@
---
Maven Repository Synchronization Refactor: Summary of Changes
---
John Casey
---
2005-April-06
---
Summary of Changes for the Maven Repository Synchronization Process
*Abstract
In order to support the impending release of maven2 from a production-ready
repository on ibiblio.org, several things had to be changed. Most importantly,
we had to somehow find a way to synchronize the maven1 repository and feeds
with maven2's repository, and find a way to integrate this conversion process
with the synchronization already taking place on beaver.codehaus.org.
What follows is a description of the changes I made to the original maven1
synchronization process in order to accommodate maven2's release.
*Conversion
First, we needed a reliable tool to convert a maven1 repository into a maven2
repository. There are several tasks involved in this process:
[[1]] Parsing artifact paths for artifact information.
[[2]] Moving artifacts from source repo to target repo, reformatting the
relative artifact paths along the way (to conform with the new repo
layout for m2).
[[3]] Translating m1 POMs into m2 POMs, and creating skeletal POMs where they
were missing, using the artifact information parsed in [1] above.
[[4]] Repairing and/or moving MD5 checksums for each artifact from source to
target repository.
[[5]] Preserving a good log of errors encountered during the conversion
process, for later auditing.
Since I had limited time with which to implement a solution, and didn't have
much familiarity with pre-existing repository conversion tools made by Carlos
et al. I decided to design my own solution to the problem, and worry about
merging with other tools later.
The solution I have created is called repoclean, and can be found in
<<<maven-components/sandbox/repoclean>>>. It's a plexus application, with some
basic bash shell scripts used to install and run the application. The steps
enumerated above were implemented as separate components, then stitched
together with a Main class and controller component which serves as the entry
point for Main.
As a final point, the reporting takes place both at the entire-process level
for operations such as artifact discovery, and at the per-artifact level. A
report is only written in the event of an error or warning, and per-artifact
reports are mentioned in the entire-process report if they contained an error.
In the event that an error was detected, the entire-process report should be
mailed to the m2-dev list with a subject similar to: <<[REPOCLEAN] Error(s)
occurred while converting the repository>>. Other reports can be found in the
reports directory of the sync work directory (mentioned below).
*Synchronization
Now, the synchronization process as-is was only maintaining a maven1 repository
from a set of feeds. In order to refactor this into a maintenance process for
both maven1 and maven2 repositories, I had to make a few minor changes.
In order to aid in understanding this process, I moved the tools suite into
$HOME/repository-tools. I moved the synchronization work directory (the
directory into which all feeds will copy, and which the outbound rsync will
use as a source) into $HOME/repository-staging. The tools suite (in
$HOME/repository-tools) does NOT contain the only copy of syncopate and the
outbound rsync script, only the copies I made and modified for the new
synchronization process...this was an insurance policy made to allow rollback.
As I said, I made some minor changes to the existing process. These mainly
consisted of reconfiguring syncopate and the outbound rsync script to use the
new directory structures, along with adding a control script which would be
called from cron, and which would inject a call to repoclean into the middle
of the process. The new controller script was used to consolidate all
synchronization logic into the repository-tools directory, and expose it all
equally as scripts to be maintained as a unit. Now, the crontab entry is very
simple, only referencing the controller script.
The new synchronization process executes the following operations:
[[1]] Run syncopate to collect new artifacts from the feeder repositories.
<<Syncopate location:>> $HOME/repository-tools/syncopate
<<Target repository location:>> $HOME/repository-staging/to-ibiblio/maven
[[2]] Run repoclean to convert any new added or updated artifacts to the
maven2 repository work directory.
<<Repoclean location:>> $HOME/repository-tools/repoclean
<<Source repository location:>> $HOME/repository-staging/to-ibiblio/maven
<<Target repository location:>> $HOME/repository-staging/to-ibiblio/maven2
[[3]] Run the rsync to ibiblio.
<<Rsync script location:>> $HOME/repository-tools/ibiblio-sync/synchronize-codehaus-to-ibiblio.sh
<<*NOTE:>> This is accomplished as two separate rsync operations, to
avoid unwanted directories being added to the outbound rsync (which
would land in /public/html on ibiblio...a big no-no).
All of the old synchronization stuff is still in place, with the exception of
the old version of the canonical repositories, which were removed to keep our
space usage to a minimum on beaver.codehaus.org.