Browse Source

Fix building oozie 4.2.0

Remove the reference to repository.codehaus.org, which is still
still references by the pom.xml file for oozie 4.2; see
https://issues.apache.org/jira/browse/OOZIE-2417

Change-Id: I7420cd27bd732932bd113f18060ca89c2a882ff8
tags/7.0.0.0b3
Luigi Toscano 2 years ago
parent
commit
6ec96264a4
1 changed files with 6 additions and 1 deletions
  1. 6
    1
      tools/build-oozie.sh

+ 6
- 1
tools/build-oozie.sh View File

@@ -24,7 +24,7 @@ esac
24 24
 
25 25
 echo "Install required packages"
26 26
 sudo apt-get purge -y maven2 maven
27
-sudo apt-get install -y maven openjdk-7-jdk wget
27
+sudo apt-get install -y maven openjdk-8-jdk wget xmlstarlet
28 28
 mvn --version
29 29
 
30 30
 echo "Download and unpack Oozie"
@@ -34,6 +34,11 @@ tar xzf oozie-${OOZIE_VERSION}.tar.gz
34 34
 echo "Build Oozie"
35 35
 pushd oozie-${OOZIE_VERSION}
36 36
 find . -name pom.xml | xargs sed -ri "s/${PREV_OOZIE_HADOOP_VERSION}/${HADOOP_VERSION}/g"
37
+if [ "${OOZIE_VERSION}" = "4.2.0" ]; then
38
+    # see https://issues.apache.org/jira/browse/OOZIE-2417
39
+    mv pom.xml pom.xml.orig
40
+    xmlstarlet ed -P -N N="http://maven.apache.org/POM/4.0.0" -d "/N:project/N:repositories/N:repository[N:url='http://repository.codehaus.org/']" pom.xml.orig >pom.xml
41
+fi
37 42
 ./bin/mkdistro.sh assembly:single ${BUILD_ARGS} -DjavaVersion=1.7 -DtargetJavaVersion=1.7 -DskipTests
38 43
 mkdir -p ./../dist/oozie/
39 44
 mv distro/target/oozie-${OOZIE_VERSION}-distro.tar.gz ./../dist/oozie/oozie-${OOZIE_VERSION}-hadoop-${HADOOP_VERSION}.tar.gz

Loading…
Cancel
Save