You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by br...@apache.org on 2005/05/09 02:21:34 UTC

svn commit: r169201 - /maven/components/trunk/maven-core/src/main/java/org/apache/maven/plugin /maven/components/trunk/maven-plugin-descriptor/src/main/java/org/apache/maven/plugin/descriptor

Author: brett
Date: Sun May  8 17:21:33 2005
New Revision: 169201

URL: http://svn.apache.org/viewcvs?rev=169201&view=rev
Log:
PR: MNG-371
Submitted by: Kenney Westerhof
Reviewed by:  Brett Porter
give the location of the plugin descriptor

Modified:
    maven/components/trunk/maven-core/src/main/java/org/apache/maven/plugin/MavenPluginDiscoverer.java
    maven/components/trunk/maven-plugin-descriptor/src/main/java/org/apache/maven/plugin/descriptor/PluginDescriptor.java
    maven/components/trunk/maven-plugin-descriptor/src/main/java/org/apache/maven/plugin/descriptor/PluginDescriptorBuilder.java

Modified: maven/components/trunk/maven-core/src/main/java/org/apache/maven/plugin/MavenPluginDiscoverer.java
URL: http://svn.apache.org/viewcvs/maven/components/trunk/maven-core/src/main/java/org/apache/maven/plugin/MavenPluginDiscoverer.java?rev=169201&r1=169200&r2=169201&view=diff
==============================================================================
--- maven/components/trunk/maven-core/src/main/java/org/apache/maven/plugin/MavenPluginDiscoverer.java (original)
+++ maven/components/trunk/maven-core/src/main/java/org/apache/maven/plugin/MavenPluginDiscoverer.java Sun May  8 17:21:33 2005
@@ -47,6 +47,6 @@
     public ComponentSetDescriptor createComponentDescriptors( Reader componentDescriptorConfiguration, String source )
         throws PlexusConfigurationException
     {
-        return builder.build( componentDescriptorConfiguration );
+        return builder.build( componentDescriptorConfiguration, source );
     }
 }

Modified: maven/components/trunk/maven-plugin-descriptor/src/main/java/org/apache/maven/plugin/descriptor/PluginDescriptor.java
URL: http://svn.apache.org/viewcvs/maven/components/trunk/maven-plugin-descriptor/src/main/java/org/apache/maven/plugin/descriptor/PluginDescriptor.java?rev=169201&r1=169200&r2=169201&view=diff
==============================================================================
--- maven/components/trunk/maven-plugin-descriptor/src/main/java/org/apache/maven/plugin/descriptor/PluginDescriptor.java (original)
+++ maven/components/trunk/maven-plugin-descriptor/src/main/java/org/apache/maven/plugin/descriptor/PluginDescriptor.java Sun May  8 17:21:33 2005
@@ -39,6 +39,8 @@
 
     private String goalPrefix;
 
+    private String source;
+
     // ----------------------------------------------------------------------
     //
     // ----------------------------------------------------------------------
@@ -109,7 +111,7 @@
         String id = constructPluginKey( groupId, artifactId, version );
         if ( groupId == null || artifactId == null || version == null )
         {
-            throw new IllegalStateException( "Plugin descriptor ID incomplete: " + id );
+            throw new IllegalStateException( "Plugin descriptor ID incomplete: " + id + " in " + getSource() );
         }
         return id;
     }
@@ -173,5 +175,15 @@
     public String getVersion()
     {
         return version;
+    }
+
+    public void setSource( String source )
+    {
+        this.source = source;
+    }
+
+    public String getSource()
+    {
+        return source;
     }
 }

Modified: maven/components/trunk/maven-plugin-descriptor/src/main/java/org/apache/maven/plugin/descriptor/PluginDescriptorBuilder.java
URL: http://svn.apache.org/viewcvs/maven/components/trunk/maven-plugin-descriptor/src/main/java/org/apache/maven/plugin/descriptor/PluginDescriptorBuilder.java?rev=169201&r1=169200&r2=169201&view=diff
==============================================================================
--- maven/components/trunk/maven-plugin-descriptor/src/main/java/org/apache/maven/plugin/descriptor/PluginDescriptorBuilder.java (original)
+++ maven/components/trunk/maven-plugin-descriptor/src/main/java/org/apache/maven/plugin/descriptor/PluginDescriptorBuilder.java Sun May  8 17:21:33 2005
@@ -22,10 +22,17 @@
     public PluginDescriptor build( Reader reader )
         throws PlexusConfigurationException
     {
+        return build( reader, null );
+    }
+
+    public PluginDescriptor build( Reader reader, String source )
+        throws PlexusConfigurationException
+    {
         PlexusConfiguration c = buildConfiguration( reader );
 
         PluginDescriptor pluginDescriptor = new PluginDescriptor();
 
+        pluginDescriptor.setSource( source );
         pluginDescriptor.setGroupId( c.getChild( "groupId" ).getValue() );
         pluginDescriptor.setArtifactId( c.getChild( "artifactId" ).getValue() );
         pluginDescriptor.setVersion( c.getChild( "version" ).getValue() );



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org