Author: jvanzyl
Date: Wed Sep 28 15:56:41 2005
New Revision: 292339

URL: http://svn.apache.org/viewcvs?rev=292339&view=rev
Log:
o adding the name to the deploy plugin metadata so that i can pull it down
  and display it in an IDE

Added:
    
maven/components/trunk/maven-embedder/src/main/java/org/apache/maven/embedder/SummaryPluginDescriptor.java
   (with props)
Modified:
    
maven/components/trunk/maven-artifact-manager/src/main/java/org/apache/maven/artifact/repository/metadata/GroupRepositoryMetadata.java
    maven/components/trunk/maven-embedder/notes.txt
    maven/components/trunk/maven-embedder/pom.xml
    
maven/components/trunk/maven-embedder/src/main/java/org/apache/maven/embedder/MavenEmbedder.java
    
maven/components/trunk/maven-embedder/src/test/java/org/apache/maven/embedder/MavenEmbedderTest.java
    maven/components/trunk/maven-plugins/maven-plugin-plugin/pom.xml
    
maven/components/trunk/maven-plugins/maven-plugin-plugin/src/main/java/org/apache/maven/plugin/plugin/metadata/AddPluginArtifactMetadataMojo.java
    maven/components/trunk/maven-repository-metadata/src/main/mdo/metadata.mdo
    
maven/components/trunk/maven-site/src/site/apt/guides/getting-started/background/history-of-maven.apt

Modified: 
maven/components/trunk/maven-artifact-manager/src/main/java/org/apache/maven/artifact/repository/metadata/GroupRepositoryMetadata.java
URL: 
http://svn.apache.org/viewcvs/maven/components/trunk/maven-artifact-manager/src/main/java/org/apache/maven/artifact/repository/metadata/GroupRepositoryMetadata.java?rev=292339&r1=292338&r2=292339&view=diff
==============================================================================
--- 
maven/components/trunk/maven-artifact-manager/src/main/java/org/apache/maven/artifact/repository/metadata/GroupRepositoryMetadata.java
 (original)
+++ 
maven/components/trunk/maven-artifact-manager/src/main/java/org/apache/maven/artifact/repository/metadata/GroupRepositoryMetadata.java
 Wed Sep 28 15:56:41 2005
@@ -63,7 +63,7 @@
         return null;
     }
 
-    public void addPluginMapping( String goalPrefix, String artifactId )
+    public void addPluginMapping( String goalPrefix, String artifactId, String 
name )
     {
         List plugins = getMetadata().getPlugins();
         boolean found = false;
@@ -80,6 +80,8 @@
             Plugin plugin = new Plugin();
             plugin.setPrefix( goalPrefix );
             plugin.setArtifactId( artifactId );
+            plugin.setName( name );
+
 
             getMetadata().addPlugin( plugin );
         }

Modified: maven/components/trunk/maven-embedder/notes.txt
URL: 
http://svn.apache.org/viewcvs/maven/components/trunk/maven-embedder/notes.txt?rev=292339&r1=292338&r2=292339&view=diff
==============================================================================
--- maven/components/trunk/maven-embedder/notes.txt (original)
+++ maven/components/trunk/maven-embedder/notes.txt Wed Sep 28 15:56:41 2005
@@ -47,3 +47,15 @@
 -- having to add all the component descriptors by hand and the maven
    version metadata is a real drag. something needs to be added to
    the assembly plugin.
+
+-- maven.home
+
+this is a CLI notion and should not be required by the embedder but
+we still need to deal with notions of centralize configuration which
+are extremely important in the corporate environment.
+
+-- ~/.m2
+
+plugin registry and settings should be stored in the tool specific locations
+
+-- local repository will be shared and default to ~/.m2/repository

Modified: maven/components/trunk/maven-embedder/pom.xml
URL: 
http://svn.apache.org/viewcvs/maven/components/trunk/maven-embedder/pom.xml?rev=292339&r1=292338&r2=292339&view=diff
==============================================================================
--- maven/components/trunk/maven-embedder/pom.xml (original)
+++ maven/components/trunk/maven-embedder/pom.xml Wed Sep 28 15:56:41 2005
@@ -2,27 +2,19 @@
   <parent>
     <artifactId>maven</artifactId>
     <groupId>org.apache.maven</groupId>
-    <version>2.0-beta-2-SNAPSHOT</version>
+    <version>2.0-beta-3-SNAPSHOT</version>
   </parent>
   <modelVersion>4.0.0</modelVersion>
   <groupId>org.apache.maven</groupId>
   <artifactId>maven-embedder</artifactId>
   <name>Maven Embedder</name>
-  <version>2.0-beta-2-SNAPSHOT</version>
+  <version>2.0-beta-3-SNAPSHOT</version>
   <build>
     <plugins>
       <plugin>
         <artifactId>maven-assembly-plugin</artifactId>
         <version>RELEASE</version>
         <configuration>
-          <descriptor>src/assemble/bin.xml</descriptor>
-          <finalName>maven-2.0-beta-1</finalName>
-        </configuration>
-      </plugin>
-      <plugin>
-        <artifactId>maven-assembly-plugin</artifactId>
-        <version>RELEASE</version>
-        <configuration>
           <descriptor>src/main/assembly/dep.xml</descriptor>
         </configuration>
       </plugin>
@@ -32,7 +24,7 @@
     <dependency>
       <groupId>org.apache.maven</groupId>
       <artifactId>maven-settings</artifactId>
-      <version>2.0-beta-2-SNAPSHOT</version>
+      <version>2.0-beta-3-SNAPSHOT</version>
     </dependency>
     <dependency>
       <groupId>org.apache.maven.wagon</groupId>
@@ -49,22 +41,22 @@
     <dependency>
       <groupId>org.apache.maven.reporting</groupId>
       <artifactId>maven-reporting-api</artifactId>
-      <version>2.0-beta-2-SNAPSHOT</version>
+      <version>2.0-beta-3-SNAPSHOT</version>
     </dependency>
     <dependency>
       <groupId>org.apache.maven</groupId>
       <artifactId>maven-profile</artifactId>
-      <version>2.0-beta-2-SNAPSHOT</version>
+      <version>2.0-beta-3-SNAPSHOT</version>
     </dependency>
     <dependency>
       <groupId>org.apache.maven</groupId>
       <artifactId>maven-model</artifactId>
-      <version>2.0-beta-2-SNAPSHOT</version>
+      <version>2.0-beta-3-SNAPSHOT</version>
     </dependency>
     <dependency>
       <groupId>org.apache.maven</groupId>
       <artifactId>maven-artifact</artifactId>
-      <version>2.0-beta-2-SNAPSHOT</version>
+      <version>2.0-beta-3-SNAPSHOT</version>
     </dependency>
     <dependency>
       <groupId>plexus</groupId>
@@ -78,17 +70,17 @@
     <dependency>
       <groupId>org.apache.maven</groupId>
       <artifactId>maven-repository-metadata</artifactId>
-      <version>2.0-beta-2-SNAPSHOT</version>
+      <version>2.0-beta-3-SNAPSHOT</version>
     </dependency>
     <dependency>
       <groupId>org.apache.maven</groupId>
       <artifactId>maven-project</artifactId>
-      <version>2.0-beta-2-SNAPSHOT</version>
+      <version>2.0-beta-3-SNAPSHOT</version>
     </dependency>
     <dependency>
       <groupId>org.apache.maven</groupId>
       <artifactId>maven-plugin-registry</artifactId>
-      <version>2.0-beta-2-SNAPSHOT</version>
+      <version>2.0-beta-3-SNAPSHOT</version>
     </dependency>
     <dependency>
       <groupId>commons-cli</groupId>
@@ -98,12 +90,12 @@
     <dependency>
       <groupId>org.apache.maven</groupId>
       <artifactId>maven-plugin-api</artifactId>
-      <version>2.0-beta-2-SNAPSHOT</version>
+      <version>2.0-beta-3-SNAPSHOT</version>
     </dependency>
     <dependency>
       <groupId>org.apache.maven</groupId>
       <artifactId>maven-core</artifactId>
-      <version>2.0-beta-2-SNAPSHOT</version>
+      <version>2.0-beta-3-SNAPSHOT</version>
     </dependency>    
     <dependency>
       <groupId>plexus</groupId>
@@ -117,17 +109,17 @@
     <dependency>
       <groupId>org.apache.maven</groupId>
       <artifactId>maven-plugin-descriptor</artifactId>
-      <version>2.0-beta-2-SNAPSHOT</version>
+      <version>2.0-beta-3-SNAPSHOT</version>
     </dependency>
     <dependency>
       <groupId>org.apache.maven</groupId>
       <artifactId>maven-monitor</artifactId>
-      <version>2.0-beta-2-SNAPSHOT</version>
+      <version>2.0-beta-3-SNAPSHOT</version>
     </dependency>
     <dependency>
       <groupId>org.apache.maven</groupId>
       <artifactId>maven-artifact-manager</artifactId>
-      <version>2.0-beta-2-SNAPSHOT</version>
+      <version>2.0-beta-3-SNAPSHOT</version>
     </dependency>
     <dependency>
       <groupId>org.apache.maven.wagon</groupId>

Modified: 
maven/components/trunk/maven-embedder/src/main/java/org/apache/maven/embedder/MavenEmbedder.java
URL: 
http://svn.apache.org/viewcvs/maven/components/trunk/maven-embedder/src/main/java/org/apache/maven/embedder/MavenEmbedder.java?rev=292339&r1=292338&r2=292339&view=diff
==============================================================================
--- 
maven/components/trunk/maven-embedder/src/main/java/org/apache/maven/embedder/MavenEmbedder.java
 (original)
+++ 
maven/components/trunk/maven-embedder/src/main/java/org/apache/maven/embedder/MavenEmbedder.java
 Wed Sep 28 15:56:41 2005
@@ -36,6 +36,8 @@
 import org.apache.maven.lifecycle.LifecycleExecutionException;
 import org.apache.maven.lifecycle.LifecycleExecutor;
 import org.apache.maven.plugin.MojoExecutionException;
+import org.apache.maven.plugin.descriptor.PluginDescriptor;
+import org.apache.maven.plugin.descriptor.PluginDescriptorBuilder;
 import org.apache.maven.execution.ReactorManager;
 import org.apache.maven.execution.MavenSession;
 import org.apache.maven.execution.MavenExecutionResponse;
@@ -43,6 +45,7 @@
 import org.codehaus.classworlds.ClassWorld;
 import org.codehaus.classworlds.DuplicateRealmException;
 import org.codehaus.plexus.PlexusContainerException;
+import org.codehaus.plexus.configuration.PlexusConfigurationException;
 import 
org.codehaus.plexus.component.repository.exception.ComponentLifecycleException;
 import 
org.codehaus.plexus.component.repository.exception.ComponentLookupException;
 import org.codehaus.plexus.embed.Embedder;
@@ -54,6 +57,8 @@
 import java.io.FileNotFoundException;
 import java.io.FileReader;
 import java.io.IOException;
+import java.io.InputStreamReader;
+import java.io.InputStream;
 import java.util.List;
 import java.util.ArrayList;
 import java.util.Iterator;
@@ -90,6 +95,8 @@
 
     private ProfileManager profileManager;
 
+    private PluginDescriptorBuilder pluginDescriptorBuilder;
+
     // ----------------------------------------------------------------------
     // Configuration
     // ----------------------------------------------------------------------
@@ -235,12 +242,20 @@
     // Embedder Client Contract
     // ----------------------------------------------------------------------
 
+    // ----------------------------------------------------------------------
+    // Model
+    // ----------------------------------------------------------------------
+
     public Model readModel( File model )
         throws XmlPullParserException, FileNotFoundException, IOException
     {
         return modelReader.read( new FileReader( model ) );
     }
 
+    // ----------------------------------------------------------------------
+    // Project
+    // ----------------------------------------------------------------------
+
     public MavenProject readProject( File mavenProject )
         throws ProjectBuildingException
     {
@@ -259,72 +274,78 @@
         return mavenProjectBuilder.buildWithDependencies( mavenProject, 
localRepository, profileManager );
     }
 
-    // ----------------------------------------------------------------------
-    // Internal utility code
-    // ----------------------------------------------------------------------
-
-    private ArtifactRepository createLocalRepository( Settings settings )
-        throws ComponentLookupException
+    public List collectProjects( File basedir, String[] includes, String[] 
excludes )
+        throws MojoExecutionException
     {
-        ArtifactRepositoryLayout repositoryLayout = (ArtifactRepositoryLayout) 
embedder.lookup( ArtifactRepositoryLayout.ROLE, "default" );
+        List projects = new ArrayList();
 
-        String url = settings.getLocalRepository();
+        List poms = getPomFiles( basedir, includes, excludes );
 
-        if ( !url.startsWith( "file:" ) )
+        for ( Iterator i = poms.iterator(); i.hasNext(); )
         {
-            url = "file://" + url;
-        }
-
-        ArtifactRepository localRepository = new DefaultArtifactRepository( 
"local", url, repositoryLayout );
+            File pom = (File) i.next();
 
-        boolean snapshotPolicySet = false;
+            try
+            {
+                MavenProject p = readProject( pom );
 
-        if ( offline )
-        {
-            settings.setOffline( true );
+                projects.add( p );
 
-            snapshotPolicySet = true;
+            }
+            catch ( ProjectBuildingException e )
+            {
+                throw new MojoExecutionException( "Error loading " + pom, e );
+            }
         }
 
-        if ( !snapshotPolicySet && updateSnapshots )
-        {
-            artifactRepositoryFactory.setGlobalUpdatePolicy( 
ArtifactRepositoryPolicy.UPDATE_POLICY_ALWAYS );
-        }
+        return projects;
+    }
 
-        artifactRepositoryFactory.setGlobalChecksumPolicy( 
globalChecksumPolicy );
+    // ----------------------------------------------------------------------
+    // Plugins
+    // ----------------------------------------------------------------------
 
-        return localRepository;
+    public List getAvailablePlugins()
+    {
+        List plugins = new ArrayList();
+
+        plugins.add( makeMockPlugin( "org.apache.maven.plugins", 
"maven-jar-plugin", "Maven Jar Plug-in" ) );
+
+        plugins.add( makeMockPlugin( "org.apache.maven.plugins", 
"maven-compiler-plugin", "Maven Compiler Plug-in" ) );
+
+        return plugins;
     }
 
-    private RuntimeInfo createRuntimeInfo( Settings settings )
+    public PluginDescriptor getPluginDescriptor( SummaryPluginDescriptor 
summaryPluginDescriptor )
+        throws MavenEmbedderException
     {
-        RuntimeInfo runtimeInfo = new RuntimeInfo( settings );
+        PluginDescriptor pluginDescriptor;
 
-        if ( pluginUpdateOverride )
-        {
-            runtimeInfo.setPluginUpdateOverride( Boolean.TRUE );
-        }
-        else
+        try
         {
-            runtimeInfo.setPluginUpdateOverride( Boolean.FALSE );
-        }
+            InputStream is = classLoader.getResourceAsStream( "/plugins/" + 
summaryPluginDescriptor.getArtifactId() + ".xml" );
 
-        if ( checkLatestPluginVersion )
-        {
-            runtimeInfo.setCheckLatestPluginVersion( Boolean.TRUE );
+            pluginDescriptor = pluginDescriptorBuilder.build( new 
InputStreamReader( is ) );
         }
-        else
+        catch ( PlexusConfigurationException e )
         {
-            runtimeInfo.setCheckLatestPluginVersion( Boolean.FALSE );
+            throw new MavenEmbedderException( "Error retrieving plugin 
descriptor.", e );
         }
 
-        return runtimeInfo;
+        return pluginDescriptor;
+    }
+
+    private SummaryPluginDescriptor makeMockPlugin( String groupId, String 
artifactId, String name )
+    {
+        return new SummaryPluginDescriptor( groupId, artifactId, name );
     }
 
     // ----------------------------------------------------------------------
     // Execution of phases/goals
     // ----------------------------------------------------------------------
 
+    // TODO: should we allow the passing in of a settings object so that 
everything can be taken from the client env
+
     public void execute( MavenProject project, List goals, EventDispatcher 
eventDispatcher, File executionRootDirectory )
         throws CycleDetectedException, LifecycleExecutionException, 
MojoExecutionException
     {
@@ -338,8 +359,6 @@
 
         rm.setFailureBehavior( ReactorManager.FAIL_AT_END );
 
-        //rm.blackList( (MavenProject) projects.get( 0 ) );
-
         MavenSession session = new MavenSession( embedder.getContainer(),
                                                  settings,
                                                  localRepository,
@@ -360,31 +379,66 @@
         }
     }
 
-    public List collectProjects( File basedir, String[] includes, String[] 
excludes )
-        throws MojoExecutionException
+    // ----------------------------------------------------------------------
+    // Internal utility code
+    // ----------------------------------------------------------------------
+
+    private ArtifactRepository createLocalRepository( Settings settings )
+        throws ComponentLookupException
     {
-        List projects = new ArrayList();
+        ArtifactRepositoryLayout repositoryLayout = (ArtifactRepositoryLayout) 
embedder.lookup( ArtifactRepositoryLayout.ROLE, "default" );
 
-        List poms = getPomFiles( basedir, includes, excludes );
+        String url = settings.getLocalRepository();
 
-        for ( Iterator i = poms.iterator(); i.hasNext(); )
+        if ( !url.startsWith( "file:" ) )
         {
-            File pom = (File) i.next();
+            url = "file://" + url;
+        }
 
-            try
-            {
-                MavenProject p = readProject( pom );
+        ArtifactRepository localRepository = new DefaultArtifactRepository( 
"local", url, repositoryLayout );
 
-                projects.add( p );
+        boolean snapshotPolicySet = false;
 
-            }
-            catch ( ProjectBuildingException e )
-            {
-                throw new MojoExecutionException( "Error loading " + pom, e );
-            }
+        if ( offline )
+        {
+            settings.setOffline( true );
+
+            snapshotPolicySet = true;
         }
 
-        return projects;
+        if ( !snapshotPolicySet && updateSnapshots )
+        {
+            artifactRepositoryFactory.setGlobalUpdatePolicy( 
ArtifactRepositoryPolicy.UPDATE_POLICY_ALWAYS );
+        }
+
+        artifactRepositoryFactory.setGlobalChecksumPolicy( 
globalChecksumPolicy );
+
+        return localRepository;
+    }
+
+    private RuntimeInfo createRuntimeInfo( Settings settings )
+    {
+        RuntimeInfo runtimeInfo = new RuntimeInfo( settings );
+
+        if ( pluginUpdateOverride )
+        {
+            runtimeInfo.setPluginUpdateOverride( Boolean.TRUE );
+        }
+        else
+        {
+            runtimeInfo.setPluginUpdateOverride( Boolean.FALSE );
+        }
+
+        if ( checkLatestPluginVersion )
+        {
+            runtimeInfo.setCheckLatestPluginVersion( Boolean.TRUE );
+        }
+        else
+        {
+            runtimeInfo.setCheckLatestPluginVersion( Boolean.FALSE );
+        }
+
+        return runtimeInfo;
     }
 
     private List getPomFiles( File basedir, String[] includes, String[] 
excludes )
@@ -429,7 +483,10 @@
 
             if ( !mavenHome.exists() )
             {
-                throw new IllegalStateException( "You have set a maven home, 
or the default of ~/m2 must exist on your system." );
+                if ( !mavenHome.mkdirs() )
+                {
+                    throw new IllegalStateException( "A maven home directory 
does not exist and cannot be created." );
+                }
             }
 
             System.setProperty( "maven.home", mavenHome.getAbsolutePath() );
@@ -456,6 +513,8 @@
             // 
----------------------------------------------------------------------
 
             modelReader = new MavenXpp3Reader();
+
+            pluginDescriptorBuilder = new PluginDescriptorBuilder();
 
             profileManager = new DefaultProfileManager( 
embedder.getContainer() );
 

Added: 
maven/components/trunk/maven-embedder/src/main/java/org/apache/maven/embedder/SummaryPluginDescriptor.java
URL: 
http://svn.apache.org/viewcvs/maven/components/trunk/maven-embedder/src/main/java/org/apache/maven/embedder/SummaryPluginDescriptor.java?rev=292339&view=auto
==============================================================================
--- 
maven/components/trunk/maven-embedder/src/main/java/org/apache/maven/embedder/SummaryPluginDescriptor.java
 (added)
+++ 
maven/components/trunk/maven-embedder/src/main/java/org/apache/maven/embedder/SummaryPluginDescriptor.java
 Wed Sep 28 15:56:41 2005
@@ -0,0 +1,50 @@
+package org.apache.maven.embedder;/*
+ * Copyright 2001-2005 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.
+ */
+
+/**
+ * @author <a href="mailto:[EMAIL PROTECTED]">Jason van Zyl</a>
+ * @version $Id:$
+ */
+public class SummaryPluginDescriptor
+{
+    private String groupId;
+
+    private String artifactId;
+
+    private String name;
+
+    public SummaryPluginDescriptor( String groupId, String artifactId, String 
name )
+    {
+        this.groupId = groupId;
+        this.artifactId = artifactId;
+        this.name = name;
+    }
+
+    public String getGroupId()
+    {
+        return groupId;
+    }
+
+    public String getArtifactId()
+    {
+        return artifactId;
+    }
+
+    public String getName()
+    {
+        return name;
+    }
+}

Propchange: 
maven/components/trunk/maven-embedder/src/main/java/org/apache/maven/embedder/SummaryPluginDescriptor.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
maven/components/trunk/maven-embedder/src/main/java/org/apache/maven/embedder/SummaryPluginDescriptor.java
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Modified: 
maven/components/trunk/maven-embedder/src/test/java/org/apache/maven/embedder/MavenEmbedderTest.java
URL: 
http://svn.apache.org/viewcvs/maven/components/trunk/maven-embedder/src/test/java/org/apache/maven/embedder/MavenEmbedderTest.java?rev=292339&r1=292338&r2=292339&view=diff
==============================================================================
--- 
maven/components/trunk/maven-embedder/src/test/java/org/apache/maven/embedder/MavenEmbedderTest.java
 (original)
+++ 
maven/components/trunk/maven-embedder/src/test/java/org/apache/maven/embedder/MavenEmbedderTest.java
 Wed Sep 28 15:56:41 2005
@@ -6,11 +6,13 @@
 import org.apache.maven.artifact.Artifact;
 import org.apache.maven.monitor.event.EventDispatcher;
 import org.apache.maven.monitor.event.DefaultEventDispatcher;
+import org.apache.maven.plugin.descriptor.PluginDescriptor;
 import org.codehaus.plexus.util.FileUtils;
 
 import java.io.File;
 import java.util.Set;
 import java.util.Collections;
+import java.util.List;
 
 public class MavenEmbedderTest
     extends TestCase
@@ -73,6 +75,26 @@
         File jar = new File( targetDirectory, 
"target/embedder-test-project-1.0-SNAPSHOT.jar" );
 
         assertTrue( jar.exists() );
+    }
+
+    // ----------------------------------------------------------------------
+    // Test mock plugin metadata
+    // ----------------------------------------------------------------------
+
+    public void testMockPluginMetadata()
+        throws Exception
+    {
+        List plugins = maven.getAvailablePlugins();
+
+        SummaryPluginDescriptor spd = (SummaryPluginDescriptor) plugins.get( 0 
);
+
+        assertNotNull( spd );
+
+        PluginDescriptor pd = maven.getPluginDescriptor( spd );
+
+        assertNotNull( pd );
+
+        assertEquals( "org.apache.maven.plugins", pd.getGroupId() );
     }
 
     // ----------------------------------------------------------------------

Modified: maven/components/trunk/maven-plugins/maven-plugin-plugin/pom.xml
URL: 
http://svn.apache.org/viewcvs/maven/components/trunk/maven-plugins/maven-plugin-plugin/pom.xml?rev=292339&r1=292338&r2=292339&view=diff
==============================================================================
--- maven/components/trunk/maven-plugins/maven-plugin-plugin/pom.xml (original)
+++ maven/components/trunk/maven-plugins/maven-plugin-plugin/pom.xml Wed Sep 28 
15:56:41 2005
@@ -24,6 +24,11 @@
   <dependencies>
     <dependency>
       <groupId>org.apache.maven</groupId>
+      <artifactId>maven-artifact-manager</artifactId>
+      <version>2.0-beta-3-SNAPSHOT</version>
+    </dependency>      
+    <dependency>
+      <groupId>org.apache.maven</groupId>
       <artifactId>maven-project</artifactId>
     </dependency>
     <dependency>

Modified: 
maven/components/trunk/maven-plugins/maven-plugin-plugin/src/main/java/org/apache/maven/plugin/plugin/metadata/AddPluginArtifactMetadataMojo.java
URL: 
http://svn.apache.org/viewcvs/maven/components/trunk/maven-plugins/maven-plugin-plugin/src/main/java/org/apache/maven/plugin/plugin/metadata/AddPluginArtifactMetadataMojo.java?rev=292339&r1=292338&r2=292339&view=diff
==============================================================================
--- 
maven/components/trunk/maven-plugins/maven-plugin-plugin/src/main/java/org/apache/maven/plugin/plugin/metadata/AddPluginArtifactMetadataMojo.java
 (original)
+++ 
maven/components/trunk/maven-plugins/maven-plugin-plugin/src/main/java/org/apache/maven/plugin/plugin/metadata/AddPluginArtifactMetadataMojo.java
 Wed Sep 28 15:56:41 2005
@@ -47,7 +47,7 @@
         projectArtifact.addMetadata( metadata );
 
         GroupRepositoryMetadata groupMetadata = new GroupRepositoryMetadata( 
project.getGroupId() );
-        groupMetadata.addPluginMapping( getGoalPrefix(), 
project.getArtifactId() );
+        groupMetadata.addPluginMapping( getGoalPrefix(), 
project.getArtifactId(), project.getName() );
 
         projectArtifact.addMetadata( groupMetadata );
     }

Modified: 
maven/components/trunk/maven-repository-metadata/src/main/mdo/metadata.mdo
URL: 
http://svn.apache.org/viewcvs/maven/components/trunk/maven-repository-metadata/src/main/mdo/metadata.mdo?rev=292339&r1=292338&r2=292339&view=diff
==============================================================================
--- maven/components/trunk/maven-repository-metadata/src/main/mdo/metadata.mdo 
(original)
+++ maven/components/trunk/maven-repository-metadata/src/main/mdo/metadata.mdo 
Wed Sep 28 15:56:41 2005
@@ -79,7 +79,9 @@
                 mappedPlugin.setArtifactId( plugin.getArtifactId() );
 
                 mappedPlugin.setPrefix( plugin.getPrefix() );
-
+                
+                mappedPlugin.setName( plugin.getName() );
+                
                 addPlugin( mappedPlugin );
 
                 changed = true;
@@ -262,6 +264,13 @@
       <description>Mapping information for a single plugin within this 
group</description>
       <comment>NOTE: plugin version is _NOT_ included here, since it is 
resolved using a separate algorithm.</comment>
       <fields>
+        <field>
+          <name>name</name>
+          <type>String</type>
+          <required>true</required>
+          <version>1.0.0</version>
+          <description>Display name for the plugin.</description>
+        </field>
         <field>
           <name>prefix</name>
           <type>String</type>

Modified: 
maven/components/trunk/maven-site/src/site/apt/guides/getting-started/background/history-of-maven.apt
URL: 
http://svn.apache.org/viewcvs/maven/components/trunk/maven-site/src/site/apt/guides/getting-started/background/history-of-maven.apt?rev=292339&r1=292338&r2=292339&view=diff
==============================================================================
--- 
maven/components/trunk/maven-site/src/site/apt/guides/getting-started/background/history-of-maven.apt
 (original)
+++ 
maven/components/trunk/maven-site/src/site/apt/guides/getting-started/background/history-of-maven.apt
 Wed Sep 28 15:56:41 2005
@@ -6,4 +6,67 @@
  12 October 2005
  ------
 
-History of Maven
+History of Maven by Jason van Zyl
+
+ Maven began its life in the {{{http://jakarta.apache.org}}Jakarta {{{ 
http://jakarta.apache.org/alexandria/legacy/}}Alexandria}
+ project. The Alexandria project is now defunct but was the breeding ground 
for not only Maven, but for the
+ {{{http://gump.apache.org}}Gump} and {{http://forrest.apache.org}}Forrest} 
projects as well. From the old
+ 
{{{http://cvs.apache.org/viewcvs.cgi/jakarta-alexandria/proposal/maven/?hideattic=0}}CVS}
 archive
+ you can see that as of the date of this document Maven was removed from 
Alexandria about 3 years, 7 months ago
+ making Maven about 4 years old! Maven spent about 5 months as part of the 
Alexandria before moving on to its next home
+ in the {{{http://jakarta.apache.org/turbine}}Turbine} project.
+
+ Though Maven started in Alexandria the testbed for its use was the Turbine 
project. Turbine was in the process of
+ decoupling its persistence layer, services layer and web layer into separate 
builds and I got very tired of having
+ to maintain several different builds which were essentially the same. There 
was no way to easy template Ant builds
+ in those days and every ant build appeared to be different and I found this 
incredibly frustrating and futile. I figured
+ who really cares how the build works so long as it works and is easy to use. 
The infrastructure of a project is
+ incredibly important but the value of a project lies in the application being 
developed. As such the build is
+ generally neglected and tends to fall apart in times of great need like when 
you need to prepare a release or when
+ more then a couple people diddle with it. In Jakarta land four years ago it 
was rare that a Ant build worked out of
+ the box. Mind you many Turbine developers suffered as I tried to get Maven 
working which is something I regret, but
+ I figure how do new projects start and survive if someone doesn's suffer. I 
figured it was for their own good
+ and after much gnashing of teeth I think Maven has finally come of age. It 
reminds me of one of my favourite quotes
+ from Ralph Johnson and Don Roberts in Patterns for Evolving Frameworks:
+
++-----+
+People develop abstractions by generalizing from concrete examples. Every 
attempt to determine the correct abstraction
+on paper without actually developing a running system is doomed to failure. No 
one is that smart. A framework is a
+resuable design, so you develop it by looking at the things it is supposed to 
be a design of. The more examples
+you look at, the more general your framework will be.
++-----+
+
+ I didn't really know what the final result would look like I just knew there 
had to be a better way.
+ But to start with I know I wanted:
+
+ * <<A model for a project>> so you could look in one place for everything 
that pertained to the project
+
+ * <<A standard directory structure>> so you didn't have to go fishing around 
for libraries, sources and documentation
+
+ So started using a model with a simple XML representation and picked what I 
thought were some decent standards for
+ a directory structure and that's how it started. I was still using Ant under 
the covers but I had some standard targets
+ that could be used in each of the Turbine builds and that made me happy.
+
+ As noted above one of the projects in Alexandria at the time was Gump. Sam 
Ruby tried to convince me that using
+ the Gump model would be a good idea so I took a look. After taking a look the 
descriptors I noted that Gump
+ pretty much allowed any project to do whatever it wanted in terms of 
directory structure and use of JARs in CVS
+ as Gump was not trying to standardize anything at the time but trying to 
continously integrate anything it could
+ get its hands on. My goals were different and I wanted to make an
+ 
{{{http://www.oreillynet.com/pub/a/network/2005/08/30/ruby-rails-david-heinemeier-hansson.html}}opinionated}
 piece
+ of software and I preferred the notion of convention over configuration. I 
wanted a project's infrastructure to
+ look the same and work the same so I continued to pursue my own model for a 
project and decided to disagree with
+ Gump's particular tact at project modelling which I thought was too flexible.
+
+ The next thing I noticed were all the JARs that we were storing in CVS. We 
had many copies of Xerces laying around
+ which is a waste of space but more important was that every time the version 
of Xerces changed I had to update the
+ copies of Xerces in each of the projects. This is when I decided to employ 
standard Java-like inheritance in the
+ model used and find a way to create a repository for things you need to 
build. So I hacked in some inheritance
+ goop and now it was time for the repository.
+
+ ~~ jar jar
+ ~~ ibiblio reasons
+ ~~ maven top-level project
+ ~~ use of jelly
+ ~~ move toward 1.0
+ ~~ development of m2
+ ~~ present day



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to