You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by be...@apache.org on 2008/12/26 17:56:31 UTC
svn commit: r729511 - in /maven/components/trunk/maven-project/src/test:
java/org/apache/maven/project/builder/
resources-project-builder/basedir-aligned-interpolation/
Author: bentmann
Date: Fri Dec 26 08:56:31 2008
New Revision: 729511
URL: http://svn.apache.org/viewvc?rev=729511&view=rev
Log:
o Created UT from MNG-3822
Added:
maven/components/trunk/maven-project/src/test/resources-project-builder/basedir-aligned-interpolation/ (with props)
maven/components/trunk/maven-project/src/test/resources-project-builder/basedir-aligned-interpolation/pom.xml (with props)
Modified:
maven/components/trunk/maven-project/src/test/java/org/apache/maven/project/builder/PomConstructionTest.java
Modified: maven/components/trunk/maven-project/src/test/java/org/apache/maven/project/builder/PomConstructionTest.java
URL: http://svn.apache.org/viewvc/maven/components/trunk/maven-project/src/test/java/org/apache/maven/project/builder/PomConstructionTest.java?rev=729511&r1=729510&r2=729511&view=diff
==============================================================================
--- maven/components/trunk/maven-project/src/test/java/org/apache/maven/project/builder/PomConstructionTest.java (original)
+++ maven/components/trunk/maven-project/src/test/java/org/apache/maven/project/builder/PomConstructionTest.java Fri Dec 26 08:56:31 2008
@@ -390,6 +390,26 @@
assertTrue( pom.getValue( "properties/projectSiteOut" ).toString().endsWith( "doc" ) );
}
+ public void testInterpolationWithBasedirAlignedDirectories()
+ throws Exception
+ {
+ PomTestWrapper pom = buildPom( "basedir-aligned-interpolation" );
+ assertEquals( new File( pom.getBasedir(), "src/main/java" ),
+ new File( pom.getValue( "properties/buildMainSrc" ).toString() ) );
+ assertEquals( new File( pom.getBasedir(), "src/test/java" ),
+ new File( pom.getValue( "properties/buildTestSrc" ).toString() ) );
+ assertEquals( new File( pom.getBasedir(), "src/main/scripts" ),
+ new File( pom.getValue( "properties/buildScriptSrc" ).toString() ) );
+ assertEquals( new File( pom.getBasedir(), "target" ),
+ new File( pom.getValue( "properties/buildOut" ).toString() ) );
+ assertEquals( new File( pom.getBasedir(), "target/classes" ),
+ new File( pom.getValue( "properties/buildMainOut" ).toString() ) );
+ assertEquals( new File( pom.getBasedir(), "target/test-classes" ),
+ new File( pom.getValue( "properties/buildTestOut" ).toString() ) );
+ assertEquals( new File( pom.getBasedir(), "target/site" ),
+ new File( pom.getValue( "properties/siteOut" ).toString() ) );
+ }
+
private PomArtifactResolver artifactResolver( String basedir )
{
return new FileBasedPomArtifactResolver( new File( BASE_POM_DIR, basedir ) );
Propchange: maven/components/trunk/maven-project/src/test/resources-project-builder/basedir-aligned-interpolation/
------------------------------------------------------------------------------
bugtraq:label = Enter issue ID:
Propchange: maven/components/trunk/maven-project/src/test/resources-project-builder/basedir-aligned-interpolation/
------------------------------------------------------------------------------
bugtraq:message = Issue id: %BUGID%
Propchange: maven/components/trunk/maven-project/src/test/resources-project-builder/basedir-aligned-interpolation/
------------------------------------------------------------------------------
bugtraq:number = false
Propchange: maven/components/trunk/maven-project/src/test/resources-project-builder/basedir-aligned-interpolation/
------------------------------------------------------------------------------
bugtraq:url = http://jira.codehaus.org/browse/%BUGID%
Added: maven/components/trunk/maven-project/src/test/resources-project-builder/basedir-aligned-interpolation/pom.xml
URL: http://svn.apache.org/viewvc/maven/components/trunk/maven-project/src/test/resources-project-builder/basedir-aligned-interpolation/pom.xml?rev=729511&view=auto
==============================================================================
--- maven/components/trunk/maven-project/src/test/resources-project-builder/basedir-aligned-interpolation/pom.xml (added)
+++ maven/components/trunk/maven-project/src/test/resources-project-builder/basedir-aligned-interpolation/pom.xml Fri Dec 26 08:56:31 2008
@@ -0,0 +1,60 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<project>
+ <modelVersion>4.0.0</modelVersion>
+
+ <groupId>org.apache.maven.its.mng3822</groupId>
+ <artifactId>test1</artifactId>
+ <version>1.0-SNAPSHOT</version>
+
+ <name>Maven Integration Test :: MNG-3822</name>
+ <description>
+ Verify that POM interpolation uses basedir-aligned build directories.
+ </description>
+
+ <properties>
+ <!-- this is where we collect all the interpolated values for the POM dump -->
+ <buildMainSrc>${project.build.sourceDirectory}</buildMainSrc>
+ <buildTestSrc>${project.build.testSourceDirectory}</buildTestSrc>
+ <buildScriptSrc>${project.build.scriptSourceDirectory}</buildScriptSrc>
+ <buildOut>${project.build.directory}</buildOut>
+ <buildMainOut>${project.build.outputDirectory}</buildMainOut>
+ <buildTestOut>${project.build.testOutputDirectory}</buildTestOut>
+ <siteOut>${project.reporting.outputDirectory}</siteOut>
+ </properties>
+
+ <build>
+ <!--
+ NOTE: Deliberately set all build directories to relative paths to ensure they really need basedir alignment.
+ -->
+ <sourceDirectory>src/main/java</sourceDirectory>
+ <testSourceDirectory>src/test/java</testSourceDirectory>
+ <scriptSourceDirectory>src/main/scripts</scriptSourceDirectory>
+ <directory>target</directory>
+ <outputDirectory>target/classes</outputDirectory>
+ <testOutputDirectory>target/test-classes</testOutputDirectory>
+ </build>
+
+ <reporting>
+ <outputDirectory>target/site</outputDirectory>
+ </reporting>
+</project>
Propchange: maven/components/trunk/maven-project/src/test/resources-project-builder/basedir-aligned-interpolation/pom.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/components/trunk/maven-project/src/test/resources-project-builder/basedir-aligned-interpolation/pom.xml
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision