You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by ol...@apache.org on 2012/05/09 18:45:28 UTC

svn commit: r1336291 - in /maven/plugin-tools/branches/MPLUGIN-189: ./ maven-plugin-plugin/ maven-plugin-plugin/src/it/annotation-with-inheritance-from-deps/ maven-plugin-plugin/src/it/annotation-with-inheritance-from-deps/src/ maven-plugin-plugin/src/...

Author: olamy
Date: Wed May  9 16:45:26 2012
New Revision: 1336291

URL: http://svn.apache.org/viewvc?rev=1336291&view=rev
Log:
[MPLUGIN-189] scan sources from dependencies if sources classifier found to get @since,@deprecated and text

Added:
    maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-plugin/src/it/annotation-with-inheritance-from-deps/
    maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-plugin/src/it/annotation-with-inheritance-from-deps/invoker.properties   (with props)
    maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-plugin/src/it/annotation-with-inheritance-from-deps/pom.xml   (with props)
    maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-plugin/src/it/annotation-with-inheritance-from-deps/src/
    maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-plugin/src/it/annotation-with-inheritance-from-deps/src/main/
    maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-plugin/src/it/annotation-with-inheritance-from-deps/src/main/java/
    maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-plugin/src/it/annotation-with-inheritance-from-deps/src/main/java/org/
    maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-plugin/src/it/annotation-with-inheritance-from-deps/src/main/java/org/apache/
    maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-plugin/src/it/annotation-with-inheritance-from-deps/src/main/java/org/apache/maven/
    maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-plugin/src/it/annotation-with-inheritance-from-deps/src/main/java/org/apache/maven/plugin/
    maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-plugin/src/it/annotation-with-inheritance-from-deps/src/main/java/org/apache/maven/plugin/coreit/
    maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-plugin/src/it/annotation-with-inheritance-from-deps/src/main/java/org/apache/maven/plugin/coreit/FirstMojo.java   (with props)
    maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-plugin/src/it/annotation-with-inheritance-from-deps/src/main/resources/
    maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-plugin/src/it/annotation-with-inheritance-from-deps/src/main/resources/META-INF/
    maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-plugin/src/it/annotation-with-inheritance-from-deps/src/main/resources/META-INF/maven/
    maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-plugin/src/it/annotation-with-inheritance-from-deps/src/main/resources/META-INF/maven/lifecycle.xml   (with props)
    maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-plugin/src/it/annotation-with-inheritance-from-deps/verify.groovy   (with props)
Modified:
    maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-plugin/pom.xml
    maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-plugin/src/main/java/org/apache/maven/plugin/plugin/AbstractGeneratorMojo.java
    maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-tools-annotations/pom.xml
    maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-tools-annotations/src/main/java/org/apache/maven/tools/plugin/annotations/JavaAnnotationsMojoDescriptorExtractor.java
    maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-tools-annotations/src/main/resources/META-INF/plexus/components.xml
    maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-tools-annotations/src/test/java/org/apache/maven/tools/plugin/annotations/FooMojo.java
    maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-tools-api/src/main/java/org/apache/maven/tools/plugin/DefaultPluginToolsRequest.java
    maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-tools-api/src/main/java/org/apache/maven/tools/plugin/PluginToolsRequest.java
    maven/plugin-tools/branches/MPLUGIN-189/pom.xml

Modified: maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-plugin/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-plugin/pom.xml?rev=1336291&r1=1336290&r2=1336291&view=diff
==============================================================================
--- maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-plugin/pom.xml (original)
+++ maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-plugin/pom.xml Wed May  9 16:45:26 2012
@@ -106,6 +106,11 @@
         <artifactId>plexus-utils</artifactId>
         <version>2.0.5</version>
       </dependency>
+      <dependency>
+        <groupId>org.codehaus.plexus</groupId>
+        <artifactId>plexus-archiver</artifactId>
+        <version>2.1.1</version>
+      </dependency>
     </dependencies>
   </dependencyManagement>
 

Added: maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-plugin/src/it/annotation-with-inheritance-from-deps/invoker.properties
URL: http://svn.apache.org/viewvc/maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-plugin/src/it/annotation-with-inheritance-from-deps/invoker.properties?rev=1336291&view=auto
==============================================================================
--- maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-plugin/src/it/annotation-with-inheritance-from-deps/invoker.properties (added)
+++ maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-plugin/src/it/annotation-with-inheritance-from-deps/invoker.properties Wed May  9 16:45:26 2012
@@ -0,0 +1,5 @@
+invoker.goals.1 = install
+invoker.goals.2 = org.apache.maven.its.annotation-with-inheritance-from-deps:annotation-with-inheritance-from-deps:1.0:first
+#FIXME disabled need to find a solution for the chicken and eggs issue.
+#help sources are generated @generated-sources but need descriptor which need compile phase first for classes scanning
+#invoker.goals.3 = org.apache.maven.its.basic-java-annotations:maven-it-basic-java-annotations:1.0::help

Propchange: maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-plugin/src/it/annotation-with-inheritance-from-deps/invoker.properties
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-plugin/src/it/annotation-with-inheritance-from-deps/invoker.properties
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-plugin/src/it/annotation-with-inheritance-from-deps/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-plugin/src/it/annotation-with-inheritance-from-deps/pom.xml?rev=1336291&view=auto
==============================================================================
--- maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-plugin/src/it/annotation-with-inheritance-from-deps/pom.xml (added)
+++ maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-plugin/src/it/annotation-with-inheritance-from-deps/pom.xml Wed May  9 16:45:26 2012
@@ -0,0 +1,109 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<project>
+  <modelVersion>4.0.0</modelVersion>
+
+  <groupId>org.apache.maven.its.annotation-with-inheritance-from-deps</groupId>
+  <artifactId>annotation-with-inheritance-from-deps</artifactId>
+  <version>1.0</version>
+  <packaging>maven-plugin</packaging>
+
+  <name>Maven Integration Test :: annotation-with-inheritance-from-deps</name>
+  <description>
+    Test plugin-plugin, which tests maven-plugin-tools-api and 
+    maven-plugin-tools-java. This will generate a plugin descriptor from 
+    java-based mojo sources, install the plugin, and then use it.
+  </description>
+
+  <properties>
+    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+    <plexusCompilerVersion>1.8.6</plexusCompilerVersion>
+  </properties>
+
+  <dependencies>
+    <dependency>
+      <groupId>org.apache.maven</groupId>
+      <artifactId>maven-plugin-api</artifactId>
+      <version>2.0</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.maven</groupId>
+      <artifactId>maven-project</artifactId>
+      <version>@mavenVersion@</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.maven.plugin-tools</groupId>
+      <artifactId>maven-plugin-annotations</artifactId>
+      <version>@project.version@</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.maven.plugin-tools</groupId>
+      <artifactId>maven-plugin-tools-annotations</artifactId>
+      <version>@project.version@</version>
+      <classifier>tests</classifier>
+    </dependency>
+    <dependency>
+      <groupId>org.codehaus.plexus</groupId>
+      <artifactId>plexus-compiler-manager</artifactId>
+      <version>${plexusCompilerVersion}</version>
+      <exclusions>
+        <exclusion>
+          <groupId>org.codehaus.plexus</groupId>
+          <artifactId>plexus-component-api</artifactId>
+        </exclusion>
+      </exclusions>
+    </dependency>
+    <dependency>
+      <groupId>org.codehaus.plexus</groupId>
+      <artifactId>plexus-compiler-javac</artifactId>
+      <version>${plexusCompilerVersion}</version>
+      <exclusions>
+        <exclusion>
+          <groupId>org.codehaus.plexus</groupId>
+          <artifactId>plexus-component-api</artifactId>
+        </exclusion>
+      </exclusions>
+    </dependency>
+  </dependencies>
+
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-plugin-plugin</artifactId>
+        <version>@project.version@</version>
+        <configuration>
+          <skipErrorNoDescriptorsFound>true</skipErrorNoDescriptorsFound>
+        </configuration>
+        <executions>
+          <execution>
+            <id>mojo-descriptor</id>
+            <phase>process-classes</phase>
+            <goals>
+              <goal>descriptor</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
+    </plugins>
+  </build>
+</project>

Propchange: maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-plugin/src/it/annotation-with-inheritance-from-deps/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-plugin/src/it/annotation-with-inheritance-from-deps/pom.xml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-plugin/src/it/annotation-with-inheritance-from-deps/src/main/java/org/apache/maven/plugin/coreit/FirstMojo.java
URL: http://svn.apache.org/viewvc/maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-plugin/src/it/annotation-with-inheritance-from-deps/src/main/java/org/apache/maven/plugin/coreit/FirstMojo.java?rev=1336291&view=auto
==============================================================================
--- maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-plugin/src/it/annotation-with-inheritance-from-deps/src/main/java/org/apache/maven/plugin/coreit/FirstMojo.java (added)
+++ maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-plugin/src/it/annotation-with-inheritance-from-deps/src/main/java/org/apache/maven/plugin/coreit/FirstMojo.java Wed May  9 16:45:26 2012
@@ -0,0 +1,73 @@
+package org.apache.maven.plugin.coreit;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import org.apache.maven.plugin.MojoExecutionException;
+import org.apache.maven.plugins.annotations.Component;
+import org.apache.maven.plugins.annotations.Execute;
+import org.apache.maven.plugins.annotations.LifecyclePhase;
+import org.apache.maven.plugins.annotations.Mojo;
+import org.apache.maven.plugins.annotations.Parameter;
+import org.apache.maven.tools.plugin.annotations.FooMojo;
+
+/**
+ * Touches a test file.
+ *
+ * @since 1.2
+ * @deprecated Don't use!
+ */
+@Mojo( name = "first", requiresDependencyResolution = "test", defaultPhase = LifecyclePhase.INTEGRATION_TEST )
+public class FirstMojo
+    extends FooMojo
+{
+
+    /**
+     * @since 0.1
+     * @deprecated As of 0.2
+     */
+    @Parameter( alias = "alias" )
+    private String aliasedParam;
+
+    @Component( role = "org.apache.maven.project.MavenProjectHelper", roleHint = "default" )
+    private Object projectHelper;
+
+    public void execute()
+        throws MojoExecutionException
+    {
+        if (bar == null)
+        {
+            throw new MojoExecutionException( "bar == null" );
+        }
+        if (beer == null)
+        {
+            throw new MojoExecutionException( "beer == null" );
+        }
+        if ( projectHelper == null )
+        {
+            throw new MojoExecutionException( "projectHelper == null" );
+        }
+        if ( compilerManager == null )
+        {
+            throw new MojoExecutionException( "compilerManager == null" );
+        }
+
+    }
+
+}

Propchange: maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-plugin/src/it/annotation-with-inheritance-from-deps/src/main/java/org/apache/maven/plugin/coreit/FirstMojo.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-plugin/src/it/annotation-with-inheritance-from-deps/src/main/java/org/apache/maven/plugin/coreit/FirstMojo.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-plugin/src/it/annotation-with-inheritance-from-deps/src/main/resources/META-INF/maven/lifecycle.xml
URL: http://svn.apache.org/viewvc/maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-plugin/src/it/annotation-with-inheritance-from-deps/src/main/resources/META-INF/maven/lifecycle.xml?rev=1336291&view=auto
==============================================================================
--- maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-plugin/src/it/annotation-with-inheritance-from-deps/src/main/resources/META-INF/maven/lifecycle.xml (added)
+++ maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-plugin/src/it/annotation-with-inheritance-from-deps/src/main/resources/META-INF/maven/lifecycle.xml Wed May  9 16:45:26 2012
@@ -0,0 +1,17 @@
+<lifecycles>
+  <lifecycle>
+    <id>my-lifecycle</id>
+    <phases>
+      <phase>
+        <id>process-classes</id>
+      </phase>
+      <phase>
+        <id>test</id>
+        <configuration>
+          <classesDirectory>${project.build.directory}/generated-classes/cobertura</classesDirectory>
+          <testFailureIgnore>true</testFailureIgnore>
+        </configuration>
+      </phase>
+    </phases>
+  </lifecycle>
+</lifecycles>
\ No newline at end of file

Propchange: maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-plugin/src/it/annotation-with-inheritance-from-deps/src/main/resources/META-INF/maven/lifecycle.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-plugin/src/it/annotation-with-inheritance-from-deps/src/main/resources/META-INF/maven/lifecycle.xml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-plugin/src/it/annotation-with-inheritance-from-deps/verify.groovy
URL: http://svn.apache.org/viewvc/maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-plugin/src/it/annotation-with-inheritance-from-deps/verify.groovy?rev=1336291&view=auto
==============================================================================
--- maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-plugin/src/it/annotation-with-inheritance-from-deps/verify.groovy (added)
+++ maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-plugin/src/it/annotation-with-inheritance-from-deps/verify.groovy Wed May  9 16:45:26 2012
@@ -0,0 +1,75 @@
+
+File descriptorFile = new File( basedir, "target/classes/META-INF/maven/plugin.xml" );
+assert descriptorFile.isFile()
+
+def pluginDescriptor = new XmlParser().parse( descriptorFile );
+
+def mojo = pluginDescriptor.mojos.mojo.findAll{ it.goal.text() == "first"}[0]
+
+assert mojo.goal.text() == 'first'
+assert mojo.implementation.text() == 'org.apache.maven.plugin.coreit.FirstMojo'
+assert mojo.language.text() == 'java'
+assert mojo.description.text() == 'Touches a test file.'
+assert mojo.deprecated.text() == "Don't use!"
+assert mojo.requiresDependencyResolution.text() == 'test'
+assert mojo.requiresDependencyCollection.text() == ''
+assert mojo.requiresProject.text() == 'true'
+assert mojo.requiresOnline.text() == 'false'
+assert mojo.requiresDirectInvocation.text() == 'false'
+assert mojo.aggregator.text() == 'false'
+assert mojo.threadSafe.text() == 'false'
+assert mojo.phase.text() == 'integration-test'
+assert mojo.executePhase.text() == 'package'
+assert mojo.executeLifecycle.text() == 'my-lifecycle'
+
+assert mojo.configuration.bar[0].text() == '${thebar}'
+assert mojo.configuration.bar[0].'@implementation' == 'java.lang.String'
+assert mojo.configuration.bar[0].'@default-value' == 'coolbar'
+
+assert mojo.configuration.beer[0].text() == '${thebeer}'
+assert mojo.configuration.beer[0].'@implementation' == 'java.lang.String'
+assert mojo.configuration.beer[0].'@default-value' == 'coolbeer'
+
+assert mojo.requirements.requirement.size() == 3
+
+assert mojo.requirements.requirement[1].role.text() == 'org.codehaus.plexus.compiler.manager.CompilerManager'
+assert mojo.requirements.requirement[1].'role-hint'.text() == ''
+assert mojo.requirements.requirement[1].'field-name'.text() == 'compilerManager'
+
+assert mojo.requirements.requirement[2].role.text() == 'org.apache.maven.project.MavenProjectHelper'
+assert mojo.requirements.requirement[2].'role-hint'.text() == 'default'
+assert mojo.requirements.requirement[2].'field-name'.text() == 'projectHelper'
+
+assert mojo.parameters.parameter.size() == 3
+
+def parameter = mojo.parameters.parameter.findAll{ it.name.text() == "aliasedParam"}[0]
+
+assert parameter.name.text() == 'aliasedParam'
+assert parameter.alias.text() == 'alias'
+assert parameter.type.text() == 'java.lang.String'
+assert parameter.deprecated.text() == 'As of 0.2'
+assert parameter.required.text() == 'false'
+assert parameter.editable.text() == 'true'
+assert parameter.description.text() == ''
+
+parameter = mojo.parameters.parameter.findAll{ it.name.text() == "beer"}[0]
+
+assert parameter.name.text() == 'beer'
+assert parameter.alias.isEmpty()
+assert parameter.type.text() == 'java.lang.String'
+assert parameter.deprecated.text() == "wine is better"
+assert parameter.required.text() == 'false'
+assert parameter.editable.text() == 'true'
+assert parameter.description.text() == 'beer for non french folks'
+
+parameter = mojo.parameters.parameter.findAll{ it.name.text() == "bar"}[0]
+
+assert parameter.name.text() == 'bar'
+assert parameter.alias.isEmpty()
+assert parameter.type.text() == 'java.lang.String'
+assert parameter.deprecated.isEmpty()
+assert parameter.required.text() == 'true'
+assert parameter.editable.text() == 'true'
+assert parameter.description.text() == 'the cool bar to go'
+
+return true;

Propchange: maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-plugin/src/it/annotation-with-inheritance-from-deps/verify.groovy
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-plugin/src/it/annotation-with-inheritance-from-deps/verify.groovy
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Modified: maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-plugin/src/main/java/org/apache/maven/plugin/plugin/AbstractGeneratorMojo.java
URL: http://svn.apache.org/viewvc/maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-plugin/src/main/java/org/apache/maven/plugin/plugin/AbstractGeneratorMojo.java?rev=1336291&r1=1336290&r2=1336291&view=diff
==============================================================================
--- maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-plugin/src/main/java/org/apache/maven/plugin/plugin/AbstractGeneratorMojo.java (original)
+++ maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-plugin/src/main/java/org/apache/maven/plugin/plugin/AbstractGeneratorMojo.java Wed May  9 16:45:26 2012
@@ -20,6 +20,7 @@ package org.apache.maven.plugin.plugin;
  */
 
 import org.apache.maven.artifact.Artifact;
+import org.apache.maven.artifact.repository.ArtifactRepository;
 import org.apache.maven.plugin.AbstractMojo;
 import org.apache.maven.plugin.MojoExecutionException;
 import org.apache.maven.plugin.descriptor.InvalidPluginDescriptorException;
@@ -35,6 +36,7 @@ import org.codehaus.plexus.util.ReaderFa
 
 import java.io.File;
 import java.io.IOException;
+import java.util.List;
 import java.util.Set;
 
 /**
@@ -42,7 +44,6 @@ import java.util.Set;
  *
  * @author <a href="mailto:jason@maven.org">Jason van Zyl</a>
  * @version $Id$
- * 
  * @threadSafe
  */
 public abstract class AbstractGeneratorMojo
@@ -67,7 +68,7 @@ public abstract class AbstractGeneratorM
 
     /**
      * The file encoding of the source files.
-     * 
+     *
      * @parameter expression="${encoding}" default-value="${project.build.sourceEncoding}"
      * @since 2.5
      */
@@ -84,6 +85,7 @@ public abstract class AbstractGeneratorM
      * By default an exception is throw if no mojo descriptor is found. As the maven-plugin is defined in core, the
      * descriptor generator mojo is bound to generate-resources phase.
      * But for annotations, the compiled classes are needed, so skip error
+     *
      * @parameter expression="${maven.plugin.skipErrorNoDescriptorsFound}" default-value="false"
      * @since 3.0
      */
@@ -100,12 +102,12 @@ public abstract class AbstractGeneratorM
      * <pre>
      *  &lt;!-- Use all mojo extractors --&gt;
      *  &lt;extractors/&gt;
-     *  
+     *
      *  &lt;!-- Use no mojo extractors --&gt;
      *  &lt;extractors&gt;
      *      &lt;extractor/&gt;
      *  &lt;/extractors&gt;
-     *  
+     *
      *  &lt;!-- Use only bsh mojo extractor --&gt;
      *  &lt;extractors&gt;
      *      &lt;extractor&gt;bsh&lt;/extractor&gt;
@@ -135,6 +137,26 @@ public abstract class AbstractGeneratorM
     protected Set<Artifact> dependencies;
 
     /**
+     * List of Remote Repositories used by the resolver
+     *
+     * @parameter expression="${project.remoteArtifactRepositories}"
+     * @readonly
+     * @required
+     * @since 3.0
+     */
+    protected List<ArtifactRepository> remoteRepos;
+
+    /**
+     * Location of the local repository.
+     *
+     * @parameter expression="${localRepository}"
+     * @readonly
+     * @required
+     * @since 3.0
+     */
+    protected ArtifactRepository local;
+
+    /**
      * @return the output directory where files will be generated.
      */
     protected abstract File getOutputDirectory();
@@ -144,7 +166,9 @@ public abstract class AbstractGeneratorM
      */
     protected abstract Generator createGenerator();
 
-    /** {@inheritDoc} */
+    /**
+     * {@inheritDoc}
+     */
     public void execute()
         throws MojoExecutionException
     {
@@ -158,11 +182,11 @@ public abstract class AbstractGeneratorM
             return;
         }
 
-        if ( project.getArtifactId().toLowerCase().startsWith( "maven-" ) 
-            && project.getArtifactId().toLowerCase().endsWith( "-plugin" )
-            && !"org.apache.maven.plugins".equals( project.getGroupId() ) )
+        if ( project.getArtifactId().toLowerCase().startsWith( "maven-" )
+            && project.getArtifactId().toLowerCase().endsWith( "-plugin" ) && !"org.apache.maven.plugins".equals(
+            project.getGroupId() ) )
         {
-            getLog().error( "\n\nArtifact Ids of the format maven-___-plugin are reserved for \n" 
+            getLog().error( "\n\nArtifact Ids of the format maven-___-plugin are reserved for \n"
                                 + "plugins in the Group Id org.apache.maven.plugins\n"
                                 + "Please change your artifactId to the format ___-maven-plugin\n"
                                 + "In the future this error will break the build.\n\n" );
@@ -176,8 +200,8 @@ public abstract class AbstractGeneratorM
         else if ( !goalPrefix.equals( defaultGoalPrefix ) )
         {
             getLog().warn(
-                           "\n\nGoal prefix is specified as: '" + goalPrefix + "'. "
-                               + "Maven currently expects it to be '" + defaultGoalPrefix + "'.\n" );
+                "\n\nGoal prefix is specified as: '" + goalPrefix + "'. " + "Maven currently expects it to be '"
+                    + defaultGoalPrefix + "'.\n" );
         }
 
         mojoScanner.setActiveExtractors( extractors );
@@ -200,21 +224,23 @@ public abstract class AbstractGeneratorM
         if ( encoding == null || encoding.length() < 1 )
         {
             getLog().warn( "Using platform encoding (" + ReaderFactory.FILE_ENCODING
-                                  + " actually) to read mojo metadata, i.e. build is platform dependent!" );
+                               + " actually) to read mojo metadata, i.e. build is platform dependent!" );
         }
         else
         {
             getLog().info( "Using '" + encoding + "' encoding to read mojo metadata." );
         }
-        
+
         try
         {
             pluginDescriptor.setDependencies( PluginUtils.toComponentDependencies( project.getRuntimeDependencies() ) );
-            
+
             PluginToolsRequest request = new DefaultPluginToolsRequest( project, pluginDescriptor );
             request.setEncoding( encoding );
             request.setSkipErrorNoDescriptorsFound( skipErrorNoDescriptorsFound );
             request.setDependencies( dependencies );
+            request.setLocal( this.local );
+            request.setRemoteRepos( this.remoteRepos );
 
             mojoScanner.populatePluginDescriptor( request );
 
@@ -239,7 +265,8 @@ public abstract class AbstractGeneratorM
         catch ( LinkageError e )
         {
             throw new MojoExecutionException( "The API of the mojo scanner is not compatible with this plugin version."
-                + " Please check the plugin dependencies configured in the POM and ensure the versions match.", e );
+                                                  + " Please check the plugin dependencies configured in the POM and ensure the versions match.",
+                                              e );
         }
     }
 

Modified: maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-tools-annotations/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-tools-annotations/pom.xml?rev=1336291&r1=1336290&r2=1336291&view=diff
==============================================================================
--- maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-tools-annotations/pom.xml (original)
+++ maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-tools-annotations/pom.xml Wed May  9 16:45:26 2012
@@ -73,6 +73,11 @@
     </dependency>
 
     <dependency>
+      <groupId>org.codehaus.plexus</groupId>
+      <artifactId>plexus-archiver</artifactId>
+    </dependency>
+
+    <dependency>
       <groupId>com.thoughtworks.qdox</groupId>
       <artifactId>qdox</artifactId>
     </dependency>

Modified: maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-tools-annotations/src/main/java/org/apache/maven/tools/plugin/annotations/JavaAnnotationsMojoDescriptorExtractor.java
URL: http://svn.apache.org/viewvc/maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-tools-annotations/src/main/java/org/apache/maven/tools/plugin/annotations/JavaAnnotationsMojoDescriptorExtractor.java?rev=1336291&r1=1336290&r2=1336291&view=diff
==============================================================================
--- maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-tools-annotations/src/main/java/org/apache/maven/tools/plugin/annotations/JavaAnnotationsMojoDescriptorExtractor.java (original)
+++ maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-tools-annotations/src/main/java/org/apache/maven/tools/plugin/annotations/JavaAnnotationsMojoDescriptorExtractor.java Wed May  9 16:45:26 2012
@@ -23,6 +23,10 @@ import com.thoughtworks.qdox.model.Docle
 import com.thoughtworks.qdox.model.JavaClass;
 import com.thoughtworks.qdox.model.JavaField;
 import org.apache.maven.artifact.Artifact;
+import org.apache.maven.artifact.factory.ArtifactFactory;
+import org.apache.maven.artifact.resolver.ArtifactNotFoundException;
+import org.apache.maven.artifact.resolver.ArtifactResolutionException;
+import org.apache.maven.artifact.resolver.ArtifactResolver;
 import org.apache.maven.plugin.descriptor.DuplicateParameterException;
 import org.apache.maven.plugin.descriptor.InvalidPluginDescriptorException;
 import org.apache.maven.plugin.descriptor.MojoDescriptor;
@@ -41,6 +45,9 @@ import org.apache.maven.tools.plugin.ann
 import org.apache.maven.tools.plugin.annotations.scanner.MojoAnnotationsScannerRequest;
 import org.apache.maven.tools.plugin.extractor.ExtractionException;
 import org.apache.maven.tools.plugin.extractor.MojoDescriptorExtractor;
+import org.codehaus.plexus.archiver.UnArchiver;
+import org.codehaus.plexus.archiver.manager.ArchiverManager;
+import org.codehaus.plexus.archiver.manager.NoSuchArchiverException;
 import org.codehaus.plexus.logging.AbstractLogEnabled;
 import org.codehaus.plexus.util.StringUtils;
 
@@ -50,8 +57,10 @@ import java.util.Arrays;
 import java.util.Collection;
 import java.util.Collections;
 import java.util.HashMap;
+import java.util.HashSet;
 import java.util.List;
 import java.util.Map;
+import java.util.Set;
 import java.util.TreeMap;
 import java.util.TreeSet;
 
@@ -69,6 +78,21 @@ public class JavaAnnotationsMojoDescript
      */
     private MojoAnnotationsScanner mojoAnnotationsScanner;
 
+    /**
+     * @requirement
+     */
+    private ArtifactResolver artifactResolver;
+
+    /**
+     * @requirement
+     */
+    private ArtifactFactory artifactFactory;
+
+    /**
+     * @requirement
+     */
+    private ArchiverManager archiverManager;
+
     public List<MojoDescriptor> execute( MavenProject project, PluginDescriptor pluginDescriptor )
         throws ExtractionException, InvalidPluginDescriptorException
     {
@@ -95,6 +119,9 @@ public class JavaAnnotationsMojoDescript
         // we currently only scan sources from reactors
         List<MavenProject> mavenProjects = new ArrayList<MavenProject>();
 
+        // if we need to scan sources from external artifacts
+        Set<Artifact> externalArtifacts = new HashSet<Artifact>();
+
         for ( MojoAnnotatedClass mojoAnnotatedClass : mojoAnnotatedClasses.values() )
         {
             if ( !StringUtils.equals( mojoAnnotatedClass.getArtifact().getArtifactId(),
@@ -106,11 +133,31 @@ public class JavaAnnotationsMojoDescript
                 {
                     mavenProjects.add( mavenProject );
                 }
+                else
+                {
+                    externalArtifacts.add( mojoAnnotatedClass.getArtifact() );
+                }
             }
         }
 
         Map<String, JavaClass> javaClassesMap = new HashMap<String, JavaClass>();
 
+        // try to get artifact with classifier sources
+        // extract somewhere then scan doclet for @since, @deprecated
+        for ( Artifact artifact : externalArtifacts )
+        {
+            // parameter for test-sources too ?? olamy I need that for it test only
+            if ( StringUtils.equalsIgnoreCase( "tests", artifact.getClassifier() ) )
+            {
+                javaClassesMap.putAll( discoverClassesFromSourcesJar( artifact, request, "test-sources" ) );
+            }
+            else
+            {
+                javaClassesMap.putAll( discoverClassesFromSourcesJar( artifact, request, "sources" ) );
+            }
+
+        }
+
         for ( MavenProject mavenProject : mavenProjects )
         {
             javaClassesMap.putAll( discoverClasses( request.getEncoding(), mavenProject ) );
@@ -120,8 +167,57 @@ public class JavaAnnotationsMojoDescript
 
         populateDataFromJavadoc( mojoAnnotatedClasses, javaClassesMap );
 
-        return toMojoDescriptors( mojoAnnotatedClasses, request );
+        return toMojoDescriptors( mojoAnnotatedClasses, request, javaClassesMap );
+
+    }
+
+
+    protected Map<String, JavaClass> discoverClassesFromSourcesJar( Artifact artifact, PluginToolsRequest request,
+                                                                    String classifier )
+        throws ExtractionException
+    {
+        try
+        {
+            Artifact sourcesArtifact =
+                artifactFactory.createArtifactWithClassifier( artifact.getGroupId(), artifact.getArtifactId(),
+                                                              artifact.getVersion(), artifact.getType(), classifier );
+
+            artifactResolver.resolve( sourcesArtifact, request.getRemoteRepos(), request.getLocal() );
+            if ( sourcesArtifact.getFile() != null && sourcesArtifact.getFile().exists() )
+            {
+                File extractDirectory = new File( request.getProject().getBuild().getDirectory(),
+                                                  "maven-plugin-plugin-sources/" + sourcesArtifact.getGroupId() + "/"
+                                                      + sourcesArtifact.getArtifactId() + "/"
+                                                      + sourcesArtifact.getVersion() + "/"
+                                                      + sourcesArtifact.getClassifier() );
+                if ( !extractDirectory.exists() )
+                {
+                    extractDirectory.mkdirs();
+                }
+                // extract sources in a directory
+                //target/maven-plugin-plugin/${groupId}/${artifact}/sources
+                UnArchiver unArchiver = archiverManager.getUnArchiver( "jar" );
+                unArchiver.setSourceFile( sourcesArtifact.getFile() );
+                unArchiver.setDestDirectory( extractDirectory );
+                unArchiver.extract();
 
+                return discoverClasses( request.getEncoding(), Arrays.asList( extractDirectory ) );
+            }
+        }
+        catch ( ArtifactResolutionException e )
+        {
+            throw new ExtractionException( e.getMessage(), e );
+        }
+        catch ( ArtifactNotFoundException e )
+        {
+            //throw new ExtractionException( e.getMessage(), e );
+            getLogger().debug( "skip ArtifactNotFoundException:" + e.getMessage() );
+        }
+        catch ( NoSuchArchiverException e )
+        {
+            throw new ExtractionException( e.getMessage(), e );
+        }
+        return Collections.emptyMap();
     }
 
     /**
@@ -155,8 +251,13 @@ public class JavaAnnotationsMojoDescript
                         mojoAnnotationContent.setDeprecated( deprecated.getValue() );
                     }
                 }
-                Map<String, JavaField> fieldsMap = extractFieldParameterTags( javaClass );
-                for ( Map.Entry<String, ParameterAnnotationContent> parameter : entry.getValue().getParameters().entrySet() )
+                Map<String, JavaField> fieldsMap =
+                    extractFieldParameterTags( javaClass, javaClassesMap, mojoAnnotatedClasses );
+                Map<String, ParameterAnnotationContent> parameters =
+                    getParametersParentHierarchy( entry.getValue(), new HashMap<String, ParameterAnnotationContent>(),
+                                                  mojoAnnotatedClasses );
+                for ( Map.Entry<String, ParameterAnnotationContent> parameter : new TreeMap<String, ParameterAnnotationContent>(
+                    parameters ).entrySet() )
                 {
                     JavaField javaField = fieldsMap.get( parameter.getKey() );
                     if ( javaField != null )
@@ -206,7 +307,7 @@ public class JavaAnnotationsMojoDescript
      * @param tagName   not null
      * @return docletTag instance
      */
-    private static DocletTag findInClassHierarchy( JavaClass javaClass, String tagName )
+    private DocletTag findInClassHierarchy( JavaClass javaClass, String tagName )
     {
         DocletTag tag = javaClass.getTagByName( tagName );
 
@@ -229,9 +330,11 @@ public class JavaAnnotationsMojoDescript
      * @param javaClass not null
      * @return map with Mojo parameters names as keys
      */
-    private Map<String, JavaField> extractFieldParameterTags( JavaClass javaClass )
+    private Map<String, JavaField> extractFieldParameterTags( JavaClass javaClass,
+                                                              Map<String, JavaClass> javaClassesMap,
+                                                              Map<String, MojoAnnotatedClass> mojoAnnotatedClasses )
     {
-        Map<String, JavaField> rawParams;
+        Map<String, JavaField> rawParams = new TreeMap<String, com.thoughtworks.qdox.model.JavaField>();
 
         // we have to add the parent fields first, so that they will be overwritten by the local fields if
         // that actually happens...
@@ -239,10 +342,20 @@ public class JavaAnnotationsMojoDescript
 
         if ( superClass != null )
         {
-            rawParams = extractFieldParameterTags( superClass );
+            if ( superClass.getFields().length > 0 )
+            {
+                rawParams = extractFieldParameterTags( superClass, javaClassesMap, mojoAnnotatedClasses );
+            }
+            // maybe sources comes from scan of sources artifact
+            superClass = javaClassesMap.get( superClass.getFullyQualifiedName() );
+            if ( superClass != null )
+            {
+                rawParams = extractFieldParameterTags( superClass, javaClassesMap, mojoAnnotatedClasses );
+            }
         }
         else
         {
+
             rawParams = new TreeMap<String, JavaField>();
         }
 
@@ -265,12 +378,11 @@ public class JavaAnnotationsMojoDescript
 
     protected Map<String, JavaClass> discoverClasses( final String encoding, final MavenProject project )
     {
-        JavaDocBuilder builder = new JavaDocBuilder();
-        builder.setEncoding( encoding );
+        List<File> sources = new ArrayList<File>();
 
         for ( String source : (List<String>) project.getCompileSourceRoots() )
         {
-            builder.addSourceTree( new File( source ) );
+            sources.add( new File( source ) );
         }
 
         // TODO be more dynamic
@@ -278,7 +390,20 @@ public class JavaAnnotationsMojoDescript
         if ( !project.getCompileSourceRoots().contains( generatedPlugin.getAbsolutePath() )
             && generatedPlugin.exists() )
         {
-            builder.addSourceTree( generatedPlugin );
+            sources.add( generatedPlugin );
+        }
+
+        return discoverClasses( encoding, sources );
+    }
+
+    protected Map<String, JavaClass> discoverClasses( final String encoding, List<File> sourceDirectories )
+    {
+        JavaDocBuilder builder = new JavaDocBuilder();
+        builder.setEncoding( encoding );
+
+        for ( File source : sourceDirectories )
+        {
+            builder.addSourceTree( source );
         }
 
         JavaClass[] javaClasses = builder.getClasses();
@@ -298,9 +423,8 @@ public class JavaAnnotationsMojoDescript
         return javaClassMap;
     }
 
-
     private List<MojoDescriptor> toMojoDescriptors( Map<String, MojoAnnotatedClass> mojoAnnotatedClasses,
-                                                    PluginToolsRequest request )
+                                                    PluginToolsRequest request, Map<String, JavaClass> javaClassesMap )
         throws DuplicateParameterException
     {
         List<MojoDescriptor> mojoDescriptors = new ArrayList<MojoDescriptor>( mojoAnnotatedClasses.size() );
@@ -367,6 +491,7 @@ public class JavaAnnotationsMojoDescript
                 parameter.setEditable( !parameterAnnotationContent.readonly() );
                 parameter.setExpression( parameterAnnotationContent.expression() );
                 parameter.setType( parameterAnnotationContent.getClassName() );
+                parameter.setSince( parameterAnnotationContent.getSince() );
                 parameter.setRequired( parameterAnnotationContent.required() );
 
                 mojoDescriptor.addParameter( parameter );
@@ -385,7 +510,8 @@ public class JavaAnnotationsMojoDescript
                 parameter.setRequirement(
                     new Requirement( componentAnnotationContent.role(), componentAnnotationContent.roleHint() ) );
                 parameter.setEditable( false );
-
+                parameter.setDeprecated( componentAnnotationContent.getDeprecated() );
+                parameter.setSince( componentAnnotationContent.getSince() );
                 mojoDescriptor.addParameter( parameter );
             }
 

Modified: maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-tools-annotations/src/main/resources/META-INF/plexus/components.xml
URL: http://svn.apache.org/viewvc/maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-tools-annotations/src/main/resources/META-INF/plexus/components.xml?rev=1336291&r1=1336290&r2=1336291&view=diff
==============================================================================
--- maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-tools-annotations/src/main/resources/META-INF/plexus/components.xml (original)
+++ maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-tools-annotations/src/main/resources/META-INF/plexus/components.xml Wed May  9 16:45:26 2012
@@ -35,6 +35,18 @@
           <role>org.apache.maven.tools.plugin.annotations.scanner.MojoAnnotationsScanner</role>
           <role-hint>default</role-hint>
         </requirement>
+        <requirement>
+          <role>org.apache.maven.artifact.resolver.ArtifactResolver</role>
+          <role-hint>default</role-hint>
+        </requirement>
+        <requirement>
+          <role>org.apache.maven.artifact.factory.ArtifactFactory</role>
+          <role-hint>default</role-hint>
+        </requirement>
+        <requirement>
+          <role>org.codehaus.plexus.archiver.manager.ArchiverManager</role>
+          <role-hint>default</role-hint>
+        </requirement>
       </requirements>
     </component>
 

Modified: maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-tools-annotations/src/test/java/org/apache/maven/tools/plugin/annotations/FooMojo.java
URL: http://svn.apache.org/viewvc/maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-tools-annotations/src/test/java/org/apache/maven/tools/plugin/annotations/FooMojo.java?rev=1336291&r1=1336290&r2=1336291&view=diff
==============================================================================
--- maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-tools-annotations/src/test/java/org/apache/maven/tools/plugin/annotations/FooMojo.java (original)
+++ maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-tools-annotations/src/test/java/org/apache/maven/tools/plugin/annotations/FooMojo.java Wed May  9 16:45:26 2012
@@ -40,7 +40,6 @@ public class FooMojo
     /**
      * the cool bar to go
      * @since 1.0
-     *
      */
     @Parameter( expression = "${thebar}", required = true, defaultValue = "coolbar" )
     protected String bar;

Modified: maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-tools-api/src/main/java/org/apache/maven/tools/plugin/DefaultPluginToolsRequest.java
URL: http://svn.apache.org/viewvc/maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-tools-api/src/main/java/org/apache/maven/tools/plugin/DefaultPluginToolsRequest.java?rev=1336291&r1=1336290&r2=1336291&view=diff
==============================================================================
--- maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-tools-api/src/main/java/org/apache/maven/tools/plugin/DefaultPluginToolsRequest.java (original)
+++ maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-tools-api/src/main/java/org/apache/maven/tools/plugin/DefaultPluginToolsRequest.java Wed May  9 16:45:26 2012
@@ -20,6 +20,7 @@ package org.apache.maven.tools.plugin;
  */
 
 import org.apache.maven.artifact.Artifact;
+import org.apache.maven.artifact.repository.ArtifactRepository;
 import org.apache.maven.plugin.descriptor.MojoDescriptor;
 import org.apache.maven.plugin.descriptor.PluginDescriptor;
 import org.apache.maven.project.MavenProject;
@@ -27,6 +28,7 @@ import org.codehaus.plexus.util.ReaderFa
 import org.codehaus.plexus.util.StringUtils;
 
 import java.util.HashSet;
+import java.util.List;
 import java.util.Set;
 
 /**
@@ -52,6 +54,10 @@ public class DefaultPluginToolsRequest
 
     private Set<Artifact> dependencies;
 
+    private List<ArtifactRepository> remoteRepos;
+
+    private ArtifactRepository local;
+
     public DefaultPluginToolsRequest( MavenProject project, PluginDescriptor pluginDescriptor )
     {
         this.project = project;
@@ -148,4 +154,26 @@ public class DefaultPluginToolsRequest
         this.dependencies = dependencies;
         return this;
     }
+
+    public List<ArtifactRepository> getRemoteRepos()
+    {
+        return remoteRepos;
+    }
+
+    public PluginToolsRequest setRemoteRepos( List<ArtifactRepository> remoteRepos )
+    {
+        this.remoteRepos = remoteRepos;
+        return this;
+    }
+
+    public ArtifactRepository getLocal()
+    {
+        return local;
+    }
+
+    public PluginToolsRequest setLocal( ArtifactRepository local )
+    {
+        this.local = local;
+        return this;
+    }
 }

Modified: maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-tools-api/src/main/java/org/apache/maven/tools/plugin/PluginToolsRequest.java
URL: http://svn.apache.org/viewvc/maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-tools-api/src/main/java/org/apache/maven/tools/plugin/PluginToolsRequest.java?rev=1336291&r1=1336290&r2=1336291&view=diff
==============================================================================
--- maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-tools-api/src/main/java/org/apache/maven/tools/plugin/PluginToolsRequest.java (original)
+++ maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-tools-api/src/main/java/org/apache/maven/tools/plugin/PluginToolsRequest.java Wed May  9 16:45:26 2012
@@ -20,10 +20,12 @@ package org.apache.maven.tools.plugin;
  */
 
 import org.apache.maven.artifact.Artifact;
+import org.apache.maven.artifact.repository.ArtifactRepository;
 import org.apache.maven.plugin.descriptor.MojoDescriptor;
 import org.apache.maven.plugin.descriptor.PluginDescriptor;
 import org.apache.maven.project.MavenProject;
 
+import java.util.List;
 import java.util.Set;
 
 /**
@@ -90,16 +92,47 @@ public interface PluginToolsRequest
 
     /**
      * Returns the list of {@link Artifact} used in class path scanning for annotations
+     *
      * @return
      * @since 3.0
      */
     Set<Artifact> getDependencies();
 
     /**
-     *
      * @param dependencies
      * @return
+     * @since 3.0
      */
     PluginToolsRequest setDependencies( Set<Artifact> dependencies );
 
+    /**
+     *
+     * @return
+     * @since 3.0
+     */
+    List<ArtifactRepository> getRemoteRepos();
+
+    /**
+     *
+     * @param remoteRepos
+     * @return
+     * @since 3.0
+     */
+    PluginToolsRequest setRemoteRepos( List<ArtifactRepository> remoteRepos );
+
+    /**
+     *
+     * @return
+     * @since 3.0
+     */
+    ArtifactRepository getLocal();
+
+    /**
+     *
+     * @param local
+     * @return
+     * @since 3.0
+     */
+    PluginToolsRequest setLocal( ArtifactRepository local );
+
 }

Modified: maven/plugin-tools/branches/MPLUGIN-189/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugin-tools/branches/MPLUGIN-189/pom.xml?rev=1336291&r1=1336290&r2=1336291&view=diff
==============================================================================
--- maven/plugin-tools/branches/MPLUGIN-189/pom.xml (original)
+++ maven/plugin-tools/branches/MPLUGIN-189/pom.xml Wed May  9 16:45:26 2012
@@ -228,6 +228,11 @@
         <artifactId>plexus-container-default</artifactId>
         <version>1.0-alpha-9-stable-1</version>
       </dependency>
+      <dependency>
+        <groupId>org.codehaus.plexus</groupId>
+        <artifactId>plexus-archiver</artifactId>
+        <version>2.1.1</version>
+      </dependency>
 
       <dependency>
         <groupId>com.thoughtworks.qdox</groupId>