o just adding some catches for cleanup and converting the POM to unix

format before swizzling it.


git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@162694 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Jason van Zyl 2004-05-10 19:43:49 +00:00
parent fce9fa7830
commit 58541e151a
2 changed files with 18 additions and 6 deletions

2
maven-meeper/src/bin/d2u Executable file
View File

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

View File

@ -23,6 +23,8 @@ cp $BUNDLE $WORKDIR
POM=project.xml
../d2u ${POM}
[ ! -f ${POM} ] && echo && echo "Cannot deploy without the project.xml file!" && echo && exit
version=`cat ${POM} | tr '\n' ' ' | sed 's#<versions>.*</versions>##' | sed 's#<dependencies>.*</dependencies>##' | grep '<version>' | sed -e 's#^.*<version>##;s#</version>.*$##'`
@ -46,17 +48,25 @@ cp $BUNDLE $WORKDIR
groupId=${artifactId}
fi
echo " version: ${version}"
echo " groupId: ${groupId}"
echo "artifactId: ${artifactId}"
version=`echo ${version} | sed -e 's/ *$//'`
artifactId=`echo ${artifactId} | sed -e 's/ *$//'`
groupId=`echo ${groupId} | sed -e 's/ *$//'`
echo
echo " version: [${version}]"
echo " groupId: [${groupId}]"
echo "artifactId: [${artifactId}]"
echo
[ ! -f LICENSE.txt ] && echo && echo "Cannot deploy without the LICENSE.txt file!" && echo && exit
cp project.xml ${artifactId}-${version}.pom
deploy-lic LICENSE.txt ${groupId}
../d2u LICENSE.txt
../deploy-lic LICENSE.txt ${groupId}
deploy-pom ${artifactId}-${version}.pom ${groupId}
../deploy-pom ${artifactId}-${version}.pom ${groupId}
deploy-jar ${artifactId}-${version}.jar ${groupId}
../deploy-jar ${artifactId}-${version}.jar ${groupId}
)