ソースを参照

AMBARI-9808. Allow the user to build ambari-views/examples without having to building the whole Ambari project (pull dependencies from Maven). (yusaku)

Yusaku Sako 10 年 前
コミット
24a7e6442b

+ 4 - 1
ambari-views/examples/calculator-view/pom.xml

@@ -19,13 +19,16 @@
   <parent>
     <groupId>org.apache.ambari</groupId>
     <artifactId>ambari-view-examples</artifactId>
-    <version>1.0.0</version>
+    <version>2.0.0-SNAPSHOT</version>
   </parent>
   <modelVersion>4.0.0</modelVersion>
   <artifactId>calculator-view</artifactId>
   <packaging>jar</packaging>
   <name>Ambari Calculator View</name>
   <url>http://maven.apache.org</url>
+  <properties>
+    <ambari.dir>${project.parent.parent.parent.basedir}</ambari.dir>
+  </properties>
   <dependencies>
     <dependency>
       <groupId>junit</groupId>

+ 4 - 1
ambari-views/examples/favorite-view/pom.xml

@@ -19,13 +19,16 @@
   <parent>
     <groupId>org.apache.ambari</groupId>
     <artifactId>ambari-view-examples</artifactId>
-    <version>1.0.0</version>
+    <version>2.0.0-SNAPSHOT</version>
   </parent>
   <modelVersion>4.0.0</modelVersion>
   <artifactId>favorite-view</artifactId>
   <packaging>jar</packaging>
   <name>Ambari Favorite View</name>
   <url>http://maven.apache.org</url>
+  <properties>
+    <ambari.dir>${project.parent.parent.parent.basedir}</ambari.dir>
+  </properties>
   <dependencies>
     <dependency>
       <groupId>junit</groupId>

+ 5 - 1
ambari-views/examples/hello-servlet-view/pom.xml

@@ -19,13 +19,17 @@
   <parent>
     <groupId>org.apache.ambari</groupId>
     <artifactId>ambari-view-examples</artifactId>
-    <version>1.0.0</version>
+    <version>2.0.0-SNAPSHOT</version>
   </parent>
   <modelVersion>4.0.0</modelVersion>
   <artifactId>hello-servlet-view</artifactId>
   <packaging>jar</packaging>
   <name>Ambari Hello Servlet View</name>
+  <version>2.0.0-SNAPSHOT</version>
   <url>http://maven.apache.org</url>
+  <properties>
+    <ambari.dir>${project.parent.parent.parent.basedir}</ambari.dir>
+  </properties>
   <dependencies>
     <dependency>
       <groupId>junit</groupId>

+ 5 - 1
ambari-views/examples/helloworld-view/pom.xml

@@ -19,13 +19,17 @@
   <parent>
     <groupId>org.apache.ambari</groupId>
     <artifactId>ambari-view-examples</artifactId>
-    <version>1.0.0</version>
+    <version>2.0.0-SNAPSHOT</version>
   </parent>
   <modelVersion>4.0.0</modelVersion>
   <artifactId>helloworld-view</artifactId>
   <packaging>jar</packaging>
   <name>Ambari Hello World View</name>
+  <version>2.0.0-SNAPSHOT</version>
   <url>http://maven.apache.org</url>
+  <properties>
+    <ambari.dir>${project.parent.parent.parent.basedir}</ambari.dir>
+  </properties>
   <dependencies>
     <dependency>
       <groupId>junit</groupId>

+ 4 - 1
ambari-views/examples/phone-list-view/pom.xml

@@ -19,13 +19,16 @@
   <parent>
     <groupId>org.apache.ambari</groupId>
     <artifactId>ambari-view-examples</artifactId>
-    <version>1.0.0</version>
+    <version>2.0.0-SNAPSHOT</version>
   </parent>
   <modelVersion>4.0.0</modelVersion>
   <artifactId>phone-list-view</artifactId>
   <packaging>jar</packaging>
   <name>Ambari Phone List View</name>
   <url>http://maven.apache.org</url>
+  <properties>
+    <ambari.dir>${project.parent.parent.parent.basedir}</ambari.dir>
+  </properties>
   <dependencies>
     <dependency>
       <groupId>junit</groupId>

+ 10 - 1
ambari-views/examples/pom.xml

@@ -16,12 +16,18 @@
 -->
 <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/maven-v4_0_0.xsd">
+  <parent>
+    <groupId>org.apache.ambari</groupId>
+    <artifactId>ambari-project</artifactId>
+    <version>2.0.0-SNAPSHOT</version>
+    <relativePath>../../ambari-project</relativePath>
+  </parent>
   <modelVersion>4.0.0</modelVersion>
   <groupId>org.apache.ambari</groupId>
   <artifactId>ambari-view-examples</artifactId>
   <packaging>pom</packaging>
-  <version>1.0.0</version>
   <name>Ambari View Examples</name>
+  <version>2.0.0-SNAPSHOT</version>
   <modules>
     <module>helloworld-view</module>
     <module>hello-servlet-view</module>
@@ -31,6 +37,9 @@
     <module>weather-view</module>
     <module>restricted-view</module>
   </modules>
+  <properties>
+    <ambari.dir>${project.parent.parent.basedir}</ambari.dir>
+  </properties>
   <build>
     <pluginManagement>
       <plugins>

+ 4 - 1
ambari-views/examples/property-validator-view/pom.xml

@@ -19,7 +19,7 @@
   <parent>
     <groupId>org.apache.ambari</groupId>
     <artifactId>ambari-view-examples</artifactId>
-    <version>1.0.0</version>
+    <version>2.0.0-SNAPSHOT</version>
   </parent>
   <modelVersion>4.0.0</modelVersion>
   <artifactId>property-validator-view</artifactId>
@@ -27,6 +27,9 @@
   <packaging>jar</packaging>
   <name>Ambari Property Validator View</name>
   <url>http://maven.apache.org</url>
+  <properties>
+    <ambari.dir>${project.parent.parent.parent.basedir}</ambari.dir>
+  </properties>
   <dependencies>
     <dependency>
       <groupId>org.apache.ambari</groupId>

+ 3 - 0
ambari-views/examples/property-view/pom.xml

@@ -27,6 +27,9 @@
   <packaging>jar</packaging>
   <name>Ambari Property View</name>
   <url>http://maven.apache.org</url>
+  <properties>
+    <ambari.dir>${project.parent.parent.parent.basedir}</ambari.dir>
+  </properties>
   <dependencies>
     <dependency>
       <groupId>org.apache.ambari</groupId>

+ 4 - 1
ambari-views/examples/restricted-view/pom.xml

@@ -19,13 +19,16 @@
   <parent>
     <groupId>org.apache.ambari</groupId>
     <artifactId>ambari-view-examples</artifactId>
-    <version>1.0.0</version>
+    <version>2.0.0-SNAPSHOT</version>
   </parent>
   <modelVersion>4.0.0</modelVersion>
   <artifactId>restricted-view</artifactId>
   <packaging>jar</packaging>
   <name>Ambari Restricted View</name>
   <url>http://maven.apache.org</url>
+  <properties>
+    <ambari.dir>${project.parent.parent.parent.basedir}</ambari.dir>
+  </properties>
   <dependencies>
     <dependency>
       <groupId>junit</groupId>

+ 3 - 0
ambari-views/examples/simple-view/pom.xml

@@ -27,6 +27,9 @@
   <packaging>jar</packaging>
   <name>Ambari Simple View</name>
   <url>http://maven.apache.org</url>
+  <properties>
+    <ambari.dir>${project.parent.parent.parent.basedir}</ambari.dir>
+  </properties>
   <dependencies>
     <dependency>
       <groupId>org.apache.ambari</groupId>

+ 4 - 1
ambari-views/examples/weather-view/pom.xml

@@ -19,13 +19,16 @@
   <parent>
     <groupId>org.apache.ambari</groupId>
     <artifactId>ambari-view-examples</artifactId>
-    <version>1.0.0</version>
+    <version>2.0.0-SNAPSHOT</version>
   </parent>
   <modelVersion>4.0.0</modelVersion>
   <artifactId>weather-view</artifactId>
   <packaging>jar</packaging>
   <name>Ambari Weather View</name>
   <url>http://maven.apache.org</url>
+  <properties>
+    <ambari.dir>${project.parent.parent.parent.basedir}</ambari.dir>
+  </properties>
   <dependencies>
     <dependency>
       <groupId>junit</groupId>