This is an automated email from the ASF dual-hosted git repository. oleewere pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/ambari-infra.git
commit f2fd7899f95d60f750c610843c62dc43a2d00c0a Author: Oliver Szabo <oleew...@gmail.com> AuthorDate: Tue Dec 25 16:14:15 2018 +0100 Use build.xml for ambari-infra-assembly to not duplicate package code --- ambari-infra-assembly/build.xml | 59 ++++++++++++++++++++++++++++++++ ambari-infra-assembly/pom.xml | 74 +++++------------------------------------ 2 files changed, 67 insertions(+), 66 deletions(-) diff --git a/ambari-infra-assembly/build.xml b/ambari-infra-assembly/build.xml new file mode 100644 index 0000000..488f1af --- /dev/null +++ b/ambari-infra-assembly/build.xml @@ -0,0 +1,59 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!-- + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> +<project basedir="." default="package" name="infra-assembly"> + <target name="package"> + <get + src="${solr.tar}" + dest="${project.build.directory}/solr.tgz" + usetimestamp="true" + /> + <untar + src="${project.build.directory}/solr.tgz" + dest="${project.build.directory}/" + compression="gzip" + /> + <move todir="${project.build.directory}/solr"> + <fileset dir="${project.build.directory}/solr-${solr.version}"/> + </move> + + <delete + file="${project.build.directory}/solr/server/solr-webapp/webapp/WEB-INF/lib/${common-fileupload.old.jar.name}"/> + <get src="${common-fileupload.location.url}" dest="target/${common-fileupload.jar.name}" usetimestamp="true"/> + <move file="target/${common-fileupload.jar.name}" + toDir="${project.build.directory}/solr/server/solr-webapp/webapp/WEB-INF/lib/"/> + + <copy file="${infra.solr.plugin.dir}/target/ambari-infra-solr-plugin-${project.version}.jar" + toDir="${project.build.directory}/solr/server/solr-webapp/webapp/WEB-INF/lib/"/> + <copy file="${infra.solr.plugin.dir}/target/libs/ambari-metrics-common-${ambari-metrics.version}.jar" + toDir="${project.build.directory}/solr/server/solr-webapp/webapp/WEB-INF/lib/"/> + <copy file="${infra.solr.plugin.dir}/target/libs/commons-logging-1.1.1.jar" + toDir="${project.build.directory}/solr/server/solr-webapp/webapp/WEB-INF/lib/"/> + <chmod file="${project.build.directory}/solr/bin/**" perm="755"/> + <chmod file="${project.build.directory}/solr/server/scripts/**" perm="755"/> + + <copy todir="${project.build.directory}" > + <fileset dir="${jenkins.docker.folder}" includes="**"/> + </copy> + <copy todir="${project.build.directory}/docker-infra-solr/solr" > + <fileset dir="${project.build.directory}/solr" includes="**"/> + </copy> + <copy todir="${project.build.directory}/docker-infra-solr/solr-client" > + <fileset dir="${solr.client.dir}/target/package" includes="**"/> + </copy> + </target> +</project> \ No newline at end of file diff --git a/ambari-infra-assembly/pom.xml b/ambari-infra-assembly/pom.xml index fe9d72e..ef9953c 100644 --- a/ambari-infra-assembly/pom.xml +++ b/ambari-infra-assembly/pom.xml @@ -175,34 +175,10 @@ <goal>run</goal> </goals> <configuration> - <target name="Download Solr"> - <get - src="${solr.tar}" - dest="${project.build.directory}/solr.tgz" - usetimestamp="true" - /> - <untar - src="${project.build.directory}/solr.tgz" - dest="${project.build.directory}/" - compression="gzip" - /> - <move todir="${project.build.directory}/solr"> - <fileset dir="${project.build.directory}/solr-${solr.version}"/> - </move> - - <delete file="${project.build.directory}/solr/server/solr-webapp/webapp/WEB-INF/lib/${common-fileupload.old.jar.name}"/> - <get src="${common-fileupload.location.url}" dest="target/${common-fileupload.jar.name}" usetimestamp="true"/> - <move file="target/${common-fileupload.jar.name}" - toDir="${project.build.directory}/solr/server/solr-webapp/webapp/WEB-INF/lib/"/> - - <copy file="${infra.solr.plugin.dir}/target/ambari-infra-solr-plugin-${project.version}.jar" - toDir="${project.build.directory}/solr/server/solr-webapp/webapp/WEB-INF/lib/"/> - <copy file="${infra.solr.plugin.dir}/target/libs/ambari-metrics-common-${ambari-metrics.version}.jar" - toDir="${project.build.directory}/solr/server/solr-webapp/webapp/WEB-INF/lib/"/> - <copy file="${infra.solr.plugin.dir}/target/libs/commons-logging-1.1.1.jar" - toDir="${project.build.directory}/solr/server/solr-webapp/webapp/WEB-INF/lib/"/> - <chmod file="${project.build.directory}/solr/bin/**" perm="755"/> - <chmod file="${project.build.directory}/solr/server/scripts/**" perm="755"/> + <target> + <ant antfile="build.xml"> + <target name="package"/> + </ant> </target> </configuration> </execution> @@ -370,44 +346,10 @@ <goal>run</goal> </goals> <configuration> - <target name="Download Solr"> - <get - src="${solr.tar}" - dest="${project.build.directory}/solr.tgz" - usetimestamp="true" - /> - <untar - src="${project.build.directory}/solr.tgz" - dest="${project.build.directory}/" - compression="gzip" - /> - <move todir="${project.build.directory}/solr"> - <fileset dir="${project.build.directory}/solr-${solr.version}"/> - </move> - - <delete file="${project.build.directory}/solr/server/solr-webapp/webapp/WEB-INF/lib/${common-fileupload.old.jar.name}"/> - <get src="${common-fileupload.location.url}" dest="target/${common-fileupload.jar.name}" usetimestamp="true"/> - <move file="target/${common-fileupload.jar.name}" - toDir="${project.build.directory}/solr/server/solr-webapp/webapp/WEB-INF/lib/"/> - - <copy file="${infra.solr.plugin.dir}/target/ambari-infra-solr-plugin-${project.version}.jar" - toDir="${project.build.directory}/solr/server/solr-webapp/webapp/WEB-INF/lib/"/> - <copy file="${infra.solr.plugin.dir}/target/libs/ambari-metrics-common-${ambari-metrics.version}.jar" - toDir="${project.build.directory}/solr/server/solr-webapp/webapp/WEB-INF/lib/"/> - <copy file="${infra.solr.plugin.dir}/target/libs/commons-logging-1.1.1.jar" - toDir="${project.build.directory}/solr/server/solr-webapp/webapp/WEB-INF/lib/"/> - <chmod file="${project.build.directory}/solr/bin/**" perm="755"/> - <chmod file="${project.build.directory}/solr/server/scripts/**" perm="755"/> - - <copy todir="${project.build.directory}" > - <fileset dir="${jenkins.docker.folder}" includes="**"/> - </copy> - <copy todir="${project.build.directory}/docker-infra-solr/solr" > - <fileset dir="${project.build.directory}/solr" includes="**"/> - </copy> - <copy todir="${project.build.directory}/docker-infra-solr/solr-client" > - <fileset dir="${solr.client.dir}/target/package" includes="**"/> - </copy> + <target> + <ant antfile="build.xml"> + <target name="package"/> + </ant> </target> </configuration> </execution>