Permalink
Browse files

Adding relative path example

  • Loading branch information...
1 parent a566c94 commit 73434e4a0af0f51c242f5ae8efc51a88383afc8a @matthewmccullough committed Nov 12, 2010
@@ -0,0 +1,3 @@
+This project showcases a multimodule build with a relative path instead of a version number. This should eventually be possible when MNG-624 is closed.
+
+This currently fails in Maven 2.2.1 and 3.0.0.
@@ -0,0 +1,15 @@
+<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>com.ambientideas</groupId>
+ <artifactId>sample08d-multimodulejava-parent</artifactId>
+ <packaging>pom</packaging>
+ <version>1.0-SNAPSHOT</version>
+ <name>Sample Multimodule Java Parent</name>
+ <url>http://maven.apache.org</url>
+
+
+ <modules>
+ <module>sample-multimodulejava-module1</module>
+ </modules>
+</project>
@@ -0,0 +1 @@
+mvn versions:display-dependency-updates
@@ -0,0 +1,24 @@
+<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>
+ <groupId>com.ambientideas</groupId>
+ <artifactId>sample08d-multimodulejava-parent</artifactId>
+ <relativePath>../</relativePath>
+ </parent>
+
+ <groupId>com.ambientideas</groupId>
+ <artifactId>sample-multimodulejava-module1</artifactId>
+ <packaging>jar</packaging>
+ <version>1.0-SNAPSHOT</version>
+ <name>Sample Multimodule Java 1</name>
+ <url>http://maven.apache.org</url>
+ <dependencies>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>4.1</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+</project>
@@ -0,0 +1,13 @@
+package com.ambientideas;
+
+/**
+ * Hello world!
+ *
+ */
+public class App1
+{
+ public static void main( String[] args )
+ {
+ System.out.println( "Hello World!" );
+ }
+}
@@ -0,0 +1,38 @@
+package com.ambientideas;
+
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+
+/**
+ * Unit test for simple App.
+ */
+public class App1Test
+ extends TestCase
+{
+ /**
+ * Create the test case
+ *
+ * @param testName name of the test case
+ */
+ public App1Test( String testName )
+ {
+ super( testName );
+ }
+
+ /**
+ * @return the suite of tests being tested
+ */
+ public static Test suite()
+ {
+ return new TestSuite( App1Test.class );
+ }
+
+ /**
+ * Rigourous Test :-)
+ */
+ public void testApp1()
+ {
+ assertTrue( true );
+ }
+}

0 comments on commit 73434e4

Please sign in to comment.