Skip to content

Commit

Permalink
MAHOUT-1043 Tweak Maven setup for better compatibility with m2e
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.apache.org/repos/asf/mahout/trunk@1359707 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
srowen committed Jul 10, 2012
1 parent d6d6ee8 commit ee6e470
Show file tree
Hide file tree
Showing 7 changed files with 103 additions and 41 deletions.
34 changes: 11 additions & 23 deletions core/pom.xml
Expand Up @@ -35,43 +35,33 @@
<packaging>jar</packaging>

<build>
<resources>
<resource>
<directory>src/main/resources</directory>
</resource>
<resource>
<directory>../src/conf</directory>
<includes>
<include>driver.classes.default.props</include>
</includes>
</resource>
</resources>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.4</version>
<configuration>
<encoding>UTF-8</encoding>
<source>1.6</source>
<target>1.6</target>
<optimize>true</optimize>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.7</version>
<executions>
<execution>
<phase>compile</phase>
<configuration>
<tasks>
<copy file="../src/conf/driver.classes.props" tofile="${project.build.directory}/classes/driver.classes.default.props" />
</tasks>

</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>

<!-- create test jar so other modules can reuse the core test utility classes. -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>2.4</version>
<executions>
<execution>
<goals>
Expand All @@ -85,7 +75,6 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.3</version>
<executions>
<execution>
<id>job</id>
Expand Down Expand Up @@ -113,7 +102,6 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-remote-resources-plugin</artifactId>
<version>1.3</version>
<configuration>
<appendedResourcesDirectory>../src/main/appended-resources</appendedResourcesDirectory>
<resourceBundles>
Expand Down
7 changes: 0 additions & 7 deletions distribution/pom.xml
Expand Up @@ -23,9 +23,7 @@
<version>0.8-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<groupId>org.apache.mahout</groupId>
<artifactId>mahout-distribution</artifactId>
<version>0.8-SNAPSHOT</version>
<name>Mahout Release Package</name>
<description>Distribution Package</description>
<packaging>pom</packaging>
Expand All @@ -38,7 +36,6 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.3</version>
<executions>
<execution>
<id>bin-assembly</id>
Expand Down Expand Up @@ -87,22 +84,18 @@
<dependency>
<groupId>org.apache.mahout</groupId>
<artifactId>mahout-math</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.apache.mahout</groupId>
<artifactId>mahout-integration</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.apache.mahout</groupId>
<artifactId>mahout-core</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.apache.mahout</groupId>
<artifactId>mahout-examples</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
</project>
4 changes: 0 additions & 4 deletions examples/pom.xml
Expand Up @@ -40,7 +40,6 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.4</version>
<configuration>
<encoding>UTF-8</encoding>
<source>1.6</source>
Expand All @@ -51,7 +50,6 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>2.4</version>
<executions>
<execution>
<id>copy-dependencies</id>
Expand All @@ -70,7 +68,6 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.3</version>
<executions>
<execution>
<id>job</id>
Expand All @@ -92,7 +89,6 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-remote-resources-plugin</artifactId>
<version>1.3</version>
<configuration>
<appendedResourcesDirectory>../src/main/appended-resources</appendedResourcesDirectory>
<resourceBundles>
Expand Down
3 changes: 0 additions & 3 deletions integration/pom.xml
Expand Up @@ -40,7 +40,6 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.4</version>
<configuration>
<encoding>UTF-8</encoding>
<source>1.6</source>
Expand All @@ -51,7 +50,6 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>2.4</version>
<executions>
<execution>
<id>copy-dependencies</id>
Expand All @@ -68,7 +66,6 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-remote-resources-plugin</artifactId>
<version>1.3</version>
<configuration>
<appendedResourcesDirectory>../src/main/appended-resources</appendedResourcesDirectory>
<resourceBundles>
Expand Down
38 changes: 34 additions & 4 deletions math/pom.xml
Expand Up @@ -43,7 +43,6 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.4</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
Expand All @@ -53,9 +52,9 @@
<plugin>
<groupId>org.apache.mahout</groupId>
<artifactId>mahout-collection-codegen-plugin</artifactId>
<version>1.0</version>
<executions>
<execution>
<phase>generate-sources</phase>
<goals>
<goal>generate</goal>
</goals>
Expand All @@ -68,6 +67,39 @@
<!--<testExcludes>-->
<!--<testExclude>**/BooleanArrayListTest.java</testExclude>-->
<!--</testExcludes>-->
<outputDirectory>${project.build.directory}/generated-sources/mahout</outputDirectory>
<testOutputDirectory>${project.build.directory}/generated-test-sources/mahout</testOutputDirectory>
</configuration>
</execution>
</executions>
</plugin>

<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<executions>
<execution>
<id>add-source</id>
<phase>generate-sources</phase>
<goals>
<goal>add-source</goal>
</goals>
<configuration>
<sources>
<source>${project.build.directory}/generated-sources/mahout</source>
</sources>
</configuration>
</execution>
<execution>
<id>add-test-source</id>
<phase>generate-sources</phase>
<goals>
<goal>add-test-source</goal>
</goals>
<configuration>
<sources>
<source>${project.build.directory}/generated-test-sources/mahout</source>
</sources>
</configuration>
</execution>
</executions>
Expand All @@ -77,7 +109,6 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>2.4</version>
<executions>
<execution>
<goals>
Expand All @@ -99,7 +130,6 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-remote-resources-plugin</artifactId>
<version>1.3</version>
<configuration>
<appendedResourcesDirectory>../src/main/appended-resources</appendedResourcesDirectory>
<resourceBundles>
Expand Down
58 changes: 58 additions & 0 deletions pom.xml
Expand Up @@ -158,6 +158,12 @@
<version>${project.version}</version>
</dependency>

<dependency>
<artifactId>mahout-examples</artifactId>
<groupId>${project.groupId}</groupId>
<version>${project.version}</version>
</dependency>

<!-- 3rd party -->
<dependency>
<groupId>org.apache.lucene</groupId>
Expand Down Expand Up @@ -442,6 +448,43 @@
<defaultGoal>install</defaultGoal>
<pluginManagement>
<plugins>
<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>[2.4,)</versionRange>
<goals>
<goal>copy-dependencies</goal>
</goals>
</pluginExecutionFilter>
<action>
<ignore/>
</action>
</pluginExecution>
<pluginExecution>
<pluginExecutionFilter>
<groupId>org.apache.mahout</groupId>
<artifactId>mahout-collection-codegen-plugin</artifactId>
<versionRange>[1.0,)</versionRange>
<goals>
<goal>generate</goal>
</goals>
</pluginExecutionFilter>
<action>
<execute/>
</action>
</pluginExecution>
</pluginExecutions>
</lifecycleMappingMetadata>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
Expand Down Expand Up @@ -476,6 +519,11 @@
<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-install-plugin</artifactId>
Expand Down Expand Up @@ -637,6 +685,16 @@
</supplementalModels>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.mahout</groupId>
<artifactId>mahout-collection-codegen-plugin</artifactId>
<version>1.0</version>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>1.7</version>
</plugin>
</plugins>
</pluginManagement>
<plugins>
Expand Down
File renamed without changes.

0 comments on commit ee6e470

Please sign in to comment.