Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

executable file 29 lines (20 sloc) 0.762 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
#!/bin/sh

VERSION=$1

if [ "$VERSION" = "" ]
then

  echo "Usage: $0 <new-bundleplugin-version>"
  exit

fi

cd ../pom

for POM in `find .. -name .svn -prune -o -name pom.xml -print`
do

  mvn "-DprojectFile=$POM" \
      "-Dxpath=/project/build/plugins/plugin[artifactId[.='maven-bundle-plugin']]/version" \
      "-DnewValue=$VERSION" \
      org.apache.maven.plugins:maven-pom-plugin:1.0-SNAPSHOT:alter-by-xpath

  mvn "-DprojectFile=$POM" \
      "-DskipXPath=/project/build/plugins/plugin[artifactId[.='maven-bundle-plugin']]/version" \
      "-Dxpath=/project/build/plugins/plugin[artifactId[.='maven-bundle-plugin']]" \
      "-DnewElement=version" "-DnewValue=$VERSION" \
      org.apache.maven.plugins:maven-pom-plugin:1.0-SNAPSHOT:add-by-xpath

done
Something went wrong with that request. Please try again.