Modified: 
maven/components/branches/maven-embedder-refactor/maven-plugin-registry/src/main/java/org/apache/maven/plugin/registry/DefaultPluginRegistryBuilder.java
URL: 
http://svn.apache.org/viewcvs/maven/components/branches/maven-embedder-refactor/maven-plugin-registry/src/main/java/org/apache/maven/plugin/registry/DefaultPluginRegistryBuilder.java?rev=390243&r1=390242&r2=390243&view=diff
==============================================================================
--- 
maven/components/branches/maven-embedder-refactor/maven-plugin-registry/src/main/java/org/apache/maven/plugin/registry/DefaultPluginRegistryBuilder.java
 (original)
+++ 
maven/components/branches/maven-embedder-refactor/maven-plugin-registry/src/main/java/org/apache/maven/plugin/registry/DefaultPluginRegistryBuilder.java
 Thu Mar 30 13:25:09 2006
@@ -58,7 +58,8 @@
 
         getLogger().debug( "Building Maven user-level plugin registry from: '" 
+ userRegistryFile.getAbsolutePath() + "'" );
 
-        if ( System.getProperty( "maven.home" ) != null )
+        if ( System.getProperty( "maven.home" ) != null ||
+             System.getProperty( 
MavenPluginRegistryBuilder.ALT_GLOBAL_PLUGIN_REG_LOCATION ) != null )
         {
             globalRegistryFile = getFile( globalRegistryPath, "maven.home", 
MavenPluginRegistryBuilder.ALT_GLOBAL_PLUGIN_REG_LOCATION );
 
@@ -94,7 +95,7 @@
     {
         PluginRegistry registry = null;
 
-        if ( registryFile.exists() && registryFile.isFile() )
+        if ( registryFile != null && registryFile.exists() && 
registryFile.isFile() )
         {
             FileReader reader = null;
             try

Modified: 
maven/components/branches/maven-embedder-refactor/maven-plugin-tools/maven-plugin-tools-api/src/test/java/org/apache/maven/tools/plugin/generator/AbstractGeneratorTestCase.java
URL: 
http://svn.apache.org/viewcvs/maven/components/branches/maven-embedder-refactor/maven-plugin-tools/maven-plugin-tools-api/src/test/java/org/apache/maven/tools/plugin/generator/AbstractGeneratorTestCase.java?rev=390243&r1=390242&r2=390243&view=diff
==============================================================================
--- 
maven/components/branches/maven-embedder-refactor/maven-plugin-tools/maven-plugin-tools-api/src/test/java/org/apache/maven/tools/plugin/generator/AbstractGeneratorTestCase.java
 (original)
+++ 
maven/components/branches/maven-embedder-refactor/maven-plugin-tools/maven-plugin-tools-api/src/test/java/org/apache/maven/tools/plugin/generator/AbstractGeneratorTestCase.java
 Thu Mar 30 13:25:09 2006
@@ -21,6 +21,7 @@
 import org.apache.maven.plugin.descriptor.Parameter;
 import org.apache.maven.plugin.descriptor.PluginDescriptor;
 import org.codehaus.plexus.component.repository.ComponentDependency;
+import org.codehaus.plexus.util.FileUtils;
 
 import java.io.File;
 import java.util.ArrayList;
@@ -83,13 +84,15 @@
 
         pluginDescriptor.setDependencies( Collections.singletonList( 
dependency ) );
 
-        File tempFile = File.createTempFile( "testGenerator-outDir", 
".marker.txt" ).getAbsoluteFile();
-        tempFile.deleteOnExit();
-        File destinationDirectory = tempFile.getParentFile();
+        File destinationDirectory = new File( System.getProperty( 
"java.io.tmpdir" ), "testGenerator-outDir" );
+        FileUtils.deleteDirectory( destinationDirectory );
+        destinationDirectory.mkdir();
 
         generator.execute( destinationDirectory, pluginDescriptor );
 
         validate( destinationDirectory );
+
+        FileUtils.deleteDirectory( destinationDirectory );
     }
 
     // ----------------------------------------------------------------------
@@ -126,4 +129,4 @@
     {
         // empty
     }
-}
\ No newline at end of file
+}

Modified: 
maven/components/branches/maven-embedder-refactor/maven-plugin-tools/maven-plugin-tools-model/src/main/mdo/plugin-metadata.mdo
URL: 
http://svn.apache.org/viewcvs/maven/components/branches/maven-embedder-refactor/maven-plugin-tools/maven-plugin-tools-model/src/main/mdo/plugin-metadata.mdo?rev=390243&r1=390242&r2=390243&view=diff
==============================================================================
--- 
maven/components/branches/maven-embedder-refactor/maven-plugin-tools/maven-plugin-tools-model/src/main/mdo/plugin-metadata.mdo
 (original)
+++ 
maven/components/branches/maven-embedder-refactor/maven-plugin-tools/maven-plugin-tools-model/src/main/mdo/plugin-metadata.mdo
 Thu Mar 30 13:25:09 2006
@@ -1,40 +1,51 @@
 <!--
-  <pluginMetadata>
-    <mojos>
-      <mojo goal="myGoal" 
-            phase="compile"
-            requiresDependencyResolution="compile"
-            requiresProject="true"
-            requiresReports="true"
-            requiresOnline="true"
-            inheritByDefault="true"
-            requiresDirectInvocation="true"
-            aggregator="true">
+<pluginMetadata>
+  <mojos>
+    <mojo>
+      <goal>myGoal</goal>
+      <phase>compile</phase>
+      <requiresDependencyResolution>compile</requiresDependencyResolution>
+      <requiresProject>true</requiresProject>
+      <requiresReports>true</requiresReports>
+      <requiresOnline>true</requiresOnline>
+      <inheritByDefault>true</inheritByDefault>
+      <requiresDirectInvocation>true</requiresDirectInvocation>
+      <aggregator>true</aggregator>
   
-        <execute phase="initialize" lifecycle="mine" goal="some:goal"/>
-        <components>
-          <component role="stuff" hint="more"/>
-        </components>
-        <parameters>
-          <parameter name="nom" 
-                     property="prop" 
-                     required="true" 
-                     readonly="true" 
-                     expression="${my.property}" 
-                     defaultValue="${project.artifactId}"
-                     type="org.apache.maven.project.MavenProject"
-                     alias="otherProp">
-            <description>Test parameter</description>
-            <deprecated>Use something else</deprecated>
-          </parameter>
-        </parameters>
-        <description>
-          This is a test.
-        </description>
-        <deprecated>Use another mojo</deprecated>
-      </mojo>
-    </mojos>
-  </pluginMetadata>
+      <execute>
+        <phase>initialize</phase>
+        <lifecycle>mine</lifecycle>
+        <goal>goal</goal>
+      </execute>
+
+      <components>
+        <component>
+          <role>stuff</role>
+          <hint>more</hint>
+        </component>
+      </components>
+
+      <parameters>
+        <parameter>
+          <name>nom</name> 
+          <property>prop</property> 
+          <required>true</required>
+          <readonly>true</readonly> 
+          <expression>${my.property}</expression> 
+          <defaultValue>${project.artifactId}</defaultValue>
+          <type>org.apache.maven.project.MavenProject</type>
+          <alias>otherProp</alias>
+          <description>Test parameter</description>
+          <deprecated>Use something else</deprecated>
+        </parameter>
+      </parameters>
+      <description>
+        This is a test.
+      </description>
+      <deprecated>Use another mojo</deprecated>
+    </mojo>
+  </mojos>
+</pluginMetadata>
   -->
 <model>
   <id>plugin-metadata</id>

Modified: 
maven/components/branches/maven-embedder-refactor/maven-project/src/main/java/org/apache/maven/profiles/DefaultProfileManager.java
URL: 
http://svn.apache.org/viewcvs/maven/components/branches/maven-embedder-refactor/maven-project/src/main/java/org/apache/maven/profiles/DefaultProfileManager.java?rev=390243&r1=390242&r2=390243&view=diff
==============================================================================
--- 
maven/components/branches/maven-embedder-refactor/maven-project/src/main/java/org/apache/maven/profiles/DefaultProfileManager.java
 (original)
+++ 
maven/components/branches/maven-embedder-refactor/maven-project/src/main/java/org/apache/maven/profiles/DefaultProfileManager.java
 Thu Mar 30 13:25:09 2006
@@ -145,7 +145,8 @@
     public List getActiveProfiles()
         throws ProfileActivationException
     {
-        List active = new ArrayList( profilesById.size() );
+        List activeFromPom = new ArrayList();
+        List activeExternal = new ArrayList();
 
         for ( Iterator it = profilesById.entrySet().iterator(); it.hasNext(); )
         {
@@ -154,17 +155,30 @@
             String profileId = (String) entry.getKey();
             Profile profile = (Profile) entry.getValue();
 
+            boolean shouldAdd = false;
             if ( activatedIds.contains( profileId ) )
             {
-                active.add( profile );
+                shouldAdd = true;
             }
             else if ( !deactivatedIds.contains( profileId ) && isActive( 
profile ) )
             {
-                active.add( profile );
+                shouldAdd = true;
+            }
+            
+            if ( shouldAdd )
+            {
+                if ( "pom".equals( profile.getSource() ) )
+                {
+                    activeFromPom.add( profile );
+                }
+                else
+                {
+                    activeExternal.add( profile );
+                }
             }
         }
 
-        if ( active.isEmpty() )
+        if ( activeFromPom.isEmpty() )
         {
             for ( Iterator it = defaultIds.iterator(); it.hasNext(); )
             {
@@ -172,11 +186,16 @@
 
                 Profile profile = (Profile) profilesById.get( profileId );
 
-                active.add( profile );
+                activeFromPom.add( profile );
             }
         }
+        
+        List allActive = new ArrayList( activeFromPom.size() + 
activeExternal.size() );
+        
+        allActive.addAll( activeExternal );
+        allActive.addAll( activeFromPom );
 
-        return active;
+        return allActive;
     }
 
     private boolean isActive( Profile profile )

Modified: 
maven/components/branches/maven-embedder-refactor/maven-project/src/main/java/org/apache/maven/project/DefaultMavenProjectBuilder.java
URL: 
http://svn.apache.org/viewcvs/maven/components/branches/maven-embedder-refactor/maven-project/src/main/java/org/apache/maven/project/DefaultMavenProjectBuilder.java?rev=390243&r1=390242&r2=390243&view=diff
==============================================================================
--- 
maven/components/branches/maven-embedder-refactor/maven-project/src/main/java/org/apache/maven/project/DefaultMavenProjectBuilder.java
 (original)
+++ 
maven/components/branches/maven-embedder-refactor/maven-project/src/main/java/org/apache/maven/project/DefaultMavenProjectBuilder.java
 Thu Mar 30 13:25:09 2006
@@ -687,7 +687,7 @@
 
         // we don't have to force the collision exception for superModel here, 
it's already been done in getSuperModel()
         MavenProject previousProject = superProject;
-        
+
         Model previous = superProject.getModel();
 
         for ( Iterator i = lineage.iterator(); i.hasNext(); )
@@ -695,9 +695,9 @@
             MavenProject currentProject = (MavenProject) i.next();
 
             Model current = currentProject.getModel();
-            
+
             String pathAdjustment = null;
-            
+
             try
             {
                 pathAdjustment = previousProject.getModulePathAdjustment( 
currentProject );
@@ -836,6 +836,16 @@
             context.put( "basedir", projectDir.getAbsolutePath() );
         }
 
+        // TODO: this is a hack to ensure MNG-2124 can be satisfied without 
triggering MNG-1927
+        //  MNG-1927 relies on the false assumption that ${project.build.*} 
evaluates to null, which occurs before
+        //  MNG-2124 is fixed. The null value would leave it uninterpolated, 
to be handled after path translation.
+        //  Until these steps are correctly sequenced, we guarantee these 
fields remain uninterpolated.
+        context.put( "build.directory", null );
+        context.put( "build.outputDirectory", null );
+        context.put( "build.testOutputDirectory", null );
+        context.put( "build.sourceDirectory", null );
+        context.put( "build.testSourceDirectory", null );
+
         model = modelInterpolator.interpolate( model, context, strict );
 
         // interpolation is before injection, because interpolation is 
off-limits in the injected variables
@@ -1008,6 +1018,11 @@
             {
                 parentDescriptor = new File( projectDir, parentRelativePath );
 
+                if ( getLogger().isDebugEnabled() )
+                {
+                    getLogger().debug( "Searching for parent-POM: " + 
parentModel.getId() + " of project: " + project.getId() + " in relative path: " 
+ parentRelativePath );
+                }
+
                 if ( parentDescriptor.isDirectory() )
                 {
                     if ( getLogger().isDebugEnabled() )
@@ -1020,8 +1035,12 @@
 
                     if ( !parentDescriptor.exists() )
                     {
-                        throw new ProjectBuildingException( projectId, 
"missing parent project descriptor: " +
-                            parentDescriptor.getAbsolutePath() );
+                        if ( getLogger().isDebugEnabled() )
+                        {
+                            getLogger().debug( "Parent-POM: " + 
parentModel.getId() + " for project: " + project.getId() + " cannot be loaded 
from relative path: " + parentDescriptor + "; path does not exist." );
+                        }
+
+                        parentDescriptor = null;
                     }
                 }
 
@@ -1068,6 +1087,10 @@
                             "\n  Specified: " + parentModel.getId() + "\n  
Found:     " + candidateParent.getId() );
                     }
                 }
+                else if ( getLogger().isDebugEnabled() )
+                {
+                    getLogger().debug( "Parent-POM: " + parentModel.getId() + 
" not found in relative path: " + parentRelativePath );
+                }
             }
 
             Artifact parentArtifact = null;
@@ -1084,17 +1107,30 @@
                 // as we go in order to do this.
                 // 
----------------------------------------------------------------------
 
-                getLogger().debug( "Retrieving parent-POM from the repository 
for project: " + project.getId() );
+                // we must add the repository this POM was found in too, by 
chance it may be located where the parent is
+                // we can't query the parent to ask where it is :)
+                List remoteRepositories = new ArrayList( 
aggregatedRemoteWagonRepositories );
+                remoteRepositories.addAll( parentSearchRepositories );
+
+                if ( getLogger().isDebugEnabled() )
+                {
+                    getLogger().debug(
+                                       "Retrieving parent-POM: " + 
parentModel.getId() + " for project: "
+                                           + project.getId() + " from the 
repository." );
+                }
 
                 parentArtifact = artifactFactory.createParentArtifact( 
parentModel.getGroupId(),
                                                                        
parentModel.getArtifactId(),
                                                                        
parentModel.getVersion() );
 
-                // we must add the repository this POM was found in too, by 
chance it may be located where the parent is
-                // we can't query the parent to ask where it is :)
-                List remoteRepositories = new ArrayList( 
aggregatedRemoteWagonRepositories );
-                remoteRepositories.addAll( parentSearchRepositories );
-                model = findModelFromRepository( parentArtifact, 
remoteRepositories, localRepository, false );
+                try
+                {
+                    model = findModelFromRepository( parentArtifact, 
remoteRepositories, localRepository, false );
+                }
+                catch( ProjectBuildingException e )
+                {
+                    throw new ProjectBuildingException( project.getId(), 
"Cannot find parent: " + e.getProjectId() + " for project: " + project.getId(), 
e );
+                }
             }
 
             if ( model != null && !"pom".equals( model.getPackaging() ) )

Modified: 
maven/components/branches/maven-embedder-refactor/maven-project/src/main/java/org/apache/maven/project/MavenProject.java
URL: 
http://svn.apache.org/viewcvs/maven/components/branches/maven-embedder-refactor/maven-project/src/main/java/org/apache/maven/project/MavenProject.java?rev=390243&r1=390242&r2=390243&view=diff
==============================================================================
--- 
maven/components/branches/maven-embedder-refactor/maven-project/src/main/java/org/apache/maven/project/MavenProject.java
 (original)
+++ 
maven/components/branches/maven-embedder-refactor/maven-project/src/main/java/org/apache/maven/project/MavenProject.java
 Thu Mar 30 13:25:09 2006
@@ -78,6 +78,12 @@
  */
 public class MavenProject
 {
+    public static final String EMPTY_PROJECT_GROUP_ID = "unknown";
+    
+    public static final String EMPTY_PROJECT_ARTIFACT_ID = "empty-project";
+    
+    public static final String EMPTY_PROJECT_VERSION = "0";
+    
     private Model model;
 
     private MavenProject parent;
@@ -138,6 +144,17 @@
     private boolean executionRoot;
     
     private Map moduleAdjustments;
+
+    public MavenProject()
+    {
+        Model model = new Model();
+        
+        model.setGroupId( EMPTY_PROJECT_GROUP_ID );
+        model.setArtifactId( EMPTY_PROJECT_ARTIFACT_ID );
+        model.setVersion( EMPTY_PROJECT_VERSION );
+        
+        this.model = model;
+    }
 
     public MavenProject( Model model )
     {

Modified: 
maven/components/branches/maven-embedder-refactor/maven-project/src/main/java/org/apache/maven/project/inheritance/DefaultModelInheritanceAssembler.java
URL: 
http://svn.apache.org/viewcvs/maven/components/branches/maven-embedder-refactor/maven-project/src/main/java/org/apache/maven/project/inheritance/DefaultModelInheritanceAssembler.java?rev=390243&r1=390242&r2=390243&view=diff
==============================================================================
--- 
maven/components/branches/maven-embedder-refactor/maven-project/src/main/java/org/apache/maven/project/inheritance/DefaultModelInheritanceAssembler.java
 (original)
+++ 
maven/components/branches/maven-embedder-refactor/maven-project/src/main/java/org/apache/maven/project/inheritance/DefaultModelInheritanceAssembler.java
 Thu Mar 30 13:25:09 2006
@@ -32,6 +32,7 @@
 import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.Iterator;
+import java.util.LinkedList;
 import java.util.List;
 import java.util.Map;
 import java.util.Properties;
@@ -107,7 +108,7 @@
             }
         }
 
-        assembleDistributionInheritence( child, parent, childPathAdjustment, 
appendPaths );
+        assembleDistributionInheritence( child, parent, appendPaths );
 
         // issueManagement
         if ( child.getIssueManagement() == null )
@@ -398,8 +399,7 @@
         }
     }
 
-    private void assembleDistributionInheritence( Model child, Model parent, 
String childPathAdjustment,
-                                                  boolean appendPaths )
+    private void assembleDistributionInheritence( Model child, Model parent, 
boolean appendPaths )
     {
         if ( parent.getDistributionManagement() != null )
         {
@@ -431,7 +431,7 @@
                     if ( site.getUrl() != null )
                     {
                         site.setUrl(
-                            appendPath( site.getUrl(), child.getArtifactId(), 
childPathAdjustment, appendPaths ) );
+                            appendPath( site.getUrl(), child.getArtifactId(), 
null, appendPaths ) );
                     }
                 }
             }
@@ -482,89 +482,78 @@
         return repository;
     }
 
+    // TODO: This should eventually be migrated to DefaultPathTranslator.
     protected String appendPath( String parentPath, String childPath, String 
pathAdjustment, boolean appendPaths )
     {
-        List pathFragments = new ArrayList();
-
-        String rootPath = parentPath;
-
-        String protocol = null;
-        int protocolIdx = rootPath.indexOf( "://" );
-
-        if ( protocolIdx > -1 )
-        {
-            protocol = rootPath.substring( 0, protocolIdx + 3 );
-            rootPath = rootPath.substring( protocolIdx + 3 );
-        }
-
-        pathFragments.add( rootPath );
+        String uncleanPath = parentPath;
 
         if ( appendPaths )
         {
             if ( pathAdjustment != null )
-            {
-                pathFragments.add( pathAdjustment );
-            }
+                uncleanPath += "/" + pathAdjustment;
 
             if ( childPath != null )
-            {
-                pathFragments.add( childPath );
-            }            
+                uncleanPath += "/" + childPath;
         }
 
-        StringBuffer cleanedPath = new StringBuffer();
+        String cleanedPath = "";
 
-        if ( protocol != null )
-        {
-            cleanedPath.append( protocol );
-        }
+        int protocolIdx = uncleanPath.indexOf( "://" );
 
-        if ( rootPath.startsWith( "/" ) )
+        if ( protocolIdx > -1 )
         {
-            cleanedPath.append( '/' );
+            cleanedPath = uncleanPath.substring( 0, protocolIdx + 3 );
+            uncleanPath = uncleanPath.substring( protocolIdx + 3 );
         }
 
-        String lastToken = null;
-        String currentToken = null;
+        if ( uncleanPath.startsWith( "/" ) )
+            cleanedPath += "/";
 
-        for ( Iterator it = pathFragments.iterator(); it.hasNext(); )
-        {
-            String pathFragment = (String) it.next();
+        return cleanedPath + resolvePath( uncleanPath );
+    }
 
-            StringTokenizer tokens = new StringTokenizer( pathFragment, "/" );
+    // TODO: Move this to plexus-utils' PathTool.
+    private static String resolvePath( String uncleanPath )
+    {
+        LinkedList pathElements = new LinkedList();
 
-            while ( tokens.hasMoreTokens() )
-            {
-                lastToken = currentToken;
-                currentToken = tokens.nextToken();
+        StringTokenizer tokenizer = new StringTokenizer( uncleanPath, "/" );
+
+        while ( tokenizer.hasMoreTokens() )
+        {
+            String token = (String) tokenizer.nextToken();
 
-                if ( "..".equals( currentToken ) )
+            if ( token.equals( "" ) )
+            {
+                // Empty path entry ("...//.."), remove.
+            }
+            else if ( token.equals( ".." ) )
+            {
+                if ( pathElements.isEmpty() )
                 {
-                    // trim the previous path part off...
-                    cleanedPath.setLength( cleanedPath.length() - ( 
lastToken.length() + 1 ) );
+                    // FIXME: somehow report to the user
+                    // that there are too many '..' elements.
+                    // For now, ignore the extra '..'.
                 }
-                else if ( !".".equals( currentToken ) )
+                else
                 {
-                    // don't worry about /./ self-references.
-                    cleanedPath.append( currentToken ).append( '/' );
+                    pathElements.removeLast();
                 }
             }
+            else
+            {
+                pathElements.addLast( token );
+            }
         }
 
-        String lastPathPart = childPath;
-        if ( lastPathPart == null )
-        {
-            lastPathPart = pathAdjustment;
-        }
-        
-        if ( lastPathPart == null )
-        {
-            lastPathPart = parentPath;
-        }
-        
-        if ( appendPaths && lastPathPart != null && !lastPathPart.endsWith( 
"/" ) )
+
+        StringBuffer cleanedPath = new StringBuffer();
+
+        while ( !pathElements.isEmpty() )
         {
-            cleanedPath.setLength( cleanedPath.length() - 1 );
+            cleanedPath.append( pathElements.removeFirst() );
+            if ( !pathElements.isEmpty() )
+                cleanedPath.append( '/' );
         }
 
         return cleanedPath.toString();

Modified: 
maven/components/branches/maven-embedder-refactor/maven-project/src/main/java/org/apache/maven/project/interpolation/RegexBasedModelInterpolator.java
URL: 
http://svn.apache.org/viewcvs/maven/components/branches/maven-embedder-refactor/maven-project/src/main/java/org/apache/maven/project/interpolation/RegexBasedModelInterpolator.java?rev=390243&r1=390242&r2=390243&view=diff
==============================================================================
--- 
maven/components/branches/maven-embedder-refactor/maven-project/src/main/java/org/apache/maven/project/interpolation/RegexBasedModelInterpolator.java
 (original)
+++ 
maven/components/branches/maven-embedder-refactor/maven-project/src/main/java/org/apache/maven/project/interpolation/RegexBasedModelInterpolator.java
 Thu Mar 30 13:25:09 2006
@@ -129,6 +129,13 @@
 
             if ( value == null )
             {
+                // This may look out of place, but its here for the 
MNG-2124/MNG-1927 fix described in the project builder
+                if ( context.containsKey( realExpr ) )
+                {
+                    // It existed, but was null. Leave it alone.
+                    continue;
+                }
+
                 value = model.getProperties().getProperty( realExpr );
             }
 
@@ -136,7 +143,10 @@
             {
                 try
                 {
-                    value = ReflectionValueExtractor.evaluate( realExpr, model 
);
+                    // NOTE: We've already trimmed off any leading expression 
parts like 'project.'
+                    // or 'pom.', and now we have to ensure that the 
ReflectionValueExtractor
+                    // doesn't try to do it again.
+                    value = ReflectionValueExtractor.evaluate( realExpr, 
model, false );
                 }
                 catch ( Exception e )
                 {

Modified: 
maven/components/branches/maven-embedder-refactor/maven-project/src/test/java/org/apache/maven/project/MavenProjectTest.java
URL: 
http://svn.apache.org/viewcvs/maven/components/branches/maven-embedder-refactor/maven-project/src/test/java/org/apache/maven/project/MavenProjectTest.java?rev=390243&r1=390242&r2=390243&view=diff
==============================================================================
--- 
maven/components/branches/maven-embedder-refactor/maven-project/src/test/java/org/apache/maven/project/MavenProjectTest.java
 (original)
+++ 
maven/components/branches/maven-embedder-refactor/maven-project/src/test/java/org/apache/maven/project/MavenProjectTest.java
 Thu Mar 30 13:25:09 2006
@@ -24,6 +24,15 @@
 public class MavenProjectTest
     extends AbstractMavenProjectTestCase
 {
+    
+    public void testEmptyConstructor()
+    {
+        MavenProject project = new MavenProject();
+        
+        assertEquals( MavenProject.EMPTY_PROJECT_GROUP_ID + ":" + 
MavenProject.EMPTY_PROJECT_ARTIFACT_ID + ":jar:"
+            + MavenProject.EMPTY_PROJECT_VERSION, project.getId() );
+    }
+    
     public void testCopyConstructor() throws Exception
     {
         File f = getFileForClasspathResource( "canonical-pom.xml" );

Modified: 
maven/components/branches/maven-embedder-refactor/maven-project/src/test/java/org/apache/maven/project/inheritance/DefaultModelInheritanceAssemblerTest.java
URL: 
http://svn.apache.org/viewcvs/maven/components/branches/maven-embedder-refactor/maven-project/src/test/java/org/apache/maven/project/inheritance/DefaultModelInheritanceAssemblerTest.java?rev=390243&r1=390242&r2=390243&view=diff
==============================================================================
--- 
maven/components/branches/maven-embedder-refactor/maven-project/src/test/java/org/apache/maven/project/inheritance/DefaultModelInheritanceAssemblerTest.java
 (original)
+++ 
maven/components/branches/maven-embedder-refactor/maven-project/src/test/java/org/apache/maven/project/inheritance/DefaultModelInheritanceAssemblerTest.java
 Thu Mar 30 13:25:09 2006
@@ -48,6 +48,20 @@
 {
     private ModelInheritanceAssembler assembler = new 
DefaultModelInheritanceAssembler();
 
+    public void 
testShouldAppendChildPathAdjustmentWithNoChildPartAndNoParentPart()
+    {
+        String parentPath = "";
+        String childPath = null;
+        String pathAdjustment = "../file-management";
+
+        String result =
+            ( (DefaultModelInheritanceAssembler) assembler ).appendPath( 
parentPath, childPath, pathAdjustment, true );
+
+        System.out.println( "Resulting path is: \'" + result + "\'" );
+
+        assertEquals( "Append with path adjustment failed.", 
"/file-management", result );
+    }
+
     public void testShouldAppendChildPathAdjustmentWithNoChildPart()
     {
         String parentPath = 
"http://maven.apache.org/shared/maven-shared-parent";;

Modified: 
maven/components/branches/maven-embedder-refactor/maven-project/src/test/java/org/apache/maven/project/interpolation/RegexBasedModelInterpolatorTest.java
URL: 
http://svn.apache.org/viewcvs/maven/components/branches/maven-embedder-refactor/maven-project/src/test/java/org/apache/maven/project/interpolation/RegexBasedModelInterpolatorTest.java?rev=390243&r1=390242&r2=390243&view=diff
==============================================================================
--- 
maven/components/branches/maven-embedder-refactor/maven-project/src/test/java/org/apache/maven/project/interpolation/RegexBasedModelInterpolatorTest.java
 (original)
+++ 
maven/components/branches/maven-embedder-refactor/maven-project/src/test/java/org/apache/maven/project/interpolation/RegexBasedModelInterpolatorTest.java
 Thu Mar 30 13:25:09 2006
@@ -20,6 +20,7 @@
 
 import org.apache.maven.model.Dependency;
 import org.apache.maven.model.Model;
+import org.apache.maven.model.Organization;
 import org.apache.maven.model.Repository;
 
 import java.util.Collections;
@@ -43,6 +44,24 @@
         context = Collections.singletonMap( "basedir", "myBasedir" );
     }
 
+    public void testShouldInterpolateOrganizationNameCorrectly()
+        throws Exception
+    {
+        String orgName = "MyCo";
+
+        Model model = new Model();
+        model.setName( "${pom.organization.name} Tools" );
+
+        Organization org = new Organization();
+        org.setName( orgName );
+
+        model.setOrganization( org );
+
+        Model out = new RegexBasedModelInterpolator().interpolate( model, 
context );
+
+        assertEquals( orgName + " Tools", out.getName() );
+    }
+
     public void 
testShouldInterpolateDependencyVersionToSetSameAsProjectVersion()
         throws Exception
     {
@@ -70,20 +89,20 @@
 
         model.addDependency( dep );
 
-/*
-        // This is the desired behaviour, however there are too many crappy 
poms in the repo and an issue with the
-        // timing of executing the interpolation
-
-        try
-        {
-            new RegexBasedModelInterpolator().interpolate( model, context );
-            fail( "Should have failed to interpolate with invalid reference" );
-        }
-        catch ( ModelInterpolationException expected )
-        {
-            assertTrue( true );
-        }
-*/
+        /*
+         // This is the desired behaviour, however there are too many crappy 
poms in the repo and an issue with the
+         // timing of executing the interpolation
+
+         try
+         {
+         new RegexBasedModelInterpolator().interpolate( model, context );
+         fail( "Should have failed to interpolate with invalid reference" );
+         }
+         catch ( ModelInterpolationException expected )
+         {
+         assertTrue( true );
+         }
+         */
 
         Model out = new RegexBasedModelInterpolator().interpolate( model, 
context );
 
@@ -122,8 +141,7 @@
 
         Model out = new RegexBasedModelInterpolator().interpolate( model, 
context );
 
-        assertEquals( "file://localhost/myBasedir/temp-repo",
-                      ( (Repository) out.getRepositories().get( 0 ) ).getUrl() 
);
+        assertEquals( "file://localhost/myBasedir/temp-repo", ( (Repository) 
out.getRepositories().get( 0 ) ).getUrl() );
     }
 
     public void testEnvars()
@@ -161,12 +179,10 @@
 
         Model out = new RegexBasedModelInterpolator( envars ).interpolate( 
model, context );
 
-        System.out.println( ">>> " + out.getProperties().getProperty( 
"outputDirectory" ) );        
+        System.out.println( ">>> " + out.getProperties().getProperty( 
"outputDirectory" ) );
 
         assertEquals( out.getProperties().getProperty( "outputDirectory" ), 
"${env.DOES_NOT_EXIST}" );
     }
-
-
 
     public void testExpressionThatEvaluatesToNullReturnsTheLiteralString()
         throws Exception

Modified: 
maven/components/branches/maven-embedder-refactor/maven-reporting/maven-reporting-impl/pom.xml
URL: 
http://svn.apache.org/viewcvs/maven/components/branches/maven-embedder-refactor/maven-reporting/maven-reporting-impl/pom.xml?rev=390243&r1=390242&r2=390243&view=diff
==============================================================================
--- 
maven/components/branches/maven-embedder-refactor/maven-reporting/maven-reporting-impl/pom.xml
 (original)
+++ 
maven/components/branches/maven-embedder-refactor/maven-reporting/maven-reporting-impl/pom.xml
 Thu Mar 30 13:25:09 2006
@@ -7,7 +7,7 @@
   </parent>
   <modelVersion>4.0.0</modelVersion>
   <artifactId>maven-reporting-impl</artifactId>
-  <name>Maven Reporting</name>
+  <name>Maven Reporting Implementation</name>
   <version>2.1-SNAPSHOT</version>
   <developers>
     <developer>

Modified: maven/components/branches/maven-embedder-refactor/pom.xml
URL: 
http://svn.apache.org/viewcvs/maven/components/branches/maven-embedder-refactor/pom.xml?rev=390243&r1=390242&r2=390243&view=diff
==============================================================================
--- maven/components/branches/maven-embedder-refactor/pom.xml (original)
+++ maven/components/branches/maven-embedder-refactor/pom.xml Thu Mar 30 
13:25:09 2006
@@ -1,6 +1,30 @@
-<?xml version="1.0" encoding="UTF-8"?><project>
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+  ~ Copyright 2005-2006 The Apache Software Foundation.
+  ~
+  ~ Licensed 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 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>org.apache.maven</groupId>
+  <parent>
+    <groupId>org.apache.maven</groupId>
+    <artifactId>maven-parent</artifactId>
+    <version>1</version>
+    <relativePath>../pom/maven/pom.xml</relativePath>
+  </parent>
   <artifactId>maven</artifactId>
   <packaging>pom</packaging>
   <name>Maven</name>
@@ -12,16 +36,6 @@
     <system>jira</system>
     <url>http://jira.codehaus.org/browse/MNG</url>
   </issueManagement>
-  <ciManagement>
-    <system>continuum</system>
-    <notifiers>
-      <notifier>
-        <configuration>
-          <address>commits@maven.apache.org</address>
-        </configuration>
-      </notifier>
-    </notifiers>
-  </ciManagement>
   <mailingLists>
     <mailingList>
       <name>Maven User List</name>
@@ -48,112 +62,12 @@
       <post>commits@maven.apache.org</post>
       <archive>http://mail-archives.apache.org/mod_mbox/maven-dev</archive>
     </mailingList>
-    <mailingList>
-      <name>Apache Announce List</name>
-      <subscribe>[EMAIL PROTECTED]</subscribe>
-      <unsubscribe>[EMAIL PROTECTED]</unsubscribe>
-      <post>announce@apache.org</post>
-      <archive>http://mail-archives.apache.org/mod_mbox/www-announce/</archive>
-    </mailingList>
   </mailingLists>
-  <developers>
-    <developer>
-      <id>jvanzyl</id>
-      <name>Jason van Zyl</name>
-      <email>[EMAIL PROTECTED]</email>
-      <organization>ASF</organization>
-      <roles>
-        <role>PMC Chair</role>
-      </roles>
-      <timezone>-5</timezone>
-    </developer>
-    <developer>
-      <id>brett</id>
-      <name>Brett Porter</name>
-      <email>[EMAIL PROTECTED]</email>
-      <organization>ASF</organization>
-      <roles>
-        <role>PMC Member</role>
-      </roles>
-      <timezone>+10</timezone>
-    </developer>
-    <developer>
-      <id>evenisse</id>
-      <name>Emmanuel Venisse</name>
-      <email>[EMAIL PROTECTED]</email>
-      <organization>ASF</organization>
-      <roles>
-        <role>PMC Member</role>
-      </roles>
-      <timezone>+1</timezone>
-    </developer>
-    <developer>
-      <id>jdcasey</id>
-      <name>John Casey</name>
-      <email>[EMAIL PROTECTED]</email>
-      <organization>ASF</organization>
-      <roles>
-        <role>PMC Member</role>
-      </roles>
-      <timezone>-5</timezone>
-    </developer>
-    <developer>
-      <id>kenney</id>
-      <name>Kenney Westerhof</name>
-      <email>[EMAIL PROTECTED]</email>
-      <organization>Neonics</organization>
-      <roles>
-        <role>PMC Member</role>
-      </roles>
-      <timezone>+1</timezone>
-    </developer>
-    <developer>
-      <id>trygvis</id>
-      <name>Trygve Laugstol</name>
-      <email>[EMAIL PROTECTED]</email>
-      <organization>ASF</organization>
-      <roles>
-        <role>PMC Member</role>
-      </roles>
-      <timezone>+1</timezone>
-    </developer>
-    <developer>
-      <id>vmassol</id>
-      <name>Vincent Massol</name>
-      <email>[EMAIL PROTECTED]</email>
-      <organization>ASF</organization>
-      <roles>
-        <role>PMC Member</role>
-      </roles>
-      <timezone>+1</timezone>
-    </developer>
-    <developer>
-      <id>vsiveton</id>
-      <name>Vincent Siveton</name>
-      <email>[EMAIL PROTECTED]</email>
-      <organization>ASF</organization>
-      <roles>
-        <role>Committer</role>
-      </roles>
-      <timezone>-5</timezone>
-    </developer>
-  </developers>
-  <licenses>
-    <license>
-      <name>The Apache Software License, Version 2.0</name>
-      <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
-      <distribution>repo</distribution>
-    </license>
-  </licenses>
   <scm>
     
<connection>scm:svn:http://svn.apache.org/repos/asf/maven/components/trunk</connection>
     
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/maven/components/trunk</developerConnection>
     <url>http://svn.apache.org/viewcvs.cgi/maven/components/trunk</url>
   </scm>
-  <organization>
-    <name>Apache Software Foundation</name>
-    <url>http://www.apache.org/</url>
-  </organization>
   <build>
     <pluginManagement>
       <plugins>
@@ -189,24 +103,6 @@
     <module>maven-settings</module>
     <module>maven-cli</module>    
   </modules>
-  <repositories>
-    <repository>
-      <releases>
-        <enabled>false</enabled>
-      </releases>
-      <id>snapshots</id>
-      <name>Maven Central Development Repository</name>
-      <url>http://snapshots.maven.codehaus.org/maven2</url>
-    </repository>
-    <repository>
-      <releases>
-        <enabled>false</enabled>
-      </releases>
-      <id>apache.snapshots</id>
-      <name>Apache Development Repository</name>
-      <url>http://cvs.apache.org/maven-snapshot-repository</url>
-    </repository>
-  </repositories>
   <dependencies>
     <dependency>
       <groupId>junit</groupId>
@@ -276,7 +172,7 @@
       <dependency>
         <groupId>org.apache.maven.wagon</groupId>
         <artifactId>wagon-ssh</artifactId>
-        <version>1.0-alpha-6</version>
+        <version>1.0-alpha-7</version>
       </dependency>
       <dependency>
         <groupId>org.apache.maven.wagon</groupId>
@@ -296,16 +192,6 @@
     </dependencies>
   </dependencyManagement>
   <distributionManagement>
-    <repository>
-      <id>repo1</id>
-      <name>Maven Central Repository</name>
-      
<url>scp://repo1.maven.org/home/projects/maven/repository-staging/to-ibiblio/maven2</url>
-    </repository>
-    <snapshotRepository>
-      <id>apache.snapshots</id>
-      <name>Apache Development Repository</name>
-      
<url>scp://minotaur.apache.org/www/cvs.apache.org/maven-snapshot-repository</url>
-    </snapshotRepository>
     <site>
       <id>website</id>
       
<url>scp://minotaur.apache.org/www/maven.apache.org/ref/${project.version}/</url>


Reply via email to