Hervé,

My intention was to have exactly the same component-descriptor, which included the description. It seems like the javadoc is not parsed, only the description-attribute of the annotation is used. IMO having the same description in both javadoc and annotation-attribute is even worse.

I don't mind moving the description back to the javadoc, I have no idea where the description in the component-descriptor is used.

-Robert

Op Thu, 25 Oct 2012 00:01:24 +0200 schreef Hervé BOUTEMY <[email protected]>:

 /**
- * Class intended to be used by clients who wish to invoke a forked Maven
process from their applications - *
  * @author jdcasey
- * @plexus.component role="org.apache.maven.shared.invoker.Invoker"
role-hint="default" */
+@Component( role = Invoker.class, hint = "default", description="Class
intended to be used by clients who wish to invoke a forked Maven process
from their applications" ) public class DefaultInvoker

ouch, that's the first time I see description removed from javadoc and defined
only in java 5 annotation

I didn't now it was feasible

even if it is feasible, I would expect to use javadoc, and only override in the annotation when necessary (I don't see which scenario would require such a
difference between javadoc and Plexus component description)

was this intentional?

Regards,

Hervé

Le mercredi 24 octobre 2012 21:30:26 [email protected] a écrit :
Author: rfscholte
Date: Wed Oct 24 21:30:25 2012
New Revision: 1401895

URL: http://svn.apache.org/viewvc?rev=1401895&view=rev
Log:
[MSHARED-254] Use plexus annotations to generate components descriptor

Modified:
    maven/shared/trunk/maven-invoker/pom.xml

maven/shared/trunk/maven-invoker/src/main/java/org/apache/maven/shared/invo
ker/DefaultInvoker.java

Modified: maven/shared/trunk/maven-invoker/pom.xml
URL:
http://svn.apache.org/viewvc/maven/shared/trunk/maven-invoker/pom.xml?rev=1
401895&r1=1401894&r2=1401895&view=diff
===========================================================================
=== --- maven/shared/trunk/maven-invoker/pom.xml (original)
+++ maven/shared/trunk/maven-invoker/pom.xml Wed Oct 24 21:30:25 2012
@@ -65,6 +65,12 @@ under the License.
     </dependency>
      -->
     <dependency>
+      <groupId>org.codehaus.plexus</groupId>
+      <artifactId>plexus-component-annotations</artifactId>
+      <version>1.5.5</version>
+ <scope>provided</scope> <!-- only required to generate components.xml
--> +    </dependency>
+    <dependency>
       <groupId>junit</groupId>
       <artifactId>junit</artifactId>
       <version>3.8.2</version>

Modified:
maven/shared/trunk/maven-invoker/src/main/java/org/apache/maven/shared/invo
ker/DefaultInvoker.java URL:
http://svn.apache.org/viewvc/maven/shared/trunk/maven-invoker/src/main/java
/org/apache/maven/shared/invoker/DefaultInvoker.java?rev=1401895&r1=1401894&
r2=1401895&view=diff
===========================================================================
=== ---
maven/shared/trunk/maven-invoker/src/main/java/org/apache/maven/shared/invo
ker/DefaultInvoker.java (original) +++
maven/shared/trunk/maven-invoker/src/main/java/org/apache/maven/shared/invo
ker/DefaultInvoker.java Wed Oct 24 21:30:25 2012 @@ -22,16 +22,15 @@ package
org.apache.maven.shared.invoker;
 import java.io.File;
 import java.io.InputStream;

+import org.codehaus.plexus.component.annotations.Component;
 import org.codehaus.plexus.util.cli.CommandLineException;
 import org.codehaus.plexus.util.cli.CommandLineUtils;
 import org.codehaus.plexus.util.cli.Commandline;

 /**
- * Class intended to be used by clients who wish to invoke a forked Maven
process from their applications - *
  * @author jdcasey
- * @plexus.component role="org.apache.maven.shared.invoker.Invoker"
role-hint="default" */
+@Component( role = Invoker.class, hint = "default", description="Class
intended to be used by clients who wish to invoke a forked Maven process
from their applications" ) public class DefaultInvoker
     implements Invoker
 {

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to