aboutsummaryrefslogtreecommitdiffstats
path: root/maven-meeper/src/bin/bundle-upload/deploy-bundle
diff options
context:
space:
mode:
authorBrett Porter <brett@apache.org>2007-11-11 15:24:11 +0000
committerBrett Porter <brett@apache.org>2007-11-11 15:24:11 +0000
commitf08f740984e8e41b64bcbe85ebca04778ca6aa39 (patch)
tree2d3d9e3292e1ac288f1b956a53e471346b8620e6 /maven-meeper/src/bin/bundle-upload/deploy-bundle
parenta2d82e7cbefa6ccd3a79f891c7539bbd836d5c0c (diff)
downloadarchiva-f08f740984e8e41b64bcbe85ebca04778ca6aa39.tar.gz
archiva-f08f740984e8e41b64bcbe85ebca04778ca6aa39.zip
move tools
git-svn-id: https://svn.apache.org/repos/asf/maven/archiva/trunk@593906 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'maven-meeper/src/bin/bundle-upload/deploy-bundle')
-rwxr-xr-xmaven-meeper/src/bin/bundle-upload/deploy-bundle208
1 files changed, 0 insertions, 208 deletions
diff --git a/maven-meeper/src/bin/bundle-upload/deploy-bundle b/maven-meeper/src/bin/bundle-upload/deploy-bundle
deleted file mode 100755
index 59f3bbacc..000000000
--- a/maven-meeper/src/bin/bundle-upload/deploy-bundle
+++ /dev/null
@@ -1,208 +0,0 @@
-#!/bin/sh
-
-BUNDLEURL=$1
-GROUPID=$2
-VERSION=$3
-
-[ "${BUNDLEURL}" = "" ] && echo && echo "You must specify a bundle URL!" && echo && exit
-
-WORKDIR=bundle.tmp
-
-SCRIPTDIR=`dirname ${0}`
-
-[ -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}'"
- dos2unix ${POM}
- less $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}
-
- if [ -z "${maven2}" ]
- then
- # Maven 1
- mkdir -p $REPODIR/${groupId}/poms
- cp -i ${artifactId}-${version}.pom $REPODIR/${groupId}/poms
- else
- # Maven 2
- 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 ..."
-
- if [ -z "${maven2}" ]
- then
- # Maven 1
- mkdir -p $REPODIR/${groupId}/jars
- cp -i ${artifactId}-${version}.jar $REPODIR/${groupId}/jars
- fi
-
- 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
-
-)