fix to pick off ids when devs and contributors are present

git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@162773 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Jason van Zyl 2004-06-16 12:39:12 +00:00
parent 8c2f137858
commit d162d5c43c
1 changed files with 2 additions and 2 deletions

View File

@ -36,11 +36,11 @@ cp $BUNDLE $WORKDIR
fi
fi
artifactId=`cat ${POM} | tr '\n' ' ' | sed 's#<dependencies>.*</dependencies>##' | grep '<artifactId>' | sed -e 's#^.*<artifactId>##;s#</artifactId>.*$##'`
artifactId=`cat ${POM} | tr '\n' ' ' | sed 's#<dependencies>.*</dependencies>##' | sed 's#<contributors>.*</contributors>##' | sed 's#<dependencies>.*</dependencies>##' | grep '<artifactId>' | sed -e 's#^.*<artifactId>##;s#</artifactId>.*$##'`
if [ -z $artifactId ]
then
artifactId=`cat ${POM} | tr '\n' ' ' | sed 's#<versions>.*</versions>##' | sed 's#<developers>.*</developers>##' | sed 's#<dependencies>.*</dependencies>##' | grep '<id>' | sed -e 's#^.*<id>##;s#</id>.*$##'`
artifactId=`cat ${POM} | tr '\n' ' ' | sed 's#<versions>.*</versions>##' | sed 's#<developers>.*</developers>##' | sed 's#<dependencies>.*</dependencies>##' | sed 's#<contributors>.*</contributors>##' | grep '<id>' | sed -e 's#^.*<id>##;s#</id>.*$##'`
fi
groupId=`cat ${POM} | tr '\n' ' ' | sed 's#<dependencies>.*</dependencies>##' | grep '<groupId>' | sed -e 's#^.*<groupId>##;s#</groupId>.*$##'`