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
This commit is contained in:
Luigi Toscano 2017-07-10 18:21:52 +02:00
parent 70090c2a94
commit 6ec96264a4
1 changed files with 6 additions and 1 deletions

View File

@ -24,7 +24,7 @@ esac
echo "Install required packages"
sudo apt-get purge -y maven2 maven
sudo apt-get install -y maven openjdk-7-jdk wget
sudo apt-get install -y maven openjdk-8-jdk wget xmlstarlet
mvn --version
echo "Download and unpack Oozie"
@ -34,6 +34,11 @@ tar xzf oozie-${OOZIE_VERSION}.tar.gz
echo "Build Oozie"
pushd oozie-${OOZIE_VERSION}
find . -name pom.xml | xargs sed -ri "s/${PREV_OOZIE_HADOOP_VERSION}/${HADOOP_VERSION}/g"
if [ "${OOZIE_VERSION}" = "4.2.0" ]; then
# see https://issues.apache.org/jira/browse/OOZIE-2417
mv pom.xml pom.xml.orig
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
fi
./bin/mkdistro.sh assembly:single ${BUILD_ARGS} -DjavaVersion=1.7 -DtargetJavaVersion=1.7 -DskipTests
mkdir -p ./../dist/oozie/
mv distro/target/oozie-${OOZIE_VERSION}-distro.tar.gz ./../dist/oozie/oozie-${OOZIE_VERSION}-hadoop-${HADOOP_VERSION}.tar.gz