You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by "Pilgrim, Peter" <pe...@csfb.com> on 2005/11/16 11:26:15 UTC

[m2] Howto Hack JavadocReport.java

Hi

I have got the source code for maven 2 now, and I am trying to debug the -group property 
of the maven-javadoc-plugin.

I understand to compile the plugin, I ran ``mvn install'' from 
C:\Projects\maven-site\maven-plugins\maven-javadoc-plugin

WHen I tried to run the mvn javadoc:javadoc I still get the error 
because of the group XML element.

           <group>
               Unit Tests, com.csfb.foo.test*:com.csfb.bar.test*
           </group>

I dont know the correct syntax. How do I hack ``JavadocReport.java''
to find out what is going on?

            addArgIfNotEmpty( arguments, "-taglet", quotedArgument( taglet ), 1.4f );
            addArgIfNotEmpty( arguments, "-tagletpath", quotedPathArgument( tagletpath ), 1.4f );
            addArgIf( arguments, use, "-use" );
            addArgIf( arguments, version, "-version" );
            addArgIfNotEmpty( arguments, "-windowtitle", quotedArgument( windowtitle ) );
        }
	System.out.println("JAVADOC PLUGIN options are "+arguments.toString() );


1 error
[INFO] -------------------------------------------------------------------------
---
[ERROR] BUILD ERROR
[INFO] -------------------------------------------------------------------------
---
[INFO] An error has occurred in JavaDocs report generation.

Embedded error: Exit code: 1 - javadoc: Illegal package name: "C:/Projects/bridg
etown/core/target/javadoc/apidocs/stylesheet.css"

[INFO] -------------------------------------------------------------------------
---
[DEBUG] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: An error has occurred in
 JavaDocs report generation.
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa
ultLifecycleExecutor.java:544)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandalone
Goal(DefaultLifecycleExecutor.java:482)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(Defau
ltLifecycleExecutor.java:452)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHan

--
Peter Pilgrim :: J2EE Software Development
Operations/IT - Credit Suisse First Boston, 
Floor 15, 5 Canada Square, London E14 4QJ, United Kingdom
Tel: +44-(0)207-883-4497


==============================================================================
Please access the attached hyperlink for an important electronic communications disclaimer: 

http://www.csfb.com/legal_terms/disclaimer_external_email.shtml

==============================================================================


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


RE: [m2] Howto Hack JavadocReport.java

Posted by Vincent Siveton <vi...@gmail.com>.
Hi Peter,

The best way is to uncomment the following line:
optionsFile.deleteOnExit();
So you will know exactly the command line.

BTW, here is a patch.

--- src/main/java/org/apache/maven/plugin/javadoc/JavadocReport.java
(révision 344975)
+++ src/main/java/org/apache/maven/plugin/javadoc/JavadocReport.java
(copie de travail)
@@ -822,7 +822,7 @@
             addArgIfNotEmpty( arguments, "-doctitle", quotedArgument(
doctitle ) );
             addArgIfNotEmpty( arguments, "-excludedocfilessubdir",
quotedPathArgument( excludedocfilessubdir ), 1.4f );
             addArgIfNotEmpty( arguments, "-footer", quotedArgument( footer
) );
-            addArgIfNotEmpty( arguments, "-group", quotedArgument( group ),
true );
+            addArgIfNotEmpty( arguments, "-group", group, true );
             addArgIfNotEmpty( arguments, "-header", quotedArgument( header
) );
             addArgIfNotEmpty( arguments, "-helpfile", quotedPathArgument(
helpfile ) );

You could test it with the test project:
maven-javadoc-plugin\src\test\projects\javadoc-plugin-test1

You need to add quote on your group element, eg:
<group>"Unit Tests" "com.csfb.foo.test*:com.csfb.bar.test*"</group>

I think it is a regression bug. What is the JIRA issue id?

Cheers,

Vincent


> -----Original Message-----
> From: Pilgrim, Peter [mailto:peter.pilgrim@csfb.com]
> Sent: Wednesday, November 16, 2005 5:26 AM
> To: Maven Users List (E-mail)
> Subject: [m2] Howto Hack JavadocReport.java
> 
> 
> Hi
> 
> I have got the source code for maven 2 now, and I am trying to debug the -
> group property
> of the maven-javadoc-plugin.
> 
> I understand to compile the plugin, I ran ``mvn install'' from
> C:\Projects\maven-site\maven-plugins\maven-javadoc-plugin
> 
> WHen I tried to run the mvn javadoc:javadoc I still get the error
> because of the group XML element.
> 
>            <group>
>                Unit Tests, com.csfb.foo.test*:com.csfb.bar.test*
>            </group>
> 
> I dont know the correct syntax. How do I hack ``JavadocReport.java''
> to find out what is going on?
> 
>             addArgIfNotEmpty( arguments, "-taglet", quotedArgument( taglet
> ), 1.4f );
>             addArgIfNotEmpty( arguments, "-tagletpath",
> quotedPathArgument( tagletpath ), 1.4f );
>             addArgIf( arguments, use, "-use" );
>             addArgIf( arguments, version, "-version" );
>             addArgIfNotEmpty( arguments, "-windowtitle", quotedArgument(
> windowtitle ) );
>         }
> 	System.out.println("JAVADOC PLUGIN options are
> "+arguments.toString() );
> 
> 
> 1 error
> [INFO] -------------------------------------------------------------------
> ------
> ---
> [ERROR] BUILD ERROR
> [INFO] -------------------------------------------------------------------
> ------
> ---
> [INFO] An error has occurred in JavaDocs report generation.
> 
> Embedded error: Exit code: 1 - javadoc: Illegal package name:
> "C:/Projects/bridg
> etown/core/target/javadoc/apidocs/stylesheet.css"
> 
> [INFO] -------------------------------------------------------------------
> ------
> ---
> [DEBUG] Trace
> org.apache.maven.lifecycle.LifecycleExecutionException: An error has
> occurred in
>  JavaDocs report generation.
>         at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa
> ultLifecycleExecutor.java:544)
>         at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandalone
> Goal(DefaultLifecycleExecutor.java:482)
>         at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(Defau
> ltLifecycleExecutor.java:452)
>         at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHan
> 
> --
> Peter Pilgrim :: J2EE Software Development
> Operations/IT - Credit Suisse First Boston,
> Floor 15, 5 Canada Square, London E14 4QJ, United Kingdom
> Tel: +44-(0)207-883-4497
> 
> 
> ==========================================================================
> ====
> Please access the attached hyperlink for an important electronic
> communications disclaimer:
> 
> http://www.csfb.com/legal_terms/disclaimer_external_email.shtml
> 
> ==========================================================================
> ====
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org


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