From: <sha...@us...> - 2010-10-13 19:47:03
|
Revision: 2388 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=2388&view=rev Author: shadowtm Date: 2010-10-13 19:46:51 +0000 (Wed, 13 Oct 2010) Log Message: ----------- Added plugin to create components-core test jar so that the interfaces tests could reuse some of the code that was stored there. Cleaned up the parent pom to specify the plugins in pluginsManagement rather than in plugins. This was causing all plugins to be run for all modules implicitly. Now, if the child components wish to use a particular plugin they will have to specify it explicity with its pom. At this version, the entire project is building successfully with a maven install. Modified Paths: -------------- trunk/components-core/pom.xml trunk/interfaces/pom.xml trunk/pom.xml Modified: trunk/components-core/pom.xml =================================================================== --- trunk/components-core/pom.xml 2010-10-13 15:16:16 UTC (rev 2387) +++ trunk/components-core/pom.xml 2010-10-13 19:46:51 UTC (rev 2388) @@ -22,7 +22,6 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> - <version>2.4.3</version> <configuration> <excludes> <exclude>org/dllearner/test/*</exclude> @@ -32,6 +31,18 @@ </excludes> </configuration> </plugin> + <!--Jar the tests up into a separate jar so other components tests' can leverage them--> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-jar-plugin</artifactId> + <executions> + <execution> + <goals> + <goal>test-jar</goal> + </goals> + </execution> + </executions> + </plugin> </plugins> </build> Modified: trunk/interfaces/pom.xml =================================================================== --- trunk/interfaces/pom.xml 2010-10-13 15:16:16 UTC (rev 2387) +++ trunk/interfaces/pom.xml 2010-10-13 19:46:51 UTC (rev 2388) @@ -15,15 +15,38 @@ <artifactId>dllearner-parent</artifactId> <version>1.0-SNAPSHOT</version> </parent> + + <build> + <plugins> + <!--Surefire - for JUnits--> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-surefire-plugin</artifactId> + <configuration> + <excludes> + <exclude>org/dllearner/test/junit/OWLlinkTest.java</exclude> + </excludes> + </configuration> + </plugin> + </plugins> + </build> - <dependencies> <dependency> <groupId>org.dllearner</groupId> <artifactId>components-core</artifactId> </dependency> + + <!--Added the dependency of the core tests so that they will be accessible from the tests in this component--> <dependency> <groupId>org.dllearner</groupId> + <artifactId>components-core</artifactId> + <classifier>tests</classifier> + <scope>test</scope> + </dependency> + + <dependency> + <groupId>org.dllearner</groupId> <artifactId>components-ext</artifactId> </dependency> <dependency> Modified: trunk/pom.xml =================================================================== --- trunk/pom.xml 2010-10-13 15:16:16 UTC (rev 2387) +++ trunk/pom.xml 2010-10-13 19:46:51 UTC (rev 2388) @@ -31,6 +31,11 @@ </modules> <build> + <!-- + - Plugin Management defines the plugins that the child components can use + - It's good practice to do this as we can ensure all children use common versions + - of the plugins, and we can look in one place to see all plugin dependencies. + --> <pluginManagement> <plugins> <!--Surefire - for JUnits--> @@ -39,47 +44,55 @@ <artifactId>maven-surefire-plugin</artifactId> <version>2.4.3</version> </plugin> + <!--Maven Compiler Plugin--> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-compiler-plugin</artifactId> + <version>2.0.2</version> + <configuration> + <!--We use 1.6--> + <source>${compiler.version}</source> + <target>${compiler.version}</target> + <encoding>${project.build.sourceEncoding}</encoding> + </configuration> + </plugin> + + <!-- + - Maven Jar Plugin - if you want to create and/or sign jars. + - I'm putting this in so we can create a jar for the test classes + - in components core so that other components' tests can leverage them + --> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-jar-plugin</artifactId> + <version>2.3.1</version> + </plugin> + <!--JAR the Sources--> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-source-plugin</artifactId> + <executions> + <execution> + <goals> + <goal>jar</goal> + </goals> + </execution> + </executions> + </plugin> + <!--JAR the Java docs--> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-javadoc-plugin</artifactId> + <executions> + <execution> + <goals> + <goal>jar</goal> + </goals> + </execution> + </executions> + </plugin> </plugins> </pluginManagement> - <plugins> - - <!--Maven Compiler Plugin--> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-compiler-plugin</artifactId> - <version>2.0.2</version> - <configuration> - <!--We use 1.6--> - <source>${compiler.version}</source> - <target>${compiler.version}</target> - <encoding>${project.build.sourceEncoding}</encoding> - </configuration> - </plugin> - <!--JAR the Sources--> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-source-plugin</artifactId> - <executions> - <execution> - <goals> - <goal>jar</goal> - </goals> - </execution> - </executions> - </plugin> - <!--JAR the Java docs--> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-javadoc-plugin</artifactId> - <executions> - <execution> - <goals> - <goal>jar</goal> - </goals> - </execution> - </executions> - </plugin> - </plugins> </build> <dependencyManagement> @@ -221,8 +234,16 @@ <version>${dllearner.version}</version> </dependency> + <!--This is the jar of the tests from components-core--> <dependency> <groupId>org.dllearner</groupId> + <artifactId>components-core</artifactId> + <version>${dllearner.version}</version> + <classifier>tests</classifier> + </dependency> + + <dependency> + <groupId>org.dllearner</groupId> <artifactId>components-ext</artifactId> <version>${dllearner.version}</version> </dependency> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |