Repository: ambari Updated Branches: refs/heads/branch-2.5 6ce5f4fea -> ca266e0ad
AMBARI-18873 : added separate module ambari-view-package to create deb and rpm for views. views pom updated to copy the artifact into target/views-jars of ambari-contrib-view (nitirajrathore) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/ca266e0a Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/ca266e0a Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/ca266e0a Branch: refs/heads/branch-2.5 Commit: ca266e0adde24bbbc2ef13d628e435331feadb50 Parents: 6ce5f4f Author: Nitiraj Rathore <[email protected]> Authored: Tue Nov 22 12:28:08 2016 +0530 Committer: Nitiraj Rathore <[email protected]> Committed: Tue Nov 22 12:28:08 2016 +0530 ---------------------------------------------------------------------- contrib/views/ambari-views-package/pom.xml | 123 +++++++++++++++++++ .../src/main/package/deb/control/control | 22 ++++ contrib/views/capacity-scheduler/pom.xml | 18 +++ contrib/views/files/pom.xml | 18 +++ contrib/views/hawq/pom.xml | 18 +++ contrib/views/hive-next/pom.xml | 18 +++ contrib/views/hive/pom.xml | 18 +++ contrib/views/hueambarimigration/pom.xml | 18 +++ contrib/views/jobs/pom.xml | 23 ++++ contrib/views/pig/pom.xml | 18 +++ contrib/views/pom.xml | 5 + contrib/views/slider/pom.xml | 18 +++ contrib/views/storm/pom.xml | 23 ++++ contrib/views/tez/pom.xml | 18 +++ contrib/views/wfmanager/pom.xml | 18 +++ contrib/views/zeppelin/pom.xml | 18 +++ 16 files changed, 394 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/ca266e0a/contrib/views/ambari-views-package/pom.xml ---------------------------------------------------------------------- diff --git a/contrib/views/ambari-views-package/pom.xml b/contrib/views/ambari-views-package/pom.xml new file mode 100644 index 0000000..cb070e6 --- /dev/null +++ b/contrib/views/ambari-views-package/pom.xml @@ -0,0 +1,123 @@ +<!-- + 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 xmlns="http://maven.apache.org/POM/4.0.0" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + + <groupId>org.apache.ambari.contrib.views</groupId> + <artifactId>ambari-views-package</artifactId> + <version>2.5.0.0.0</version> + <name>Ambari Views Package</name> + <parent> + <groupId>org.apache.ambari.contrib.views</groupId> + <artifactId>ambari-contrib-views</artifactId> + <version>2.5.0.0.0</version> + </parent> + + <description> + This package is a meta package to create installable RPM and DEB file + which includes all the views jars. + </description> + + <properties> + <deb.dependency.list>ambari-server (>= ${ambari.version})</deb.dependency.list> + <views.directory>/var/lib/ambari-server/resources/views</views.directory> + <deb.architecture>amd64</deb.architecture> + </properties> + <build> + <plugins> + <plugin> + <groupId>org.codehaus.mojo</groupId> + <artifactId>rpm-maven-plugin</artifactId> + <version>2.0.1</version> + <executions> + <execution> + <phase>none</phase> + <goals> + <goal>rpm</goal> + </goals> + </execution> + </executions> + <configuration> + <copyright>2012, Apache Software Foundation</copyright> + <group>Development</group> + <description>Maven Recipe: RPM Package.</description> + <provides> + <provide>ambari-views-package</provide> + </provides> + <prereqs> + <prereq>ambari-server >= ${ambari.version}</prereq> + </prereqs> + + <mappings> + <mapping> + <directory>${views.directory}</directory> + <filemode>777</filemode> + <username>root</username> + <groupname>root</groupname> + <sources> + <source> + <location>${views.jars.dir.rel}</location> + </source> + </sources> + </mapping> + </mappings> + </configuration> + </plugin> + <plugin> + <groupId>org.vafer</groupId> + <artifactId>jdeb</artifactId> + <version>1.4</version> + <executions> + <execution> + <phase>none</phase> + <goals> + <goal>jdeb</goal> + </goals> + </execution> + </executions> + <configuration> + <verbose>true</verbose> + <skip>false</skip> + <controlDir>${basedir}/src/main/package/deb/control</controlDir> + <deb>${basedir}/target/${project.artifactId}_${package-version}-${package-release}.deb</deb> + <dataSet> + <data> + <src>${views.jars.dir.rel}</src> + <type>directory</type> + <mapper> + <prefix>${views.directory}</prefix> + <filemode>777</filemode> + <type>perm</type> + <user>root</user> + <group>root</group> + </mapper> + </data> + </dataSet> + </configuration> + </plugin> + <plugin> + <artifactId>maven-assembly-plugin</artifactId> + <configuration> + <skipAssembly>true</skipAssembly> + </configuration> + </plugin> + + </plugins> + </build> +</project> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/ambari/blob/ca266e0a/contrib/views/ambari-views-package/src/main/package/deb/control/control ---------------------------------------------------------------------- diff --git a/contrib/views/ambari-views-package/src/main/package/deb/control/control b/contrib/views/ambari-views-package/src/main/package/deb/control/control new file mode 100644 index 0000000..40cd855 --- /dev/null +++ b/contrib/views/ambari-views-package/src/main/package/deb/control/control @@ -0,0 +1,22 @@ +# 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 +Package: [[artifactId]] +Version: [[package-version]]-[[package-release]] +Section: [[deb.section]] +Priority: [[deb.priority]] +Depends: [[deb.dependency.list]] +Architecture: [[deb.architecture]] +Description: [[description]] +Maintainer: [[deb.publisher]] http://git-wip-us.apache.org/repos/asf/ambari/blob/ca266e0a/contrib/views/capacity-scheduler/pom.xml ---------------------------------------------------------------------- diff --git a/contrib/views/capacity-scheduler/pom.xml b/contrib/views/capacity-scheduler/pom.xml index 2205c83..e18514c 100644 --- a/contrib/views/capacity-scheduler/pom.xml +++ b/contrib/views/capacity-scheduler/pom.xml @@ -217,6 +217,24 @@ <includeScope>runtime</includeScope> </configuration> </execution> + <execution> + <id>copy-artifact</id> + <phase>package</phase> + <goals> + <goal>copy</goal> + </goals> + <configuration> + <artifactItems> + <artifactItem> + <groupId>${project.groupId}</groupId> + <artifactId>${project.artifactId}</artifactId> + <version>${project.version}</version> + <type>${project.packaging}</type> + </artifactItem> + </artifactItems> + <outputDirectory>${views.jars.dir.rel}</outputDirectory> + </configuration> + </execution> </executions> </plugin> <plugin> http://git-wip-us.apache.org/repos/asf/ambari/blob/ca266e0a/contrib/views/files/pom.xml ---------------------------------------------------------------------- diff --git a/contrib/views/files/pom.xml b/contrib/views/files/pom.xml index b08d14d..ad9af4f 100644 --- a/contrib/views/files/pom.xml +++ b/contrib/views/files/pom.xml @@ -215,6 +215,24 @@ <includeScope>runtime</includeScope> </configuration> </execution> + <execution> + <id>copy-artifact</id> + <phase>package</phase> + <goals> + <goal>copy</goal> + </goals> + <configuration> + <artifactItems> + <artifactItem> + <groupId>${project.groupId}</groupId> + <artifactId>${project.artifactId}</artifactId> + <version>${project.version}</version> + <type>${project.packaging}</type> + </artifactItem> + </artifactItems> + <outputDirectory>${views.jars.dir.rel}</outputDirectory> + </configuration> + </execution> </executions> </plugin> <plugin> http://git-wip-us.apache.org/repos/asf/ambari/blob/ca266e0a/contrib/views/hawq/pom.xml ---------------------------------------------------------------------- diff --git a/contrib/views/hawq/pom.xml b/contrib/views/hawq/pom.xml index d37c2b4..c62af56 100644 --- a/contrib/views/hawq/pom.xml +++ b/contrib/views/hawq/pom.xml @@ -209,6 +209,24 @@ <includeScope>runtime</includeScope> </configuration> </execution> + <execution> + <id>copy-artifact</id> + <phase>package</phase> + <goals> + <goal>copy</goal> + </goals> + <configuration> + <artifactItems> + <artifactItem> + <groupId>${project.groupId}</groupId> + <artifactId>${project.artifactId}</artifactId> + <version>${project.version}</version> + <type>${project.packaging}</type> + </artifactItem> + </artifactItems> + <outputDirectory>${views.jars.dir.rel}</outputDirectory> + </configuration> + </execution> </executions> </plugin> </plugins> http://git-wip-us.apache.org/repos/asf/ambari/blob/ca266e0a/contrib/views/hive-next/pom.xml ---------------------------------------------------------------------- diff --git a/contrib/views/hive-next/pom.xml b/contrib/views/hive-next/pom.xml index 0efa235..2e7beab 100644 --- a/contrib/views/hive-next/pom.xml +++ b/contrib/views/hive-next/pom.xml @@ -322,6 +322,24 @@ <includeScope>runtime</includeScope> </configuration> </execution> + <execution> + <id>copy-artifact</id> + <phase>package</phase> + <goals> + <goal>copy</goal> + </goals> + <configuration> + <artifactItems> + <artifactItem> + <groupId>${project.groupId}</groupId> + <artifactId>${project.artifactId}</artifactId> + <version>${project.version}</version> + <type>${project.packaging}</type> + </artifactItem> + </artifactItems> + <outputDirectory>${views.jars.dir.rel}</outputDirectory> + </configuration> + </execution> </executions> </plugin> <plugin> http://git-wip-us.apache.org/repos/asf/ambari/blob/ca266e0a/contrib/views/hive/pom.xml ---------------------------------------------------------------------- diff --git a/contrib/views/hive/pom.xml b/contrib/views/hive/pom.xml index 3f58781..b224fb3b 100644 --- a/contrib/views/hive/pom.xml +++ b/contrib/views/hive/pom.xml @@ -315,6 +315,24 @@ <includeScope>runtime</includeScope> </configuration> </execution> + <execution> + <id>copy-artifact</id> + <phase>package</phase> + <goals> + <goal>copy</goal> + </goals> + <configuration> + <artifactItems> + <artifactItem> + <groupId>${project.groupId}</groupId> + <artifactId>${project.artifactId}</artifactId> + <version>${project.version}</version> + <type>${project.packaging}</type> + </artifactItem> + </artifactItems> + <outputDirectory>${views.jars.dir.rel}</outputDirectory> + </configuration> + </execution> </executions> </plugin> <plugin> http://git-wip-us.apache.org/repos/asf/ambari/blob/ca266e0a/contrib/views/hueambarimigration/pom.xml ---------------------------------------------------------------------- diff --git a/contrib/views/hueambarimigration/pom.xml b/contrib/views/hueambarimigration/pom.xml index f25e6b2..8df4ff8 100644 --- a/contrib/views/hueambarimigration/pom.xml +++ b/contrib/views/hueambarimigration/pom.xml @@ -233,6 +233,24 @@ <includeScope>runtime</includeScope> </configuration> </execution> + <execution> + <id>copy-artifact</id> + <phase>package</phase> + <goals> + <goal>copy</goal> + </goals> + <configuration> + <artifactItems> + <artifactItem> + <groupId>${project.groupId}</groupId> + <artifactId>${project.artifactId}</artifactId> + <version>${project.version}</version> + <type>${project.packaging}</type> + </artifactItem> + </artifactItems> + <outputDirectory>${views.jars.dir.rel}</outputDirectory> + </configuration> + </execution> </executions> </plugin> http://git-wip-us.apache.org/repos/asf/ambari/blob/ca266e0a/contrib/views/jobs/pom.xml ---------------------------------------------------------------------- diff --git a/contrib/views/jobs/pom.xml b/contrib/views/jobs/pom.xml index cc589e8..3475191 100644 --- a/contrib/views/jobs/pom.xml +++ b/contrib/views/jobs/pom.xml @@ -34,6 +34,29 @@ <build> <plugins> <plugin> + <artifactId>maven-dependency-plugin</artifactId> + <executions> + <execution> + <id>copy-artifact</id> + <phase>package</phase> + <goals> + <goal>copy</goal> + </goals> + <configuration> + <artifactItems> + <artifactItem> + <groupId>${project.groupId}</groupId> + <artifactId>${project.artifactId}</artifactId> + <version>${project.version}</version> + <type>${project.packaging}</type> + </artifactItem> + </artifactItems> + <outputDirectory>${views.jars.dir.rel}</outputDirectory> + </configuration> + </execution> + </executions> + </plugin> + <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>build-helper-maven-plugin</artifactId> <version>1.8</version> http://git-wip-us.apache.org/repos/asf/ambari/blob/ca266e0a/contrib/views/pig/pom.xml ---------------------------------------------------------------------- diff --git a/contrib/views/pig/pom.xml b/contrib/views/pig/pom.xml index ff2ee4a..d7d2de9 100644 --- a/contrib/views/pig/pom.xml +++ b/contrib/views/pig/pom.xml @@ -283,6 +283,24 @@ <includeScope>runtime</includeScope> </configuration> </execution> + <execution> + <id>copy-artifact</id> + <phase>package</phase> + <goals> + <goal>copy</goal> + </goals> + <configuration> + <artifactItems> + <artifactItem> + <groupId>${project.groupId}</groupId> + <artifactId>${project.artifactId}</artifactId> + <version>${project.version}</version> + <type>${project.packaging}</type> + </artifactItem> + </artifactItems> + <outputDirectory>${views.jars.dir.rel}</outputDirectory> + </configuration> + </execution> </executions> </plugin> <plugin> http://git-wip-us.apache.org/repos/asf/ambari/blob/ca266e0a/contrib/views/pom.xml ---------------------------------------------------------------------- diff --git a/contrib/views/pom.xml b/contrib/views/pom.xml index 653c708..ca5aef4 100644 --- a/contrib/views/pom.xml +++ b/contrib/views/pom.xml @@ -32,6 +32,8 @@ <ambari.version>2.5.0.0.0</ambari.version> <ambari.dir>${project.parent.parent.basedir}</ambari.dir> <hadoop.version>2.7.1</hadoop.version> + <views.jars.dir>views-jars</views.jars.dir> + <views.jars.dir.rel>../target/${views.jars.dir}</views.jars.dir.rel> </properties> <modules> <module>utils</module> @@ -47,7 +49,10 @@ <module>zeppelin</module> <module>hueambarimigration</module> <module>hive-next</module> + <module>hive</module> <module>wfmanager</module> + <!--ambari-views-package should be last in the module list for it to function properly--> + <module>ambari-views-package</module> </modules> <build> <pluginManagement> http://git-wip-us.apache.org/repos/asf/ambari/blob/ca266e0a/contrib/views/slider/pom.xml ---------------------------------------------------------------------- diff --git a/contrib/views/slider/pom.xml b/contrib/views/slider/pom.xml index e315474..bb1b150 100644 --- a/contrib/views/slider/pom.xml +++ b/contrib/views/slider/pom.xml @@ -303,6 +303,24 @@ <includeArtifactIds>slider-agent</includeArtifactIds> </configuration> </execution> + <execution> + <id>copy-artifact</id> + <phase>package</phase> + <goals> + <goal>copy</goal> + </goals> + <configuration> + <artifactItems> + <artifactItem> + <groupId>${project.groupId}</groupId> + <artifactId>${project.artifactId}</artifactId> + <version>${project.version}</version> + <type>${project.packaging}</type> + </artifactItem> + </artifactItems> + <outputDirectory>${views.jars.dir.rel}</outputDirectory> + </configuration> + </execution> </executions> </plugin> <plugin> http://git-wip-us.apache.org/repos/asf/ambari/blob/ca266e0a/contrib/views/storm/pom.xml ---------------------------------------------------------------------- diff --git a/contrib/views/storm/pom.xml b/contrib/views/storm/pom.xml index 166f526..14bb373 100644 --- a/contrib/views/storm/pom.xml +++ b/contrib/views/storm/pom.xml @@ -74,6 +74,29 @@ </execution> </executions> </plugin> + <plugin> + <artifactId>maven-dependency-plugin</artifactId> + <executions> + <execution> + <id>copy-artifact</id> + <phase>package</phase> + <goals> + <goal>copy</goal> + </goals> + <configuration> + <artifactItems> + <artifactItem> + <groupId>${project.groupId}</groupId> + <artifactId>${project.artifactId}</artifactId> + <version>${project.version}</version> + <type>${project.packaging}</type> + </artifactItem> + </artifactItems> + <outputDirectory>${views.jars.dir.rel}</outputDirectory> + </configuration> + </execution> + </executions> + </plugin> </plugins> </build> <dependencies> http://git-wip-us.apache.org/repos/asf/ambari/blob/ca266e0a/contrib/views/tez/pom.xml ---------------------------------------------------------------------- diff --git a/contrib/views/tez/pom.xml b/contrib/views/tez/pom.xml index e2bb55d..269da79 100644 --- a/contrib/views/tez/pom.xml +++ b/contrib/views/tez/pom.xml @@ -106,6 +106,24 @@ <includes>fonts/**/*, img/**/*, scripts/**/*, assets/**/*, config/**/*, styles/**/*, index.html</includes> </configuration> </execution> + <execution> + <id>copy-artifact</id> + <phase>package</phase> + <goals> + <goal>copy</goal> + </goals> + <configuration> + <artifactItems> + <artifactItem> + <groupId>${project.groupId}</groupId> + <artifactId>${project.artifactId}</artifactId> + <version>${project.version}</version> + <type>${project.packaging}</type> + </artifactItem> + </artifactItems> + <outputDirectory>${views.jars.dir.rel}</outputDirectory> + </configuration> + </execution> </executions> </plugin> http://git-wip-us.apache.org/repos/asf/ambari/blob/ca266e0a/contrib/views/wfmanager/pom.xml ---------------------------------------------------------------------- diff --git a/contrib/views/wfmanager/pom.xml b/contrib/views/wfmanager/pom.xml index 1e910e2..b8578ac 100644 --- a/contrib/views/wfmanager/pom.xml +++ b/contrib/views/wfmanager/pom.xml @@ -246,6 +246,24 @@ <includeScope>runtime</includeScope> </configuration> </execution> + <execution> + <id>copy-artifact</id> + <phase>package</phase> + <goals> + <goal>copy</goal> + </goals> + <configuration> + <artifactItems> + <artifactItem> + <groupId>${project.groupId}</groupId> + <artifactId>${project.artifactId}</artifactId> + <version>${project.version}</version> + <type>${project.packaging}</type> + </artifactItem> + </artifactItems> + <outputDirectory>${views.jars.dir.rel}</outputDirectory> + </configuration> + </execution> </executions> </plugin> </plugins> http://git-wip-us.apache.org/repos/asf/ambari/blob/ca266e0a/contrib/views/zeppelin/pom.xml ---------------------------------------------------------------------- diff --git a/contrib/views/zeppelin/pom.xml b/contrib/views/zeppelin/pom.xml index 9c41b10..6a7f585 100644 --- a/contrib/views/zeppelin/pom.xml +++ b/contrib/views/zeppelin/pom.xml @@ -132,6 +132,24 @@ <includeScope>runtime</includeScope> </configuration> </execution> + <execution> + <id>copy-artifact</id> + <phase>package</phase> + <goals> + <goal>copy</goal> + </goals> + <configuration> + <artifactItems> + <artifactItem> + <groupId>${project.groupId}</groupId> + <artifactId>${project.artifactId}</artifactId> + <version>${project.version}</version> + <type>${project.packaging}</type> + </artifactItem> + </artifactItems> + <outputDirectory>${views.jars.dir.rel}</outputDirectory> + </configuration> + </execution> </executions> </plugin> <plugin>
