You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by jd...@apache.org on 2008/07/18 17:40:58 UTC

svn commit: r677942 - in /maven/components/branches/maven-2.0.10-RC/maven-project/src: main/java/org/apache/maven/project/ test/java/org/apache/maven/project/ test/resources/project-dynamism/

Author: jdcasey
Date: Fri Jul 18 08:40:58 2008
New Revision: 677942

URL: http://svn.apache.org/viewvc?rev=677942&view=rev
Log:
[MNG-3671] Make sure plugin-level dependencies are concrete before the project instance is returned from the project builder initially. Plugin-level dependencies are exempted from build-section dynamism, along with plugin artifactId, groupId, and version...these things must be declarative.

Added:
    maven/components/branches/maven-2.0.10-RC/maven-project/src/test/resources/project-dynamism/plugin-level-dep.pom.xml
Modified:
    maven/components/branches/maven-2.0.10-RC/maven-project/src/main/java/org/apache/maven/project/DefaultMavenProjectBuilder.java
    maven/components/branches/maven-2.0.10-RC/maven-project/src/test/java/org/apache/maven/project/MavenProjectDynamismTest.java

Modified: maven/components/branches/maven-2.0.10-RC/maven-project/src/main/java/org/apache/maven/project/DefaultMavenProjectBuilder.java
URL: http://svn.apache.org/viewvc/maven/components/branches/maven-2.0.10-RC/maven-project/src/main/java/org/apache/maven/project/DefaultMavenProjectBuilder.java?rev=677942&r1=677941&r2=677942&view=diff
==============================================================================
--- maven/components/branches/maven-2.0.10-RC/maven-project/src/main/java/org/apache/maven/project/DefaultMavenProjectBuilder.java (original)
+++ maven/components/branches/maven-2.0.10-RC/maven-project/src/main/java/org/apache/maven/project/DefaultMavenProjectBuilder.java Fri Jul 18 08:40:58 2008
@@ -1114,6 +1114,8 @@
                 dPlugin.setGroupId( iPlugin.getGroupId() );
                 dPlugin.setArtifactId( iPlugin.getArtifactId() );
                 dPlugin.setVersion( iPlugin.getVersion() );
+                
+                dPlugin.setDependencies( iPlugin.getDependencies() );
             }
         }
 
@@ -1135,6 +1137,8 @@
                     dPlugin.setGroupId( iPlugin.getGroupId() );
                     dPlugin.setArtifactId( iPlugin.getArtifactId() );
                     dPlugin.setVersion( iPlugin.getVersion() );
+                    
+                    dPlugin.setDependencies( iPlugin.getDependencies() );
                 }
             }
         }

Modified: maven/components/branches/maven-2.0.10-RC/maven-project/src/test/java/org/apache/maven/project/MavenProjectDynamismTest.java
URL: http://svn.apache.org/viewvc/maven/components/branches/maven-2.0.10-RC/maven-project/src/test/java/org/apache/maven/project/MavenProjectDynamismTest.java?rev=677942&r1=677941&r2=677942&view=diff
==============================================================================
--- maven/components/branches/maven-2.0.10-RC/maven-project/src/test/java/org/apache/maven/project/MavenProjectDynamismTest.java (original)
+++ maven/components/branches/maven-2.0.10-RC/maven-project/src/test/java/org/apache/maven/project/MavenProjectDynamismTest.java Fri Jul 18 08:40:58 2008
@@ -20,8 +20,11 @@
  */
 
 import org.apache.maven.model.Build;
+import org.apache.maven.model.Dependency;
+import org.apache.maven.model.Model;
 import org.apache.maven.model.Plugin;
 import org.apache.maven.model.Resource;
+import org.apache.maven.model.io.xpp3.MavenXpp3Writer;
 import org.apache.maven.project.interpolation.ModelInterpolationException;
 import org.codehaus.plexus.PlexusTestCase;
 import org.codehaus.plexus.util.StringUtils;
@@ -32,6 +35,7 @@
 import java.io.File;
 import java.io.IOException;
 import java.io.InputStreamReader;
+import java.io.StringWriter;
 import java.net.URI;
 import java.net.URISyntaxException;
 import java.net.URL;
@@ -43,7 +47,7 @@
 public class MavenProjectDynamismTest
     extends PlexusTestCase
 {
-    
+
     private MavenProjectBuilder projectBuilder;
 
     public void setUp()
@@ -66,9 +70,12 @@
 
         Build build = project.getBuild();
 
-        assertTrue( build.getSourceDirectory() + " doesn't start with base-path: " + basepath, build.getSourceDirectory().startsWith( basepath ) );
-        assertTrue( build.getTestSourceDirectory() + " doesn't start with base-path: " + basepath, build.getTestSourceDirectory().startsWith( basepath ) );
-        assertTrue( build.getScriptSourceDirectory() + " doesn't start with base-path: " + basepath, build.getScriptSourceDirectory().startsWith( basepath ) );
+        assertTrue( build.getSourceDirectory() + " doesn't start with base-path: " + basepath,
+                    build.getSourceDirectory().startsWith( basepath ) );
+        assertTrue( build.getTestSourceDirectory() + " doesn't start with base-path: " + basepath,
+                    build.getTestSourceDirectory().startsWith( basepath ) );
+        assertTrue( build.getScriptSourceDirectory() + " doesn't start with base-path: " + basepath,
+                    build.getScriptSourceDirectory().startsWith( basepath ) );
 
         List plugins = build.getPlugins();
         assertNotNull( plugins );
@@ -85,10 +92,8 @@
 
         for ( int i = 0; i < children.length; i++ )
         {
-            assertEquals( "Configuration parameter: "
-                                          + children[i].getName()
-                                          + " should have a an interpolated POM groupId as its value.",
-                          children[i].getValue(),
+            assertEquals( "Configuration parameter: " + children[i].getName()
+                + " should have a an interpolated POM groupId as its value.", children[i].getValue(),
                           project.getGroupId() );
         }
 
@@ -99,10 +104,13 @@
         String nakedGidExpr = "${groupId}";
 
         build = project.getBuild();
-        
-        assertTrue( build.getSourceDirectory() + " didn't start with: " + projectGidExpr, build.getSourceDirectory().startsWith( projectGidExpr ) );
-        assertTrue( build.getTestSourceDirectory() + " didn't start with: " + pomGidExpr, build.getTestSourceDirectory().startsWith( pomGidExpr ) );
-        assertTrue( build.getScriptSourceDirectory() + " didn't start with: " + nakedGidExpr, build.getScriptSourceDirectory().startsWith( nakedGidExpr ) );
+
+        assertTrue( build.getSourceDirectory() + " didn't start with: " + projectGidExpr,
+                    build.getSourceDirectory().startsWith( projectGidExpr ) );
+        assertTrue( build.getTestSourceDirectory() + " didn't start with: " + pomGidExpr,
+                    build.getTestSourceDirectory().startsWith( pomGidExpr ) );
+        assertTrue( build.getScriptSourceDirectory() + " didn't start with: " + nakedGidExpr,
+                    build.getScriptSourceDirectory().startsWith( nakedGidExpr ) );
 
         plugins = build.getPlugins();
         assertNotNull( plugins );
@@ -117,19 +125,19 @@
         children = conf.getChildren();
         assertEquals( 3, children.length );
 
-        assertEquals( "Configuration parameter: " + children[0].getName() + " should have "
-                      + projectGidExpr + " as its value.", children[0].getValue(), projectGidExpr );
+        assertEquals( "Configuration parameter: " + children[0].getName() + " should have " + projectGidExpr
+            + " as its value.", children[0].getValue(), projectGidExpr );
 
-        assertEquals( "Configuration parameter: " + children[1].getName() + " should have "
-                      + pomGidExpr + " as its value.", children[1].getValue(), pomGidExpr );
+        assertEquals( "Configuration parameter: " + children[1].getName() + " should have " + pomGidExpr
+            + " as its value.", children[1].getValue(), pomGidExpr );
 
-        assertEquals( "Configuration parameter: " + children[2].getName() + " should have "
-                      + nakedGidExpr + " as its value.", children[2].getValue(), nakedGidExpr );
+        assertEquals( "Configuration parameter: " + children[2].getName() + " should have " + nakedGidExpr
+            + " as its value.", children[2].getValue(), nakedGidExpr );
     }
 
     public void testRoundTrip()
-        throws IOException, XmlPullParserException, URISyntaxException,
-        ModelInterpolationException, ProjectBuildingException
+        throws IOException, XmlPullParserException, URISyntaxException, ModelInterpolationException,
+        ProjectBuildingException
     {
         MavenProject project = buildProject( "pom.xml" );
         ProjectBuilderConfiguration config = new DefaultProjectBuilderConfiguration();
@@ -161,9 +169,7 @@
 
         assertNotNull( "Concrete compile-source roots should not be null.", compileSourceRoots );
 
-        assertEquals( "Concrete compile-source roots should contain one entry.",
-                      1,
-                      compileSourceRoots.size() );
+        assertEquals( "Concrete compile-source roots should contain one entry.", 1, compileSourceRoots.size() );
 
         assertEquals( "Concrete compile-source roots should contain interpolated source-directory value.",
                       new File( baseDir, "/src/main/java" ).getAbsolutePath(),
@@ -171,12 +177,9 @@
 
         List testCompileSourceRoots = project.getTestCompileSourceRoots();
 
-        assertNotNull( "Concrete test-compile-source roots should not be null.",
-                       testCompileSourceRoots );
+        assertNotNull( "Concrete test-compile-source roots should not be null.", testCompileSourceRoots );
 
-        assertEquals( "Concrete test-compile-source roots should contain one entry.",
-                      1,
-                      testCompileSourceRoots.size() );
+        assertEquals( "Concrete test-compile-source roots should contain one entry.", 1, testCompileSourceRoots.size() );
 
         assertEquals( "Concrete test-compile-source roots should contain interpolated test-source-directory value.",
                       new File( baseDir, "/src/test/java" ).getAbsolutePath(),
@@ -186,9 +189,7 @@
 
         assertNotNull( "Concrete script-source roots should not be null.", scriptSourceRoots );
 
-        assertEquals( "Concrete script-source roots should contain one entry.",
-                      1,
-                      scriptSourceRoots.size() );
+        assertEquals( "Concrete script-source roots should contain one entry.", 1, scriptSourceRoots.size() );
 
         assertEquals( "Concrete script-source roots should contain interpolated script-source-directory value.",
                       new File( baseDir, "/src/main/scripts" ).getAbsolutePath(),
@@ -222,8 +223,7 @@
                       new File( buildDir, "/test-classes" ).getAbsolutePath(),
                       new File( build.getTestOutputDirectory() ).getAbsolutePath() );
 
-        assertEquals( "Concrete build directory should be absolute.",
-                      new File( baseDir, "target" ).getAbsolutePath(),
+        assertEquals( "Concrete build directory should be absolute.", new File( baseDir, "target" ).getAbsolutePath(),
                       new File( build.getDirectory() ).getAbsolutePath() );
 
         // --------------------------------------------------------------------
@@ -237,54 +237,42 @@
 
         build = project.getBuild();
 
-        assertEquals( "Restored source directory should be expressed in terms of the basedir.\nWas: " + build.getSourceDirectory() + "\nShould be: " + basedirExpr + "/src/main/java\n",
-                      basedirExpr + "/src/main/java",
-                      build.getSourceDirectory() );
-
-        assertEquals( "Restored test-source directory should be expressed in terms of the basedir.",
-                      basedirExpr + "/src/test/java",
-                      build.getTestSourceDirectory() );
-
-        assertEquals( "Restored script-source directory should be expressed in terms of the basedir.",
-                      basedirExpr + "/src/main/scripts",
-                      build.getScriptSourceDirectory() );
+        assertEquals( "Restored source directory should be expressed in terms of the basedir.\nWas: "
+            + build.getSourceDirectory() + "\nShould be: " + basedirExpr + "/src/main/java\n", basedirExpr
+            + "/src/main/java", build.getSourceDirectory() );
+
+        assertEquals( "Restored test-source directory should be expressed in terms of the basedir.", basedirExpr
+            + "/src/test/java", build.getTestSourceDirectory() );
+
+        assertEquals( "Restored script-source directory should be expressed in terms of the basedir.", basedirExpr
+            + "/src/main/scripts", build.getScriptSourceDirectory() );
 
         compileSourceRoots = project.getCompileSourceRoots();
 
         assertNotNull( "Restored compile-source roots should not be null.", compileSourceRoots );
 
-        assertEquals( "Restored compile-source roots should contain one entry.",
-                      1,
-                      compileSourceRoots.size() );
+        assertEquals( "Restored compile-source roots should contain one entry.", 1, compileSourceRoots.size() );
 
         assertEquals( "Restored compile-source roots should contain uninterpolated source-directory value.",
-                      "${pom.basedir}/src/main/java",
-                      compileSourceRoots.get( 0 ) );
+                      "${pom.basedir}/src/main/java", compileSourceRoots.get( 0 ) );
 
         testCompileSourceRoots = project.getTestCompileSourceRoots();
 
-        assertNotNull( "Restored test-compile-source roots should not be null.",
-                       testCompileSourceRoots );
+        assertNotNull( "Restored test-compile-source roots should not be null.", testCompileSourceRoots );
 
-        assertEquals( "Restored test-compile-source roots should contain one entry.",
-                      1,
-                      testCompileSourceRoots.size() );
+        assertEquals( "Restored test-compile-source roots should contain one entry.", 1, testCompileSourceRoots.size() );
 
         assertEquals( "Restored test-compile-source roots should contain uninterpolated test-source-directory value.",
-                      "${pom.basedir}/src/test/java",
-                      testCompileSourceRoots.get( 0 ) );
+                      "${pom.basedir}/src/test/java", testCompileSourceRoots.get( 0 ) );
 
         scriptSourceRoots = project.getScriptSourceRoots();
 
         assertNotNull( "Restored script-source roots should not be null.", scriptSourceRoots );
 
-        assertEquals( "Restored script-source roots should contain one entry.",
-                      1,
-                      scriptSourceRoots.size() );
+        assertEquals( "Restored script-source roots should contain one entry.", 1, scriptSourceRoots.size() );
 
         assertEquals( "Restored script-source roots should contain uninterpolated script-source-directory value.",
-                      "${pom.basedir}/src/main/scripts",
-                      scriptSourceRoots.get( 0 ) );
+                      "${pom.basedir}/src/main/scripts", scriptSourceRoots.get( 0 ) );
 
         resources = build.getResources();
 
@@ -292,9 +280,8 @@
 
         assertEquals( "Restored resources should contain one entry.", 1, resources.size() );
 
-        assertEquals( "Restored resource should contain uninterpolated reference to build directory.",
-                      buildDirExpr + "/generated-resources/plexus",
-                      ( (Resource) resources.get( 0 ) ).getDirectory() );
+        assertEquals( "Restored resource should contain uninterpolated reference to build directory.", buildDirExpr
+            + "/generated-resources/plexus", ( (Resource) resources.get( 0 ) ).getDirectory() );
 
         filters = build.getFilters();
 
@@ -302,21 +289,16 @@
 
         assertEquals( "Restored filters should contain one entry.", 1, filters.size() );
 
-        assertEquals( "Restored filter entry should contain uninterpolated reference to build directory.",
-                      buildDirExpr + "/generated-filters.properties",
-                      filters.get( 0 ) );
-
-        assertEquals( "Restored output-directory should be expressed in terms of the build-directory.",
-                      buildDirExpr + "/classes",
-                      build.getOutputDirectory() );
+        assertEquals( "Restored filter entry should contain uninterpolated reference to build directory.", buildDirExpr
+            + "/generated-filters.properties", filters.get( 0 ) );
+
+        assertEquals( "Restored output-directory should be expressed in terms of the build-directory.", buildDirExpr
+            + "/classes", build.getOutputDirectory() );
 
         assertEquals( "Restored test-output-directory should be expressed in terms of the build-directory.",
-                      buildDirExpr + "/test-classes",
-                      build.getTestOutputDirectory() );
+                      buildDirExpr + "/test-classes", build.getTestOutputDirectory() );
 
-        assertEquals( "Restored build directory should be relative.",
-                      "target",
-                      build.getDirectory() );
+        assertEquals( "Restored build directory should be relative.", "target", build.getDirectory() );
     }
 
     public void testShouldPreserveAddedResourceInRestoredState()
@@ -351,9 +333,7 @@
         resources = build.getResources();
         assertNotNull( "Restored resources should not be null.", resources );
         assertEquals( "Restored resources should contain two entries.", 2, resources.size() );
-        assertResourcePresent( "restored resources",
-                               "${pom.build.directory}/generated-resources/plexus",
-                               resources );
+        assertResourcePresent( "restored resources", "${pom.build.directory}/generated-resources/plexus", resources );
         assertResourcePresent( "restored resources", "myDir", resources );
     }
 
@@ -386,9 +366,7 @@
         filters = build.getFilters();
         assertNotNull( "Restored filters should not be null.", filters );
         assertEquals( "Restored filters should contain two entries.", 2, filters.size() );
-        assertFilterPresent( "restored filters",
-                             "${pom.build.directory}/generated-filters.properties",
-                             filters );
+        assertFilterPresent( "restored filters", "${pom.build.directory}/generated-filters.properties", filters );
         assertFilterPresent( "restored filters", "myDir/filters.properties", filters );
     }
 
@@ -404,8 +382,7 @@
         Build build = project.getBuild();
 
         assertEquals( "First concrete build directory should be absolute and point to target dir.",
-                      new File( project.getBasedir(), "target" ).getAbsolutePath(),
-                      build.getDirectory() );
+                      new File( project.getBasedir(), "target" ).getAbsolutePath(), build.getDirectory() );
         assertEquals( "First concrete build output-directory should be absolute and point to target/classes dir.",
                       new File( project.getBasedir(), "target/classes" ).getAbsolutePath(),
                       new File( build.getOutputDirectory() ).getAbsolutePath() );
@@ -413,9 +390,9 @@
         build.setDirectory( "target2" );
 
         assertEquals( "AFTER CHANGING BUILD DIRECTORY, build directory should be relative and point to target2 dir.",
-                      "target2",
-                      build.getDirectory() );
-        assertEquals( "AFTER CHANGING BUILD DIRECTORY, build output-directory should be absolute and still point to target/classes dir.",
+                      "target2", build.getDirectory() );
+        assertEquals(
+                      "AFTER CHANGING BUILD DIRECTORY, build output-directory should be absolute and still point to target/classes dir.",
                       new File( project.getBasedir(), "target/classes" ).getAbsolutePath(),
                       new File( build.getOutputDirectory() ).getAbsolutePath() );
 
@@ -449,8 +426,7 @@
         projectBuilder.calculateConcreteState( project, config );
 
         assertEquals( "After resetting build-directory and going through a recalculation phase for the project, "
-                                      + "property value for 'myProperty' should STILL be the absolute initial build directory.",
-                      originalValue,
+            + "property value for 'myProperty' should STILL be the absolute initial build directory.", originalValue,
                       project.getProperties().getProperty( "myProperty" ) );
     }
 
@@ -464,51 +440,53 @@
         projectBuilder.calculateConcreteState( project, config );
 
         List compileSourceRoots = project.getCompileSourceRoots();
-        assertNotNull( "First concrete state compile-source roots should not be null.",
-                       compileSourceRoots );
-        assertEquals( "First concrete state should contain one compile-source root.",
-                      1,
-                      compileSourceRoots.size() );
+        assertNotNull( "First concrete state compile-source roots should not be null.", compileSourceRoots );
+        assertEquals( "First concrete state should contain one compile-source root.", 1, compileSourceRoots.size() );
         assertEquals( "First concrete state should have an absolute path for compile-source root.",
-                      new File( project.getBasedir(), "src/main/java" ).getAbsolutePath(),
-                      compileSourceRoots.get( 0 ) );
+                      new File( project.getBasedir(), "src/main/java" ).getAbsolutePath(), compileSourceRoots.get( 0 ) );
 
-        String newSourceRoot = new File( project.getBuild().getDirectory(),
-                                         "generated-sources/modello" ).getAbsolutePath();
+        String newSourceRoot =
+            new File( project.getBuild().getDirectory(), "generated-sources/modello" ).getAbsolutePath();
 
         project.addCompileSourceRoot( newSourceRoot );
 
         projectBuilder.restoreDynamicState( project, config );
 
         compileSourceRoots = project.getCompileSourceRoots();
-        assertNotNull( "Restored dynamic state compile-source roots should not be null.",
-                       compileSourceRoots );
-        assertEquals( "Restored dynamic state should contain two compile-source roots.",
-                      2,
-                      compileSourceRoots.size() );
+        assertNotNull( "Restored dynamic state compile-source roots should not be null.", compileSourceRoots );
+        assertEquals( "Restored dynamic state should contain two compile-source roots.", 2, compileSourceRoots.size() );
         assertEquals( "Restored dynamic state should have a relative path for original compile-source root.",
-                      "src/main/java",
-                      compileSourceRoots.get( 0 ) );
+                      "src/main/java", compileSourceRoots.get( 0 ) );
         assertEquals( "Restored dynamic state should have a relative path for new compile-source root.",
-                      "target/generated-sources/modello",
-                      compileSourceRoots.get( 1 ) );
+                      "target/generated-sources/modello", compileSourceRoots.get( 1 ) );
 
         projectBuilder.calculateConcreteState( project, config );
 
         compileSourceRoots = project.getCompileSourceRoots();
-        assertNotNull( "Second concrete state compile-source roots should not be null.",
-                       compileSourceRoots );
-        assertEquals( "Second concrete state should contain two compile-source roots.",
-                      2,
-                      compileSourceRoots.size() );
+        assertNotNull( "Second concrete state compile-source roots should not be null.", compileSourceRoots );
+        assertEquals( "Second concrete state should contain two compile-source roots.", 2, compileSourceRoots.size() );
         assertEquals( "Second concrete state should have an absolute path for original compile-source root.",
-                      new File( project.getBasedir(), "src/main/java" ).getAbsolutePath(),
-                      compileSourceRoots.get( 0 ) );
-        assertEquals( "Second concrete state should have an absolute path for new compile-source root.",
-                      newSourceRoot,
+                      new File( project.getBasedir(), "src/main/java" ).getAbsolutePath(), compileSourceRoots.get( 0 ) );
+        assertEquals( "Second concrete state should have an absolute path for new compile-source root.", newSourceRoot,
                       compileSourceRoots.get( 1 ) );
     }
 
+    public void testShouldInterpolatePluginLevelDependency()
+        throws IOException, XmlPullParserException, URISyntaxException, ProjectBuildingException,
+        ModelInterpolationException
+    {
+        MavenProject project = buildProject( "plugin-level-dep.pom.xml" );
+
+        Plugin plugin = (Plugin) project.getBuild().getPluginsAsMap().get( "org.apache.maven.plugins:maven-compiler-plugin" );
+        
+        assertNotNull( "ERROR - compiler plugin config not found!", plugin );
+        assertTrue( "ERROR - compiler plugin custom dependencies not found!", ( plugin.getDependencies() != null && !plugin.getDependencies().isEmpty() ) );
+        
+        Dependency dep = (Dependency) plugin.getDependencies().get( 0 );
+        
+        assertEquals( "custom dependency version should be an INTERPOLATED reference to this project's version.", project.getVersion(), dep.getVersion() );
+    }
+
     // Useful for diagnostics.
 //    private void displayPOM( Model model )
 //        throws IOException
@@ -519,9 +497,7 @@
 //        System.out.println( writer.toString() );
 //    }
 
-    private void assertResourcePresent( String testLabel,
-                                        String directory,
-                                        List resources )
+    private void assertResourcePresent( String testLabel, String directory, List resources )
     {
         boolean found = false;
 
@@ -530,7 +506,8 @@
             for ( Iterator it = resources.iterator(); it.hasNext(); )
             {
                 Resource resource = (Resource) it.next();
-                if ( new File( directory ).getAbsolutePath().equals( new File( resource.getDirectory() ).getAbsolutePath() ) )
+                if ( new File( directory ).getAbsolutePath().equals(
+                                                                     new File( resource.getDirectory() ).getAbsolutePath() ) )
                 {
                     found = true;
                     break;
@@ -544,9 +521,7 @@
         }
     }
 
-    private void assertFilterPresent( String testLabel,
-                                      String path,
-                                      List filters )
+    private void assertFilterPresent( String testLabel, String path, List filters )
     {
         boolean found = false;
 
@@ -574,7 +549,7 @@
     {
         ClassLoader cloader = Thread.currentThread().getContextClassLoader();
         URL resource = cloader.getResource( "project-dynamism/" + path );
-        
+
         if ( resource == null )
         {
             fail( "Cannot find classpath resource for POM: " + path );
@@ -582,12 +557,11 @@
 
         String resourcePath = StringUtils.replace( resource.getPath(), "%20", " " );
         URI uri = new File( resourcePath ).toURI().normalize();
-        
+
         File pomFile = new File( uri );
         pomFile = pomFile.getAbsoluteFile();
-        
-        MavenProject project = projectBuilder.build( pomFile,
-                                                     new DefaultProjectBuilderConfiguration() );
+
+        MavenProject project = projectBuilder.build( pomFile, new DefaultProjectBuilderConfiguration() );
 
         assertEquals( pomFile, project.getFile() );
 

Added: maven/components/branches/maven-2.0.10-RC/maven-project/src/test/resources/project-dynamism/plugin-level-dep.pom.xml
URL: http://svn.apache.org/viewvc/maven/components/branches/maven-2.0.10-RC/maven-project/src/test/resources/project-dynamism/plugin-level-dep.pom.xml?rev=677942&view=auto
==============================================================================
--- maven/components/branches/maven-2.0.10-RC/maven-project/src/test/resources/project-dynamism/plugin-level-dep.pom.xml (added)
+++ maven/components/branches/maven-2.0.10-RC/maven-project/src/test/resources/project-dynamism/plugin-level-dep.pom.xml Fri Jul 18 08:40:58 2008
@@ -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>
+  <groupId>testing</groupId>
+  <artifactId>plugin-level-dep</artifactId>
+  <packaging>jar</packaging>
+  <version>3.8.1</version>
+
+  <build>
+    <plugins>
+      <plugin>
+        <artifactId>maven-compiler-plugin</artifactId>
+        <version>2.0.2</version>
+        <dependencies>
+          <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <version>${pom.version}</version>
+          </dependency>
+        </dependencies>
+      </plugin>
+    </plugins>
+  </build>
+</project>