sqoop-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From b...@apache.org
Subject [2/2] git commit: SQOOP-713 Introduce maven profiles for different Hadoop versions (Jarek Jarcec Cecho)
Date Tue, 20 Nov 2012 00:15:58 GMT
SQOOP-713 Introduce maven profiles for different Hadoop versions
(Jarek Jarcec Cecho)


Project: http://git-wip-us.apache.org/repos/asf/sqoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/sqoop/commit/5fcf712c
Tree: http://git-wip-us.apache.org/repos/asf/sqoop/tree/5fcf712c
Diff: http://git-wip-us.apache.org/repos/asf/sqoop/diff/5fcf712c

Branch: refs/heads/sqoop2
Commit: 5fcf712c4d1947b672465ee13cb44ed741cf4e15
Parents: 878a7b8
Author: Bilung Lee <blee@apache.org>
Authored: Mon Nov 19 15:24:58 2012 -0800
Committer: Bilung Lee <blee@apache.org>
Committed: Mon Nov 19 15:24:58 2012 -0800

----------------------------------------------------------------------
 execution/mapreduce/pom.xml  |   95 ++++++++++++++++++++++++++++++++----
 pom.xml                      |   91 +++++++++++++++++++++++++++++++----
 server/pom.xml               |    1 +
 submission/mapreduce/pom.xml |   82 +++++++++++++++++++++++++++----
 4 files changed, 236 insertions(+), 33 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/sqoop/blob/5fcf712c/execution/mapreduce/pom.xml
----------------------------------------------------------------------
diff --git a/execution/mapreduce/pom.xml b/execution/mapreduce/pom.xml
index e529f55..13dbbdc 100644
--- a/execution/mapreduce/pom.xml
+++ b/execution/mapreduce/pom.xml
@@ -50,18 +50,91 @@ limitations under the License.
       <scope>test</scope>
     </dependency>
 
-    <dependency>
-      <groupId>org.apache.hadoop</groupId>
-      <artifactId>hadoop-common</artifactId>
-      <scope>provided</scope>
-    </dependency>
-
-    <dependency>
-      <groupId>org.apache.hadoop</groupId>
-      <artifactId>hadoop-mapreduce-client-jobclient</artifactId>
-      <scope>provided</scope>
-    </dependency>
+    <!-- See profiles for Hadoop specific dependencies -->
 
   </dependencies>
 
+  <!-- Add classifier name to the JAR name -->
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-jar-plugin</artifactId>
+        <version>2.4</version>
+        <configuration>
+          <classifier>hadoop${hadoop.profile}</classifier>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+
+  <!-- Profiles for various supported Hadoop distributions -->
+  <profiles>
+
+    <!-- Hadoop 1.x -->
+    <profile>
+      <id>hadoop100</id>
+
+      <activation>
+        <property>
+          <name>hadoop.profile</name>
+          <value>100</value>
+        </property>
+      </activation>
+
+      <dependencies>
+        <dependency>
+          <groupId>com.google.guava</groupId>
+          <artifactId>guava</artifactId>
+          <version>${guava.version}</version>
+          <scope>provided</scope>
+        </dependency>
+
+        <dependency>
+          <groupId>org.apache.hadoop</groupId>
+          <artifactId>hadoop-core</artifactId>
+          <scope>provided</scope>
+        </dependency>
+      </dependencies>
+    </profile>
+
+    <!-- Hadoop 2.x (active by default) -->
+    <profile>
+      <id>hadoop200</id>
+
+      <activation>
+        <activeByDefault>true</activeByDefault>
+        <property>
+          <name>hadoop.profile</name>
+          <value>200</value>
+        </property>
+      </activation>
+
+      <properties>
+        <hadoop.profile>200</hadoop.profile>
+      </properties>
+
+      <dependencies>
+        <dependency>
+          <groupId>org.apache.hadoop</groupId>
+          <artifactId>hadoop-common</artifactId>
+          <scope>provided</scope>
+        </dependency>
+
+        <dependency>
+          <groupId>org.apache.hadoop</groupId>
+          <artifactId>hadoop-mapreduce-client-core</artifactId>
+          <scope>provided</scope>
+        </dependency>
+
+        <dependency>
+          <groupId>org.apache.hadoop</groupId>
+          <artifactId>hadoop-mapreduce-client-jobclient</artifactId>
+          <scope>provided</scope>
+        </dependency>
+
+      </dependencies>
+    </profile>
+  </profiles>
+
 </project>

http://git-wip-us.apache.org/repos/asf/sqoop/blob/5fcf712c/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index c2fbd6c..f63ff52 100644
--- a/pom.xml
+++ b/pom.xml
@@ -94,7 +94,9 @@ limitations under the License.
     <commons-dbcp.version>1.4</commons-dbcp.version>
     <commons-lang.version>2.5</commons-lang.version>
     <derby.version>10.8.2.2</derby.version>
-    <hadoop.version>2.0.0-SNAPSHOT</hadoop.version>
+    <hadoop.1.version>1.0.3</hadoop.1.version>
+    <hadoop.2.version>2.0.2-alpha</hadoop.2.version>
+    <guava.version>11.0.2</guava.version>
     <json-simple.version>1.1</json-simple.version>
     <junit.version>4.9</junit.version>
     <log4j.version>1.2.16</log4j.version>
@@ -108,6 +110,83 @@ limitations under the License.
     </dependency>
   </dependencies>
 
+  <!-- Profiles for various supported Hadoop distributions -->
+  <profiles>
+
+    <!-- Hadoop 1.x -->
+    <profile>
+      <id>hadoop100</id>
+
+     <activation>
+        <property>
+          <name>hadoop.profile</name>
+          <value>100</value>
+        </property>
+      </activation>
+
+      <dependencyManagement>
+        <dependencies>
+          <dependency>
+            <groupId>com.google.guava</groupId>
+            <artifactId>guava</artifactId>
+            <version>${guava.version}</version>
+            <scope>provided</scope>
+          </dependency>
+
+          <dependency>
+            <groupId>org.apache.hadoop</groupId>
+            <artifactId>hadoop-core</artifactId>
+            <version>${hadoop.1.version}</version>
+            <scope>provided</scope>
+          </dependency>
+        </dependencies>
+      </dependencyManagement>
+    </profile>
+
+    <!-- Hadoop 2.x (active by default) -->
+    <profile>
+      <id>hadoop200</id>
+
+      <activation>
+        <activeByDefault>true</activeByDefault>
+        <property>
+          <name>hadoop.profile</name>
+          <value>200</value>
+        </property>
+      </activation>
+
+      <properties>
+        <hadoop.profile>200</hadoop.profile>
+      </properties>
+
+      <dependencyManagement>
+        <dependencies>
+          <dependency>
+            <groupId>org.apache.hadoop</groupId>
+            <artifactId>hadoop-common</artifactId>
+            <version>${hadoop.2.version}</version>
+            <scope>provided</scope>
+          </dependency>
+
+          <dependency>
+            <groupId>org.apache.hadoop</groupId>
+            <artifactId>hadoop-mapreduce-client-core</artifactId>
+            <version>${hadoop.2.version}</version>
+            <scope>provided</scope>
+          </dependency>
+
+          <dependency>
+            <groupId>org.apache.hadoop</groupId>
+            <artifactId>hadoop-mapreduce-client-jobclient</artifactId>
+            <version>${hadoop.2.version}</version>
+            <scope>provided</scope>
+          </dependency>
+
+        </dependencies>
+      </dependencyManagement>
+    </profile>
+  </profiles>
+
   <dependencyManagement>
     <dependencies>
       <dependency>
@@ -198,16 +277,6 @@ limitations under the License.
         <artifactId>derby</artifactId>
         <version>${derby.version}</version>
       </dependency>
-      <dependency>
-        <groupId>org.apache.hadoop</groupId>
-        <artifactId>hadoop-common</artifactId>
-        <version>${hadoop.version}</version>
-      </dependency>
-      <dependency>
-        <groupId>org.apache.hadoop</groupId>
-        <artifactId>hadoop-mapreduce-client-jobclient</artifactId>
-        <version>${hadoop.version}</version>
-      </dependency>
    </dependencies>
   </dependencyManagement>
 

http://git-wip-us.apache.org/repos/asf/sqoop/blob/5fcf712c/server/pom.xml
----------------------------------------------------------------------
diff --git a/server/pom.xml b/server/pom.xml
index 71aa6c9..732094a 100644
--- a/server/pom.xml
+++ b/server/pom.xml
@@ -49,6 +49,7 @@ limitations under the License.
       <groupId>org.apache.sqoop.submission</groupId>
       <artifactId>sqoop-submission-mapreduce</artifactId>
       <version>2.0.0-SNAPSHOT</version>
+      <classifier>hadoop${hadoop.profile}</classifier>
     </dependency>
 
     <dependency>

http://git-wip-us.apache.org/repos/asf/sqoop/blob/5fcf712c/submission/mapreduce/pom.xml
----------------------------------------------------------------------
diff --git a/submission/mapreduce/pom.xml b/submission/mapreduce/pom.xml
index f8a7d3d..37b9ded 100644
--- a/submission/mapreduce/pom.xml
+++ b/submission/mapreduce/pom.xml
@@ -40,6 +40,7 @@ limitations under the License.
       <groupId>org.apache.sqoop.execution</groupId>
       <artifactId>sqoop-execution-mapreduce</artifactId>
       <version>2.0.0-SNAPSHOT</version>
+      <classifier>hadoop${hadoop.profile}</classifier>
     </dependency>
 
     <dependency>
@@ -56,18 +57,77 @@ limitations under the License.
       <scope>test</scope>
     </dependency>
 
-    <dependency>
-      <groupId>org.apache.hadoop</groupId>
-      <artifactId>hadoop-common</artifactId>
-      <scope>provided</scope>
-    </dependency>
-
-    <dependency>
-      <groupId>org.apache.hadoop</groupId>
-      <artifactId>hadoop-mapreduce-client-jobclient</artifactId>
-      <scope>provided</scope>
-    </dependency>
+    <!-- See profiles for Hadoop specific dependencies -->
 
   </dependencies>
 
+  <!-- Add classifier name to the JAR name -->
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-jar-plugin</artifactId>
+        <version>2.4</version>
+        <configuration>
+          <classifier>hadoop${hadoop.profile}</classifier>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+
+  <!-- Profiles for various supported Hadoop distributions -->
+  <profiles>
+
+    <!-- Hadoop 1.x -->
+    <profile>
+      <id>hadoop100</id>
+
+      <activation>
+        <property>
+          <name>hadoop.profile</name>
+          <value>100</value>
+        </property>
+      </activation>
+
+      <dependencies>
+        <dependency>
+          <groupId>org.apache.hadoop</groupId>
+          <artifactId>hadoop-core</artifactId>
+          <scope>provided</scope>
+        </dependency>
+      </dependencies>
+    </profile>
+
+    <!-- Hadoop 2.x (active by default) -->
+    <profile>
+      <id>hadoop200</id>
+
+      <activation>
+        <activeByDefault>true</activeByDefault>
+        <property>
+          <name>hadoop.profile</name>
+          <value>200</value>
+        </property>
+      </activation>
+
+      <properties>
+        <hadoop.profile>200</hadoop.profile>
+      </properties>
+
+      <dependencies>
+        <dependency>
+          <groupId>org.apache.hadoop</groupId>
+          <artifactId>hadoop-common</artifactId>
+          <scope>provided</scope>
+        </dependency>
+
+        <dependency>
+          <groupId>org.apache.hadoop</groupId>
+          <artifactId>hadoop-mapreduce-client-core</artifactId>
+          <scope>provided</scope>
+        </dependency>
+      </dependencies>
+    </profile>
+  </profiles>
+
 </project>


Mime
View raw message