You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mahout.apache.org by dr...@apache.org on 2010/10/04 05:44:15 UTC
svn commit: r1004097 - in /mahout/trunk: bin/mahout core/pom.xml
core/src/main/assembly/ core/src/main/assembly/job.xml etc/build.xml
examples/pom.xml examples/src/main/assembly/
examples/src/main/assembly/job.xml
Author: drew
Date: Mon Oct 4 03:44:15 2010
New Revision: 1004097
URL: http://svn.apache.org/viewvc?rev=1004097&view=rev
Log:
MAHOUT-505: Alternate mechanism for assembling job files. Now produces *-job.jar instead of *.job, should resolve Hudson artifact indexing issues
Added:
mahout/trunk/core/src/main/assembly/
mahout/trunk/core/src/main/assembly/job.xml
mahout/trunk/examples/src/main/assembly/
mahout/trunk/examples/src/main/assembly/job.xml
Modified:
mahout/trunk/bin/mahout
mahout/trunk/core/pom.xml
mahout/trunk/etc/build.xml
mahout/trunk/examples/pom.xml
Modified: mahout/trunk/bin/mahout
URL: http://svn.apache.org/viewvc/mahout/trunk/bin/mahout?rev=1004097&r1=1004096&r2=1004097&view=diff
==============================================================================
--- mahout/trunk/bin/mahout (original)
+++ mahout/trunk/bin/mahout Mon Oct 4 03:44:15 2010
@@ -30,7 +30,7 @@
# running mahout locally. If specified, the classes
# from the 'target/classes' directories in each project
# are used. Otherwise classes will be retrived from
-# jars in the binary releas collection or *.job files
+# jars in the binary releas collection or *-job.jar files
# found in build directories. When running on hadoop
# the job files will always be used.
@@ -124,7 +124,7 @@ then
done
# add dev targets if they exist
- for f in $MAHOUT_HOME/*/target/mahout-*.job; do
+ for f in $MAHOUT_HOME/*/target/mahout-*-job.jar; do
CLASSPATH=${CLASSPATH}:$f;
done
@@ -176,14 +176,14 @@ fi
CLASS=org.apache.mahout.driver.MahoutDriver
-for f in $MAHOUT_HOME/examples/target/mahout-examples-*.job; do
+for f in $MAHOUT_HOME/examples/target/mahout-examples-*-job.jar; do
if [ -e "$f" ]; then
MAHOUT_JOB=$f
fi
done
if [ "$MAHOUT_JOB" = "" ]; then
- for f in $MAHOUT_HOME/mahout-examples-*.job; do
+ for f in $MAHOUT_HOME/mahout-examples-*-job.jar; do
if [ -e "$f" ]; then
MAHOUT_JOB=$f
fi
Modified: mahout/trunk/core/pom.xml
URL: http://svn.apache.org/viewvc/mahout/trunk/core/pom.xml?rev=1004097&r1=1004096&r2=1004097&view=diff
==============================================================================
--- mahout/trunk/core/pom.xml (original)
+++ mahout/trunk/core/pom.xml Mon Oct 4 03:44:15 2010
@@ -17,7 +17,10 @@
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>
<groupId>org.apache.mahout</groupId>
@@ -63,66 +66,22 @@
</executions>
</plugin>
- <!-- Build the Job Jar -->
+ <!-- create core hadoop job jar -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-dependency-plugin</artifactId>
+ <artifactId>maven-assembly-plugin</artifactId>
+ <version>2.2-beta-5</version>
<executions>
<execution>
- <id>copy-dependencies</id>
+ <id>job</id>
<phase>package</phase>
<goals>
- <goal>copy-dependencies</goal>
+ <goal>single</goal>
</goals>
<configuration>
- <!-- configure the plugin here -->
- </configuration>
- </execution>
- </executions>
- </plugin>
-
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-antrun-plugin</artifactId>
- <executions>
- <execution>
- <phase>package</phase>
- <configuration>
- <tasks>
- <ant antfile="../etc/build.xml" target="core-job">
- <property name="dest" value="${project.build.directory}" />
- <property name="fullnamever" value="${project.artifactId}-${project.version}" />
- </ant>
- </tasks>
-
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- <!-- attach the Job jar -->
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>build-helper-maven-plugin</artifactId>
- <version>1.1</version>
- <executions>
- <execution>
- <id>attach-artifacts</id>
- <phase>package</phase>
- <goals>
- <goal>attach-artifact</goal>
- </goals>
- <configuration>
- <artifacts>
- <artifact>
- <file>${project.build.directory}/${artifactId}-${version}.job</file>
- <type>job</type>
- <!--<classifier>job</classifier>-->
- </artifact>
-
- </artifacts>
+ <descriptors>
+ <descriptor>src/main/assembly/job.xml</descriptor>
+ </descriptors>
</configuration>
</execution>
</executions>
@@ -132,6 +91,7 @@
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.4</version>
</plugin>
+
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-remote-resources-plugin</artifactId>
Added: mahout/trunk/core/src/main/assembly/job.xml
URL: http://svn.apache.org/viewvc/mahout/trunk/core/src/main/assembly/job.xml?rev=1004097&view=auto
==============================================================================
--- mahout/trunk/core/src/main/assembly/job.xml (added)
+++ mahout/trunk/core/src/main/assembly/job.xml Mon Oct 4 03:44:15 2010
@@ -0,0 +1,31 @@
+<assembly
+ xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0
+ http://maven.apache.org/xsd/assembly-1.1.0.xsd">
+ <id>job</id>
+ <formats>
+ <format>jar</format>
+ </formats>
+ <includeBaseDirectory>false</includeBaseDirectory>
+ <dependencySets>
+ <dependencySet>
+ <unpack>false</unpack>
+ <scope>runtime</scope>
+ <outputDirectory>lib</outputDirectory>
+ <excludes>
+ <exclude>org.apache.hadoop:hadoop-core</exclude>
+ <exclude>org.apache.mahout:*</exclude>
+ </excludes>
+ </dependencySet>
+ </dependencySets>
+ <fileSets>
+ <fileSet>
+ <directory>${basedir}/target/classes</directory>
+ <outputDirectory>/</outputDirectory>
+ <excludes>
+ <exclude>*.jar</exclude>
+ </excludes>
+ </fileSet>
+ </fileSets>
+</assembly>
Modified: mahout/trunk/etc/build.xml
URL: http://svn.apache.org/viewvc/mahout/trunk/etc/build.xml?rev=1004097&r1=1004096&r2=1004097&view=diff
==============================================================================
--- mahout/trunk/etc/build.xml (original)
+++ mahout/trunk/etc/build.xml Mon Oct 4 03:44:15 2010
@@ -24,28 +24,6 @@
-->
<project name="mahout" default="core-job" basedir=".">
- <!-- Run in core during the package phase -->
- <target name="core-job" >
- <jar jarfile="${dest}/${fullnamever}.job">
- <zipfileset dir="${dest}/classes"/>
- <zipfileset dir="../math/target/classes"/>
- <zipfileset dir="${dest}/dependency" prefix="lib"
- includes="**/*.jar" excludes="mahout-math-*.jar,mahout-core*.jar,mahout-utils*.jar"/>
- </jar>
- </target>
-
- <!-- Run in examples during the package phase -->
- <target name="example-job" depends="">
- <jar jarfile="${dest}/${fullnamever}.job">
- <zipfileset dir="${dest}/classes"/>
- <zipfileset dir="../math/target/classes"/>
- <zipfileset dir="../core/target/classes"/>
- <zipfileset dir="../utils/target/classes"/>
- <zipfileset dir="${dest}/dependency" prefix="lib"
- includes="**/*.jar" excludes="mahout-math-*.jar,mahout-core*.jar,mahout-utils*.jar"/>
- </jar>
- </target>
-
<!-- Run in examples during the package phase -->
<target name="build-grouplens-jar">
<jar jarfile="${dest}/grouplens.jar">
Modified: mahout/trunk/examples/pom.xml
URL: http://svn.apache.org/viewvc/mahout/trunk/examples/pom.xml?rev=1004097&r1=1004096&r2=1004097&view=diff
==============================================================================
--- mahout/trunk/examples/pom.xml (original)
+++ mahout/trunk/examples/pom.xml Mon Oct 4 03:44:15 2010
@@ -17,7 +17,10 @@
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>
<parent>
@@ -49,22 +52,6 @@
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-dependency-plugin</artifactId>
- <executions>
- <execution>
- <id>copy-dependencies</id>
- <phase>package</phase>
- <goals>
- <goal>copy-dependencies</goal>
- </goals>
- <configuration>
- <!-- configure the plugin here -->
- </configuration>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
@@ -72,12 +59,6 @@
<phase>package</phase>
<configuration>
<tasks>
- <ant antfile="../etc/build.xml" target="example-job">
- <property name="dest" value="${project.build.directory}" />
- <property name="fullnamever" value="${project.artifactId}-${project.version}" />
-
- <property name="version" value="${project.version}" />
- </ant>
<ant antfile="../etc/build.xml" target="build-grouplens-jar">
<property name="dest" value="${project.build.directory}" />
<property name="examples-base" value="src/main/java" />
@@ -92,31 +73,28 @@
</executions>
</plugin>
- <!-- Attach the Job Jar -->
+ <!-- create examples hadoop job jar -->
<plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>build-helper-maven-plugin</artifactId>
- <version>1.1</version>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-assembly-plugin</artifactId>
+ <version>2.2-beta-5</version>
<executions>
<execution>
- <id>attach-artifacts</id>
+ <id>job</id>
<phase>package</phase>
<goals>
- <goal>attach-artifact</goal>
+ <goal>single</goal>
</goals>
<configuration>
- <artifacts>
- <artifact>
- <file>${project.build.directory}/${artifactId}-${version}.job</file>
- <type>job</type>
- <!--<classifier>job</classifier>-->
- </artifact>
-
- </artifacts>
+ <descriptors>
+ <descriptor>src/main/assembly/job.xml</descriptor>
+ </descriptors>
</configuration>
</execution>
</executions>
</plugin>
+
+
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-remote-resources-plugin</artifactId>
Added: mahout/trunk/examples/src/main/assembly/job.xml
URL: http://svn.apache.org/viewvc/mahout/trunk/examples/src/main/assembly/job.xml?rev=1004097&view=auto
==============================================================================
--- mahout/trunk/examples/src/main/assembly/job.xml (added)
+++ mahout/trunk/examples/src/main/assembly/job.xml Mon Oct 4 03:44:15 2010
@@ -0,0 +1,39 @@
+<assembly
+ xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0
+ http://maven.apache.org/xsd/assembly-1.1.0.xsd">
+ <id>job</id>
+ <formats>
+ <format>jar</format>
+ </formats>
+ <includeBaseDirectory>false</includeBaseDirectory>
+ <dependencySets>
+ <dependencySet>
+ <unpack>false</unpack>
+ <scope>runtime</scope>
+ <outputDirectory>lib</outputDirectory>
+ <excludes>
+ <exclude>org.apache.hadoop:hadoop-core</exclude>
+ <exclude>org.apache.mahout:*</exclude>
+ </excludes>
+ </dependencySet>
+ <dependencySet>
+ <unpack>true</unpack>
+ <scope>runtime</scope>
+ <outputDirectory>/</outputDirectory>
+ <includes>
+ <include>org.apache.mahout:*</include>
+ </includes>
+ </dependencySet>
+ </dependencySets>
+ <fileSets>
+ <fileSet>
+ <directory>${basedir}/target/classes</directory>
+ <outputDirectory>/</outputDirectory>
+ <excludes>
+ <exclude>*.jar</exclude>
+ </excludes>
+ </fileSet>
+ </fileSets>
+</assembly>