File: upgrade_local_poms.sh

package info (click to toggle)
maven-bundle-plugin 2.3.7-2
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 2,332 kB
  • ctags: 9,968
  • sloc: java: 5,687; xml: 227; sh: 30; makefile: 5
file content (30 lines) | stat: -rwxr-xr-x 762 bytes parent folder | download | duplicates (6)
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
30
#!/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