From 825716f77b4084bd5292f2a307c35b95d33a9448 Mon Sep 17 00:00:00 2001 From: Jason van Zyl Date: Mon, 10 May 2004 21:11:46 +0000 Subject: [PATCH] o adding a little hack to determine if an upload is a maven plugin or not. We need to use the but that can come post 1.0. git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@162695 13f79535-47bb-0310-9956-ffa450edef68 --- maven-meeper/src/bin/deploy-bundle | 11 ++++++++++- maven-meeper/src/bin/deploy-plugin | 22 ++++++++++++++++++++++ 2 files changed, 32 insertions(+), 1 deletion(-) create mode 100755 maven-meeper/src/bin/deploy-plugin diff --git a/maven-meeper/src/bin/deploy-bundle b/maven-meeper/src/bin/deploy-bundle index e583582bf0..c2906b5291 100755 --- a/maven-meeper/src/bin/deploy-bundle +++ b/maven-meeper/src/bin/deploy-bundle @@ -68,5 +68,14 @@ cp $BUNDLE $WORKDIR ../deploy-pom ${artifactId}-${version}.pom ${groupId} - ../deploy-jar ${artifactId}-${version}.jar ${groupId} + artifactType=`echo ${artifactId} | sed -e 's/maven-.*-plugin//'` + + if [ -z ${artifactType} ] + then + echo "Deploying Plugin ..." + ../deploy-plugin ${artifactId}-${version}.jar ${groupId} + else + echo "Deploying JAR ..." + ../deploy-jar ${artifactId}-${version}.jar ${groupId} + fi ) diff --git a/maven-meeper/src/bin/deploy-plugin b/maven-meeper/src/bin/deploy-plugin new file mode 100755 index 0000000000..64d0ade4f7 --- /dev/null +++ b/maven-meeper/src/bin/deploy-plugin @@ -0,0 +1,22 @@ +#!/bin/sh + +# Deploy JAR to the repository +# $1 : artifact to copy +# $2 : project id + +ARTIFACT=$1 +ID=$2 +ARTIFACT_TYPE=plugins +REPO=login.ibiblio.org +DIR=/public/html/maven/${ID}/${ARTIFACT_TYPE} + +echo ${DIR} + +# Make sure the target directory is present. +ssh $REPO "mkdir -p ${DIR}" + +# Copy the artifact to the repository. +scp $ARTIFACT ${REPO}:${DIR} + +# Make sure the perms are correct. Just in case +ssh $REPO "chmod 664 ${DIR}/${ARTIFACT}; chgrp maven ${DIR}/${ARTIFACT}; cd ${DIR}; md5sum ${ARTIFACT} | sed 's/ .*$//' > ${ARTIFACT}.md5; chgrp maven ${ARTIFACT}.md5"