Author: kenney Date: Mon Sep 5 07:12:07 2005 New Revision: 278741 URL: http://svn.apache.org/viewcvs?rev=278741&view=rev Log: Fixed MNG-805. It's a bit of a workaround but fits nicely with the workaround style already in place.
Modified it0012 to be useful (it always succeeded!) and added a child project to demonstrate this commit fixes MNG-805. Added: maven/components/trunk/maven-core-it/it0012/child-project/ maven/components/trunk/maven-core-it/it0012/child-project/pom.xml (with props) Removed: maven/components/trunk/maven-core-it/it0012/src/ Modified: maven/components/trunk/maven-core-it/it0012/expected-results.txt maven/components/trunk/maven-core-it/it0012/goals.txt maven/components/trunk/maven-core-it/it0012/pom.xml maven/components/trunk/maven-project/src/main/java/org/apache/maven/project/DefaultMavenProjectBuilder.java Added: maven/components/trunk/maven-core-it/it0012/child-project/pom.xml URL: http://svn.apache.org/viewcvs/maven/components/trunk/maven-core-it/it0012/child-project/pom.xml?rev=278741&view=auto ============================================================================== --- maven/components/trunk/maven-core-it/it0012/child-project/pom.xml (added) +++ maven/components/trunk/maven-core-it/it0012/child-project/pom.xml Mon Sep 5 07:12:07 2005 @@ -0,0 +1,19 @@ +<model> + <modelVersion>4.0.0</modelVersion> + <groupId>org.apache.maven</groupId> + <artifactId>maven-core-it0012-child-project</artifactId> + <packaging>jar</packaging> + <version>3.0.3</version> + <build> + <plugins> + <plugin> + <artifactId>maven-core-it-plugin</artifactId> + <version>1.0-SNAPSHOT</version> + <configuration> + <outputDirectory>${basedir}/target/</outputDirectory> + <pluginFile>child-touch-${version}.txt</pluginFile> + </configuration> + </plugin> + </plugins> + </build> +</model> Propchange: maven/components/trunk/maven-core-it/it0012/child-project/pom.xml ------------------------------------------------------------------------------ svn:eol-style = native Propchange: maven/components/trunk/maven-core-it/it0012/child-project/pom.xml ------------------------------------------------------------------------------ svn:keywords = "Author Date Id Revision" Modified: maven/components/trunk/maven-core-it/it0012/expected-results.txt URL: http://svn.apache.org/viewcvs/maven/components/trunk/maven-core-it/it0012/expected-results.txt?rev=278741&r1=278740&r2=278741&view=diff ============================================================================== --- maven/components/trunk/maven-core-it/it0012/expected-results.txt (original) +++ maven/components/trunk/maven-core-it/it0012/expected-results.txt Mon Sep 5 07:12:07 2005 @@ -1 +1,2 @@ -target/classes/org/apache/maven/it0012/PersonFinder.class \ No newline at end of file +target/touch-3.8.1.txt +child-project/target/child-touch-3.0.3.txt Modified: maven/components/trunk/maven-core-it/it0012/goals.txt URL: http://svn.apache.org/viewcvs/maven/components/trunk/maven-core-it/it0012/goals.txt?rev=278741&r1=278740&r2=278741&view=diff ============================================================================== --- maven/components/trunk/maven-core-it/it0012/goals.txt (original) +++ maven/components/trunk/maven-core-it/it0012/goals.txt Mon Sep 5 07:12:07 2005 @@ -1 +1 @@ -compile +core-it:touch Modified: maven/components/trunk/maven-core-it/it0012/pom.xml URL: http://svn.apache.org/viewcvs/maven/components/trunk/maven-core-it/it0012/pom.xml?rev=278741&r1=278740&r2=278741&view=diff ============================================================================== --- maven/components/trunk/maven-core-it/it0012/pom.xml (original) +++ maven/components/trunk/maven-core-it/it0012/pom.xml Mon Sep 5 07:12:07 2005 @@ -4,20 +4,19 @@ <artifactId>maven-core-it0012</artifactId> <packaging>jar</packaging> <version>3.8.1</version> - <dependencies> - <dependency> - <groupId>org.apache.maven</groupId> - <artifactId>maven-plugin-api</artifactId> - <version>2.0-beta-1-SNAPSHOT</version> - <type>jar</type> - <scope>compile</scope> - </dependency> - <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <version>${version}</version> - <type>jar</type> - <scope>test</scope> - </dependency> - </dependencies> + <build> + <plugins> + <plugin> + <artifactId>maven-core-it-plugin</artifactId> + <version>1.0-SNAPSHOT</version> + <configuration> + <pluginFile>touch-${version}.txt</pluginFile> + </configuration> + </plugin> + </plugins> + </build> + + <modules> + <module>child-project</module> + </modules> </model> Modified: maven/components/trunk/maven-project/src/main/java/org/apache/maven/project/DefaultMavenProjectBuilder.java URL: http://svn.apache.org/viewcvs/maven/components/trunk/maven-project/src/main/java/org/apache/maven/project/DefaultMavenProjectBuilder.java?rev=278741&r1=278740&r2=278741&view=diff ============================================================================== --- maven/components/trunk/maven-project/src/main/java/org/apache/maven/project/DefaultMavenProjectBuilder.java (original) +++ maven/components/trunk/maven-project/src/main/java/org/apache/maven/project/DefaultMavenProjectBuilder.java Mon Sep 5 07:12:07 2005 @@ -580,7 +580,19 @@ // [BP] - Can this above comment be explained? // We don't need all the project methods that are added over those in the model, but we do need basedir Map context = new HashMap( System.getProperties() ); - context.put( "basedir", project.getBasedir() ); + + // FIXME: why is project.file not filled in here? MavenProject.getBasedir() defaults + // to the current directory which causes all sorts of problems; might be better off + // setting that to null and just filling in the project file name and removing this. + + if ( pomLocation != null && new File( pomLocation ).getParent() != null ) + { + context.put( "basedir", new File( pomLocation ).getParent() ); + } + else + { + context.put( "basedir", project.getBasedir() ); + } model = modelInterpolator.interpolate( model, context ); --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]