Updated Branches: refs/heads/master 076837116 -> 31b77af61
CRUNCH-18: Improve build stability. Specify version numbers for all plugins used as per Maven best practices. Introduce centralized plugin management to avoid duplication. Remove redundant dependencies from parent pom (dependency management has them). Add hints for m2eclipse so there are no errors in Eclipse. Signed-off-by: jwills <[email protected]> Project: http://git-wip-us.apache.org/repos/asf/incubator-crunch/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-crunch/commit/31b77af6 Tree: http://git-wip-us.apache.org/repos/asf/incubator-crunch/tree/31b77af6 Diff: http://git-wip-us.apache.org/repos/asf/incubator-crunch/diff/31b77af6 Branch: refs/heads/master Commit: 31b77af61a104a25c0b87da852a9665b045d70d6 Parents: 0768371 Author: Matthias Friedrich <[email protected]> Authored: Sun Jul 15 10:04:44 2012 +0200 Committer: jwills <[email protected]> Committed: Sun Jul 15 14:00:30 2012 -0700 ---------------------------------------------------------------------- crunch/pom.xml | 12 +- examples/pom.xml | 2 +- pom.xml | 407 ++++++++++++++++++++++--------------------------- scrunch/pom.xml | 26 +--- 4 files changed, 192 insertions(+), 255 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-crunch/blob/31b77af6/crunch/pom.xml ---------------------------------------------------------------------- diff --git a/crunch/pom.xml b/crunch/pom.xml index 45ca1ac..70523aa 100644 --- a/crunch/pom.xml +++ b/crunch/pom.xml @@ -27,7 +27,7 @@ under the License. </parent> <artifactId>crunch</artifactId> - <name>Apache Incubator Crunch</name> + <name>Apache Incubator Crunch Core</name> <dependencies> <dependency> @@ -150,6 +150,7 @@ under the License. <build> <plugins> <plugin> + <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-dependency-plugin</artifactId> <executions> <execution> @@ -171,7 +172,6 @@ under the License. <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>build-helper-maven-plugin</artifactId> - <version>1.7</version> <executions> <execution> <id>add-test-source</id> @@ -181,7 +181,7 @@ under the License. </goals> <configuration> <sources> - <source>src/it/java</source> + <source>${basedir}/src/it/java</source> </sources> </configuration> </execution> @@ -194,7 +194,7 @@ under the License. <configuration> <resources> <resource> - <directory>src/it/resources</directory> + <directory>${basedir}/src/it/resources</directory> </resource> </resources> </configuration> @@ -204,10 +204,8 @@ under the License. <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-failsafe-plugin</artifactId> - <version>2.12</version> <configuration> - <testSourceDirectory>src/it/java</testSourceDirectory> - <argLine>-Xmx512m</argLine> + <testSourceDirectory>${basedir}/src/it/java</testSourceDirectory> </configuration> <executions> <execution> http://git-wip-us.apache.org/repos/asf/incubator-crunch/blob/31b77af6/examples/pom.xml ---------------------------------------------------------------------- diff --git a/examples/pom.xml b/examples/pom.xml index 8702048..3a2c390 100644 --- a/examples/pom.xml +++ b/examples/pom.xml @@ -50,8 +50,8 @@ under the License. <build> <plugins> <plugin> + <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-assembly-plugin</artifactId> - <version>2.2.1</version> <configuration> <descriptors> <descriptor>src/main/assembly/hadoop-job.xml</descriptor> http://git-wip-us.apache.org/repos/asf/incubator-crunch/blob/31b77af6/pom.xml ---------------------------------------------------------------------- diff --git a/pom.xml b/pom.xml index c4d1ebb..bc27c75 100644 --- a/pom.xml +++ b/pom.xml @@ -25,9 +25,13 @@ under the License. <version>0.3.0-SNAPSHOT</version> <packaging>pom</packaging> - <name>Apache Incubator Crunch</name> + <name>Apache Incubator Crunch Parent</name> <url>http://incubator.apache.org/crunch/</url> + <prerequisites> + <maven>2.2.1</maven> + </prerequisites> + <modules> <module>crunch</module> <module>examples</module> @@ -36,6 +40,9 @@ under the License. <properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> + <java.source.version>1.6</java.source.version> + <java.target.version>1.6</java.target.version> + <scala.version>2.9.2</scala.version> <avro.version>1.7.0</avro.version> <hadoop.version>0.20.2-cdh3u4</hadoop.version> <hbase.version>0.90.6-cdh3u4</hbase.version> @@ -161,7 +168,7 @@ under the License. <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> - <version>4.8.2</version> + <version>4.10</version> </dependency> <dependency> @@ -266,199 +273,33 @@ under the License. </exclusion> </exclusions> </dependency> - </dependencies> - </dependencyManagement> - <dependencies> - <dependency> - <groupId>com.google.guava</groupId> - <artifactId>guava</artifactId> - <version>11.0.2</version> - </dependency> - - <dependency> - <groupId>org.apache.hadoop</groupId> - <artifactId>hadoop-client</artifactId> - <version>${hadoop.version}</version> - <scope>provided</scope> - </dependency> - - <dependency> - <groupId>org.apache.avro</groupId> - <artifactId>avro</artifactId> - <version>${avro.version}</version> - </dependency> - - <dependency> - <groupId>org.apache.avro</groupId> - <artifactId>avro-mapred</artifactId> - <version>${avro.version}</version> - </dependency> - - <dependency> - <groupId>commons-io</groupId> - <artifactId>commons-io</artifactId> - <version>2.2</version> - </dependency> - - <dependency> - <groupId>org.codehaus.jackson</groupId> - <artifactId>jackson-core-asl</artifactId> - <version>1.8.3</version> - </dependency> - - <dependency> - <groupId>org.codehaus.jackson</groupId> - <artifactId>jackson-mapper-asl</artifactId> - <version>1.8.3</version> - </dependency> - - <dependency> - <groupId>org.codehaus.jackson</groupId> - <artifactId>jackson-smile</artifactId> - <version>1.8.6</version> - </dependency> - - <!-- Both Protobufs and Thrift are supported as - derived serialization types, and you can use - (almost) any version of them you like, Crunch - only relies on the stable public APIs, not the - structure of the files themselves. - - Both dependencies are scoped as provided, in - order to not expand the size of the assembly jars - unnecessarily. - --> - - <dependency> - <groupId>com.google.protobuf</groupId> - <artifactId>protobuf-java</artifactId> - <version>2.4.1</version> - <scope>provided</scope> - </dependency> - - <dependency> - <groupId>org.apache.thrift</groupId> - <artifactId>libthrift</artifactId> - <version>0.8.0</version> - <scope>provided</scope> - </dependency> - - <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <version>4.8.2</version> - <scope>test</scope> - </dependency> + <dependency> + <groupId>org.scala-lang</groupId> + <artifactId>scala-library</artifactId> + <version>${scala.version}</version> + </dependency> + + <dependency> + <groupId>org.scala-lang</groupId> + <artifactId>scala-compiler</artifactId> + <version>${scala.version}</version> + </dependency> + + <dependency> + <groupId>org.scala-lang</groupId> + <artifactId>jline</artifactId> + <version>${scala.version}</version> + </dependency> + + <dependency> + <groupId>org.scalatest</groupId> + <artifactId>scalatest_${scala.version}</artifactId> + <version>1.7.2</version> + </dependency> + </dependencies> - <dependency> - <groupId>org.mockito</groupId> - <artifactId>mockito-all</artifactId> - <version>1.9.0</version> - <scope>test</scope> - </dependency> - - <dependency> - <groupId>org.apache.hadoop</groupId> - <artifactId>hadoop-minicluster</artifactId> - <version>${hadoop.version}</version> - <scope>test</scope> - </dependency> - - <dependency> - <groupId>org.hamcrest</groupId> - <artifactId>hamcrest-all</artifactId> - <version>1.1</version> - <scope>test</scope> - </dependency> - - <dependency> - <groupId>commons-logging</groupId> - <artifactId>commons-logging</artifactId> - <version>1.1.1</version> - </dependency> - - <dependency> - <groupId>log4j</groupId> - <artifactId>log4j</artifactId> - <version>1.2.15</version> - <exclusions> - <exclusion> - <groupId>javax.mail</groupId> - <artifactId>mail</artifactId> - </exclusion> - <exclusion> - <groupId>javax.jms</groupId> - <artifactId>jms</artifactId> - </exclusion> - <exclusion> - <groupId>com.sun.jdmk</groupId> - <artifactId>jmxtools</artifactId> - </exclusion> - <exclusion> - <groupId>com.sun.jmx</groupId> - <artifactId>jmxri</artifactId> - </exclusion> - </exclusions> - </dependency> - - <dependency> - <groupId>org.slf4j</groupId> - <artifactId>slf4j-log4j12</artifactId> - <version>1.6.1</version> - </dependency> - - <dependency> - <groupId>org.apache.hbase</groupId> - <artifactId>hbase</artifactId> - <version>${hbase.version}</version> - <scope>provided</scope> - <exclusions> - <exclusion> - <groupId>org.apache.hadoop</groupId> - <artifactId>avro</artifactId> - </exclusion> - <exclusion> - <groupId>org.apache.hadoop</groupId> - <artifactId>hadoop-core</artifactId> - </exclusion> - <exclusion> - <groupId>commons-logging</groupId> - <artifactId>commons-logging</artifactId> - </exclusion> - <exclusion> - <groupId>com.google.guava</groupId> - <artifactId>guava</artifactId> - </exclusion> - <exclusion> - <groupId>log4j</groupId> - <artifactId>log4j</artifactId> - </exclusion> - <exclusion> - <groupId>org.slf4j</groupId> - <artifactId>slf4j-log4j12</artifactId> - </exclusion> - </exclusions> - </dependency> - - <dependency> - <groupId>org.apache.hbase</groupId> - <artifactId>hbase</artifactId> - <version>${hbase.version}</version> - <type>test-jar</type> - <scope>test</scope> - <exclusions> - <exclusion> - <groupId>org.apache.hadoop</groupId> - <artifactId>avro</artifactId> - </exclusion> - <exclusion> - <groupId>org.slf4j</groupId> - <artifactId>slf4j-log4j12</artifactId> - </exclusion> - </exclusions> - </dependency> - </dependencies> + </dependencyManagement> <repositories> <repository> @@ -481,39 +322,7 @@ under the License. <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-compiler-plugin</artifactId> - <version>2.3.2</version> - <configuration> - <source>1.6</source> - <target>1.6</target> - </configuration> - </plugin> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-surefire-plugin</artifactId> - <version>2.10</version> - <configuration> - <argLine>-Xmx512m</argLine> - </configuration> - </plugin> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-source-plugin</artifactId> - <version>2.1.2</version> - <executions> - <execution> - <id>attach-sources</id> - <phase>verify</phase> - <goals> - <goal>jar-no-fork</goal> - </goals> - </execution> - </executions> - </plugin> - <plugin> - <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-site-plugin</artifactId> - <version>3.1</version> <dependencies> <dependency> <groupId>org.apache.maven.wagon</groupId> @@ -556,6 +365,154 @@ under the License. </configuration> </plugin> </plugins> + + <pluginManagement> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-clean-plugin</artifactId> + <version>2.5</version> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-resources-plugin</artifactId> + <version>2.5</version> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-compiler-plugin</artifactId> + <version>2.4</version> + <configuration> + <source>${java.source.version}</source> + <target>${java.target.version}</target> + </configuration> + </plugin> + <plugin> + <groupId>org.scala-tools</groupId> + <artifactId>maven-scala-plugin</artifactId> + <version>2.15.0</version> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-surefire-plugin</artifactId> + <version>2.12</version> + <configuration> + <argLine>-Xmx512m</argLine> + </configuration> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-failsafe-plugin</artifactId> + <version>2.12</version> + <configuration> + <argLine>-Xmx512m</argLine> + </configuration> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-jar-plugin</artifactId> + <version>2.4</version> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-dependency-plugin</artifactId> + <version>2.4</version> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-source-plugin</artifactId> + <version>2.1.2</version> + <executions> + <execution> + <id>attach-sources</id> + <phase>verify</phase> + <goals> + <goal>jar-no-fork</goal> + </goals> + </execution> + </executions> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-install-plugin</artifactId> + <version>2.3.1</version> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-deploy-plugin</artifactId> + <version>2.7</version> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-assembly-plugin</artifactId> + <version>2.3</version> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-site-plugin</artifactId> + <version>3.1</version> + </plugin> + <plugin> + <groupId>org.codehaus.mojo</groupId> + <artifactId>build-helper-maven-plugin</artifactId> + <version>1.7</version> + </plugin> + <!-- The m2eclipse plugin doesn't support all maven plugins we use, so + we tell it to ignore them to avoid errors in Eclipse. --> + <plugin> + <groupId>org.eclipse.m2e</groupId> + <artifactId>lifecycle-mapping</artifactId> + <version>1.0.0</version> + <configuration> + <lifecycleMappingMetadata> + <pluginExecutions> + <pluginExecution> + <pluginExecutionFilter> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-dependency-plugin</artifactId> + <versionRange>[1.0.0,)</versionRange> + <goals> + <goal>copy-dependencies</goal> + </goals> + </pluginExecutionFilter> + <action> + <ignore /> + </action> + </pluginExecution> + <pluginExecution> + <pluginExecutionFilter> + <groupId>org.codehaus.mojo</groupId> + <artifactId>build-helper-maven-plugin</artifactId> + <versionRange>[1.0.0,)</versionRange> + <goals> + <goal>add-test-source</goal> + <goal>add-test-resource</goal> + </goals> + </pluginExecutionFilter> + <action> + <ignore /> + </action> + </pluginExecution> + <pluginExecution> + <pluginExecutionFilter> + <groupId>org.scala-tools</groupId> + <artifactId>maven-scala-plugin</artifactId> + <versionRange>[1.0.0,)</versionRange> + <goals> + <goal>compile</goal> + <goal>testCompile</goal> + </goals> + </pluginExecutionFilter> + <action> + <ignore /> + </action> + </pluginExecution> + </pluginExecutions> + </lifecycleMappingMetadata> + </configuration> + </plugin> + </plugins> + </pluginManagement> </build> </project> http://git-wip-us.apache.org/repos/asf/incubator-crunch/blob/31b77af6/scrunch/pom.xml ---------------------------------------------------------------------- diff --git a/scrunch/pom.xml b/scrunch/pom.xml index 50c5ab1..d521511 100644 --- a/scrunch/pom.xml +++ b/scrunch/pom.xml @@ -29,32 +29,22 @@ under the License. <artifactId>scrunch</artifactId> <name>Apache Incubator Crunch for Scala</name> - <properties> - <maven.compiler.source>1.6</maven.compiler.source> - <maven.compiler.target>1.6</maven.compiler.target> - <scala.version>2.9.2</scala.version> - </properties> - <dependencies> <dependency> <groupId>org.scala-lang</groupId> <artifactId>scala-library</artifactId> - <version>${scala.version}</version> </dependency> <dependency> <groupId>org.scala-lang</groupId> <artifactId>scala-compiler</artifactId> - <version>${scala.version}</version> </dependency> <dependency> <groupId>org.scala-lang</groupId> <artifactId>jline</artifactId> - <version>${scala.version}</version> </dependency> <dependency> <groupId>org.apache.crunch</groupId> <artifactId>crunch</artifactId> - <version>0.3.0-SNAPSHOT</version> </dependency> <dependency> <groupId>org.apache.hadoop</groupId> @@ -69,18 +59,15 @@ under the License. <dependency> <groupId>org.slf4j</groupId> <artifactId>slf4j-log4j12</artifactId> - <version>1.6.1</version> </dependency> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> - <version>4.10</version> <scope>test</scope> </dependency> <dependency> <groupId>org.scalatest</groupId> <artifactId>scalatest_${scala.version}</artifactId> - <version>1.7.2</version> <scope>test</scope> </dependency> </dependencies> @@ -88,8 +75,8 @@ under the License. <build> <plugins> <plugin> + <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-assembly-plugin</artifactId> - <version>2.2.1</version> <executions> <execution> <id>jar-with-dependencies</id> @@ -120,7 +107,6 @@ under the License. <plugin> <groupId>org.scala-tools</groupId> <artifactId>maven-scala-plugin</artifactId> - <version>2.15.0</version> <executions> <execution> <goals> @@ -140,7 +126,6 @@ under the License. <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> - <version>2.10</version> <configuration> <useFile>false</useFile> <disableXmlReport>true</disableXmlReport> @@ -158,7 +143,6 @@ under the License. <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>build-helper-maven-plugin</artifactId> - <version>1.7</version> <executions> <execution> <id>add-test-source</id> @@ -168,7 +152,7 @@ under the License. </goals> <configuration> <sources> - <source>src/it/scala</source> + <source>${basedir}/src/it/scala</source> </sources> </configuration> </execution> @@ -181,7 +165,7 @@ under the License. <configuration> <resources> <resource> - <directory>src/it/resources</directory> + <directory>${basedir}/src/it/resources</directory> </resource> </resources> </configuration> @@ -191,12 +175,10 @@ under the License. <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-failsafe-plugin</artifactId> - <version>2.12</version> <configuration> - <testSourceDirectory>src/it/scala</testSourceDirectory> + <testSourceDirectory>${basedir}/src/it/scala</testSourceDirectory> <useFile>false</useFile> <disableXmlReport>true</disableXmlReport> - <argLine>-Xmx512m</argLine> <includes> <include>**/*Test.*</include> <include>**/*Suite.*</include>
