You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@metamodel.apache.org by ka...@apache.org on 2015/10/04 20:01:41 UTC

metamodel git commit: METAMODEL-191: Fixed Fixes #51

Repository: metamodel
Updated Branches:
  refs/heads/master 228e4834f -> 237f45477


METAMODEL-191: Fixed
Fixes #51

Project: http://git-wip-us.apache.org/repos/asf/metamodel/repo
Commit: http://git-wip-us.apache.org/repos/asf/metamodel/commit/237f4547
Tree: http://git-wip-us.apache.org/repos/asf/metamodel/tree/237f4547
Diff: http://git-wip-us.apache.org/repos/asf/metamodel/diff/237f4547

Branch: refs/heads/master
Commit: 237f454778936989bc868a2e572bbb8507311cc4
Parents: 228e483
Author: Kasper Sørensen <i....@gmail.com>
Authored: Sun Oct 4 20:01:18 2015 +0200
Committer: Kasper Sørensen <i....@gmail.com>
Committed: Sun Oct 4 20:01:18 2015 +0200

----------------------------------------------------------------------
 CHANGES.md                                      |  1 +
 cassandra/pom.xml                               | 37 +++++++++-------
 excel/pom.xml                                   |  7 +++-
 full/pom.xml                                    | 27 +++++++++++-
 full/tattletale-filters.properties              |  2 +
 hadoop/pom.xml                                  | 11 ++++-
 .../util/HdfsResourceIntegrationTest.java       | 26 +++++++++---
 hbase/pom.xml                                   |  8 ++++
 jdbc/pom.xml                                    | 37 ++++++++--------
 pom.xml                                         | 44 +++++++++++++++++++-
 10 files changed, 156 insertions(+), 44 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/metamodel/blob/237f4547/CHANGES.md
----------------------------------------------------------------------
diff --git a/CHANGES.md b/CHANGES.md
index 09cdbf7..e7828cc 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -11,6 +11,7 @@
  * [METAMODEL-172] - ElasticSearch Date types should be converted properly.
  * [METAMODEL-184] - ElasticSearch querying with "IS NULL" and "IS NOT NULL" now uses MissingFilter and ExistsFilter.
  * [METAMODEL-190] - Improved decimal number support in Excel module.
+ * [METAMODEL-191] - Resolved a number of dependency conflicts/overlaps when combining multiple MetaModel modules.
 
 ### Apache MetaModel 4.3.6
 

http://git-wip-us.apache.org/repos/asf/metamodel/blob/237f4547/cassandra/pom.xml
----------------------------------------------------------------------
diff --git a/cassandra/pom.xml b/cassandra/pom.xml
index 473cf30..9a0b184 100644
--- a/cassandra/pom.xml
+++ b/cassandra/pom.xml
@@ -9,7 +9,8 @@
 	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/maven-v4_0_0.xsd">
+<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>
 		<artifactId>MetaModel</artifactId>
 		<groupId>org.apache.metamodel</groupId>
@@ -29,13 +30,13 @@
 			<artifactId>MetaModel-core</artifactId>
 			<version>${project.version}</version>
 		</dependency>
-        <!-- cassandra datastax driver -->
-        <dependency>
-            <groupId>com.datastax.cassandra</groupId>
-            <artifactId>cassandra-driver-core</artifactId>
-            <version>${cassandra.driver.latest.version}</version>
-        </dependency>
-        <dependency>
+		<!-- cassandra datastax driver -->
+		<dependency>
+			<groupId>com.datastax.cassandra</groupId>
+			<artifactId>cassandra-driver-core</artifactId>
+			<version>${cassandra.driver.latest.version}</version>
+		</dependency>
+		<dependency>
 			<groupId>commons-io</groupId>
 			<artifactId>commons-io</artifactId>
 		</dependency>
@@ -50,11 +51,17 @@
 			<artifactId>junit</artifactId>
 			<scope>test</scope>
 		</dependency>
-        <dependency>
-            <groupId>org.cassandraunit</groupId>
-            <artifactId>cassandra-unit</artifactId>
-            <version>2.1.3.1</version>
-            <scope>test</scope>
-        </dependency>
-    </dependencies>
+		<dependency>
+			<groupId>org.cassandraunit</groupId>
+			<artifactId>cassandra-unit</artifactId>
+			<version>2.1.3.1</version>
+			<scope>test</scope>
+			<exclusions>
+				<exclusion>
+					<groupId>javax.xml.stream</groupId>
+					<artifactId>stax-api</artifactId>
+				</exclusion>
+			</exclusions>
+		</dependency>
+	</dependencies>
 </project>

http://git-wip-us.apache.org/repos/asf/metamodel/blob/237f4547/excel/pom.xml
----------------------------------------------------------------------
diff --git a/excel/pom.xml b/excel/pom.xml
index e690be7..c26e654 100644
--- a/excel/pom.xml
+++ b/excel/pom.xml
@@ -17,7 +17,8 @@ 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/maven-v4_0_0.xsd">
+<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>
 		<artifactId>MetaModel</artifactId>
 		<groupId>org.apache.metamodel</groupId>
@@ -51,6 +52,10 @@ under the License.
 					<artifactId>log4j</artifactId>
 				</exclusion>
 				<exclusion>
+					<groupId>stax</groupId>
+					<artifactId>stax-api</artifactId>
+				</exclusion>
+				<exclusion>
 					<groupId>org.apache.geronimo.specs</groupId>
 					<artifactId>geronimo-stax-api_1.0_spec</artifactId>
 				</exclusion>

http://git-wip-us.apache.org/repos/asf/metamodel/blob/237f4547/full/pom.xml
----------------------------------------------------------------------
diff --git a/full/pom.xml b/full/pom.xml
index d375411..3ec76aa 100644
--- a/full/pom.xml
+++ b/full/pom.xml
@@ -17,7 +17,8 @@ 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/maven-v4_0_0.xsd">
+<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>
 		<artifactId>MetaModel</artifactId>
 		<groupId>org.apache.metamodel</groupId>
@@ -47,6 +48,30 @@ under the License.
 					</execution>
 				</executions>
 			</plugin>
+
+			<plugin>
+				<groupId>org.jboss.tattletale</groupId>
+				<artifactId>tattletale-maven</artifactId>
+				<version>1.1.2.Final</version>
+				<executions>
+					<execution>
+						<phase>verify</phase>
+						<goals>
+							<goal>report</goal>
+						</goals>
+					</execution>
+				</executions>
+				<configuration>
+					<source>${project.build.directory}/lib</source>
+					<destination>${project.reporting.outputDirectory}/tattletale</destination>
+					<reports>
+						<report>jar</report>
+						<report>multiplejars</report>
+					</reports>
+					<filter>tattletale-filters.properties</filter>
+					<failOnWarn>true</failOnWarn>
+				</configuration>
+			</plugin>
 		</plugins>
 
 		<pluginManagement>

http://git-wip-us.apache.org/repos/asf/metamodel/blob/237f4547/full/tattletale-filters.properties
----------------------------------------------------------------------
diff --git a/full/tattletale-filters.properties b/full/tattletale-filters.properties
new file mode 100644
index 0000000..fe90afd
--- /dev/null
+++ b/full/tattletale-filters.properties
@@ -0,0 +1,2 @@
+#Filtering file used for the Tattletale plugin. Since Hadoop has a few overlapping package-info files, this class mentions them explicitly to filter them out in the tattletale validation.
+multiplejars=org.apache.hadoop.yarn.client.api.impl.package-info,org.apache.hadoop.yarn.client.api.package-info,org.apache.hadoop.yarn.factories.package-info,org.apache.hadoop.yarn.factory.providers.package-info,org.apache.hadoop.yarn.util.package-info
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/metamodel/blob/237f4547/hadoop/pom.xml
----------------------------------------------------------------------
diff --git a/hadoop/pom.xml b/hadoop/pom.xml
index 0659b50..01cc692 100644
--- a/hadoop/pom.xml
+++ b/hadoop/pom.xml
@@ -9,7 +9,8 @@
 	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/maven-v4_0_0.xsd">
+<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>
 		<artifactId>MetaModel</artifactId>
 		<groupId>org.apache.metamodel</groupId>
@@ -34,6 +35,14 @@
 			<artifactId>hadoop-client</artifactId>
 		</dependency>
 		<dependency>
+			<groupId>commons-beanutils</groupId>
+			<artifactId>commons-beanutils</artifactId>
+		</dependency>
+		<dependency>
+			<groupId>net.sourceforge.findbugs</groupId>
+			<artifactId>annotations</artifactId>
+		</dependency>
+		<dependency>
 			<groupId>org.slf4j</groupId>
 			<artifactId>jcl-over-slf4j</artifactId>
 		</dependency>

http://git-wip-us.apache.org/repos/asf/metamodel/blob/237f4547/hadoop/src/test/java/org/apache/metamodel/util/HdfsResourceIntegrationTest.java
----------------------------------------------------------------------
diff --git a/hadoop/src/test/java/org/apache/metamodel/util/HdfsResourceIntegrationTest.java b/hadoop/src/test/java/org/apache/metamodel/util/HdfsResourceIntegrationTest.java
index 48f9caa..18e5891 100644
--- a/hadoop/src/test/java/org/apache/metamodel/util/HdfsResourceIntegrationTest.java
+++ b/hadoop/src/test/java/org/apache/metamodel/util/HdfsResourceIntegrationTest.java
@@ -20,7 +20,6 @@ package org.apache.metamodel.util;
 
 import java.io.File;
 import java.io.FileReader;
-import java.io.IOException;
 import java.io.InputStream;
 import java.io.OutputStream;
 import java.util.Arrays;
@@ -96,8 +95,8 @@ public class HdfsResourceIntegrationTest {
         int i = contents.length;
         Collections.reverse(Arrays.asList(contents));
         for (final String contentPart : contents) {
-            final HdfsResource partResource = new HdfsResource(_hostname, _port, _filePath + "/part-"
-                    + String.format("%02d", i--));
+            final HdfsResource partResource = new HdfsResource(_hostname, _port,
+                    _filePath + "/part-" + String.format("%02d", i--));
             partResource.write(new Action<OutputStream>() {
                 @Override
                 public void run(OutputStream out) throws Exception {
@@ -187,7 +186,7 @@ public class HdfsResourceIntegrationTest {
     }
 
     @Test
-    public void testFileSystemNotBeingClosed() throws IOException {
+    public void testFileSystemNotBeingClosed() throws Throwable {
         HdfsResource resourceToRead = null;
         try {
             resourceToRead = new HdfsResource(_hostname, _port, _filePath);
@@ -199,13 +198,18 @@ public class HdfsResourceIntegrationTest {
                 }
             });
 
+            final MutableRef<Throwable> throwableRef = new MutableRef<>();
+
             Thread.UncaughtExceptionHandler exceptionHandler = new Thread.UncaughtExceptionHandler() {
                 public void uncaughtException(Thread th, Throwable ex) {
+                    throwableRef.set(ex);
                     Assert.fail("Caught exception in the thread: " + ex);
                 }
             };
 
-            for (int i = 0; i < 10; i++) {
+            Thread[] threads = new Thread[10];
+
+            for (int i = 0; i < threads.length; i++) {
                 final HdfsResource res = new HdfsResource(_hostname, _port, _filePath);
 
                 Thread thread = new Thread(new Runnable() {
@@ -224,9 +228,21 @@ public class HdfsResourceIntegrationTest {
 
                     }
                 });
+                
                 thread.setUncaughtExceptionHandler(exceptionHandler);
                 thread.start();
+                threads[i] = thread;
+            }
+
+            for (int i = 0; i < threads.length; i++) {
+                threads[i].join();
+            }
+            
+            Throwable error = throwableRef.get();
+            if (error != null) {
+                throw error;
             }
+            
         } finally {
             if (resourceToRead != null) {
                 final FileSystem fileSystem = resourceToRead.getHadoopFileSystem();

http://git-wip-us.apache.org/repos/asf/metamodel/blob/237f4547/hbase/pom.xml
----------------------------------------------------------------------
diff --git a/hbase/pom.xml b/hbase/pom.xml
index 7ca2fca..8367e1e 100644
--- a/hbase/pom.xml
+++ b/hbase/pom.xml
@@ -63,6 +63,10 @@
 					<groupId>org.mortbay.jetty</groupId>
 				</exclusion>
 				<exclusion>
+						<groupId>com.github.stephenc.findbugs</groupId>
+						<artifactId>findbugs-annotations</artifactId>
+					</exclusion>
+				<exclusion>
 					<groupId>tomcat</groupId>
 					<artifactId>jasper-runtime</artifactId>
 				</exclusion>
@@ -133,6 +137,10 @@
 			</exclusions>
 		</dependency>
 		<dependency>
+			<groupId>net.sourceforge.findbugs</groupId>
+			<artifactId>annotations</artifactId>
+		</dependency>
+		<dependency>
 			<groupId>org.slf4j</groupId>
 			<artifactId>jcl-over-slf4j</artifactId>
 		</dependency>

http://git-wip-us.apache.org/repos/asf/metamodel/blob/237f4547/jdbc/pom.xml
----------------------------------------------------------------------
diff --git a/jdbc/pom.xml b/jdbc/pom.xml
index 378ebf0..bba6d71 100644
--- a/jdbc/pom.xml
+++ b/jdbc/pom.xml
@@ -1,23 +1,16 @@
 <?xml version="1.0" encoding="UTF-8" ?>
-<!--
-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/maven-v4_0_0.xsd">
+<!-- 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/maven-v4_0_0.xsd">
 	<parent>
 		<artifactId>MetaModel</artifactId>
 		<groupId>org.apache.metamodel</groupId>
@@ -37,7 +30,7 @@ under the License.
 			<groupId>commons-pool</groupId>
 			<artifactId>commons-pool</artifactId>
 		</dependency>
-		
+
 		<!-- Test dependencies -->
 		<dependency>
 			<groupId>org.slf4j</groupId>
@@ -122,6 +115,10 @@ under the License.
 					<groupId>commons-logging</groupId>
 					<artifactId>commons-logging</artifactId>
 				</exclusion>
+				<exclusion>
+					<groupId>javax.xml.stream</groupId>
+					<artifactId>stax-api</artifactId>
+				</exclusion>
 			</exclusions>
 		</dependency>
 		<dependency>

http://git-wip-us.apache.org/repos/asf/metamodel/blob/237f4547/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 86273ab..6d9d862 100644
--- a/pom.xml
+++ b/pom.xml
@@ -17,7 +17,8 @@ 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/maven-v4_0_0.xsd">
+<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">
 	<modelVersion>4.0.0</modelVersion>
 	<properties>
 		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
@@ -273,6 +274,16 @@ under the License.
 									<excludes>
 										<exclude>commons-logging:commons-logging:compile</exclude>
 										<exclude>org.codehaus.jackson:compile</exclude>
+										
+										<!-- commons-beanutils-core is redundant when we already depend on commons-beanutils -->
+										<exclude>commons-beanutils:commons-beanutils-core:*</exclude>
+										
+										<!-- stax-api is overlapping with xml-apis -->
+										<exclude>stax:stax-api:*</exclude>
+										<exclude>javax.xml.stream:stax-api</exclude>
+										
+										<!-- findbugs-annotations is overlapping with annotations -->
+										<exclude>com.github.stephenc.findbugs:findbugs-annotations:*</exclude>
 									</excludes>
 								</bannedDependencies>
 							</rules>
@@ -374,6 +385,7 @@ under the License.
 							<exclude>**/*.iws/**</exclude>
 							<exclude>**/*.ipr/**</exclude>
 							<exclude>**/.idea/**</exclude>
+							<exclude>**/tattletale-filters.properties</exclude>
 							<exclude>DEPENDENCIES</exclude>
 							<exclude>DISCLAIMER</exclude>
 						</excludes>
@@ -429,6 +441,22 @@ under the License.
 				</exclusions>
 			</dependency>
 			<dependency>
+				<groupId>commons-beanutils</groupId>
+				<artifactId>commons-beanutils</artifactId>
+				<version>1.9.2</version>
+				<exclusions>
+					<exclusion>
+						<artifactId>commons-logging</artifactId>
+						<groupId>commons-logging</groupId>
+					</exclusion>
+				</exclusions>
+			</dependency>
+			<dependency>
+				<groupId>net.sourceforge.findbugs</groupId>
+				<artifactId>annotations</artifactId>
+				<version>1.3.2</version>
+			</dependency>
+			<dependency>
 				<groupId>org.apache.httpcomponents</groupId>
 				<artifactId>httpcore</artifactId>
 				<version>${httpcomponents.version}</version>
@@ -500,6 +528,10 @@ under the License.
 						<groupId>org.mortbay.jetty</groupId>
 					</exclusion>
 					<exclusion>
+						<groupId>com.github.stephenc.findbugs</groupId>
+						<artifactId>findbugs-annotations</artifactId>
+					</exclusion>
+					<exclusion>
 						<groupId>commons-logging</groupId>
 						<artifactId>commons-logging</artifactId>
 					</exclusion>
@@ -529,6 +561,12 @@ under the License.
 				<groupId>org.apache.hadoop</groupId>
 				<artifactId>hadoop-mapreduce-client-core</artifactId>
 				<version>${hadoop.version}</version>
+				<exclusions>
+					<exclusion>
+						<groupId>javax.xml.stream</groupId>
+						<artifactId>stax-api</artifactId>
+					</exclusion>
+				</exclusions>
 			</dependency>
 			<dependency>
 				<groupId>org.apache.hadoop</groupId>
@@ -552,6 +590,10 @@ under the License.
 						<groupId>commons-logging</groupId>
 					</exclusion>
 					<exclusion>
+						<groupId>commons-beanutils</groupId>
+						<artifactId>commons-beanutils-core</artifactId>
+					</exclusion>
+					<exclusion>
 						<artifactId>jetty</artifactId>
 						<groupId>org.mortbay.jetty</groupId>
 					</exclusion>