You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Julian Wood <wo...@ucalgary.ca> on 2005/10/24 23:00:56 UTC

[m2] javadoc failing

Javadoc creation is failing for me, simply because the javadoc  
command is being invoked incorrectly. It would appear that it has  
something to do with the way plexus is locating commands, but I'm not  
sure.

Embedded error: An error has occurred in javadoc report generation.
/System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/../ 
bin/javadoc: not found
...
Caused by: java.io.IOException: /System/Library/Frameworks/ 
JavaVM.framework/Versions/1.4.2/Home/../bin/javadoc: not found
         at java.lang.UNIXProcess.forkAndExec(Native Method)
         at java.lang.UNIXProcess.<init>(UNIXProcess.java:54)
         at java.lang.Runtime.execInternal(Native Method)
         at java.lang.Runtime.exec(Runtime.java:566)
         at org.codehaus.plexus.util.cli.Commandline.execute 
(Commandline.java:674)

It should be coming up with

/System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/bin/ 
javadoc

or even

/usr/bin/javadoc

since that's what my JAVA_HOME env var is defined as.

Is there a setting I'm missing somewhere? Curiously, other  
invocations of java tools (ie javac) are invoked properly. This has  
been the same from m2a3 up to the current mvn2 release.

Thanks,

J


--
Julian Wood <wo...@ucalgary.ca>

Programmer/Analyst
University of Calgary

http://commons.ucalgary.ca


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


Re: [m2]How to add additional sources to javadoc?

Posted by Brett Porter <br...@gmail.com>.
Ok, that's an issue in the xmlbeans plugin that should be reported.

On 11/1/05, Peter Lynch <pe...@pub.missioncap.ca> wrote:
> ohhh.... the trick is it will only work if the xmlbeans plugin detects
> there are new sources to generate. In other words
>
> mvn clean generate-sources javadoc:javadoc
>      ^^^^^
>
> -Peter
>
> Peter Lynch wrote:
> > Doesn't work for me. Is there some specific pom setting I need?
> >
> > The javadoc plugin just produces a lone target/javadoc/apidocs/index.html
> >
> > Also, which implementation has the limitation - maven, javadoc plugin or
> > xmlbeans plugin or something else?
> >
> > -Peter
> >
> > Brett Porter wrote:
> >
> >> THis is a limitation in the current implementation, but you can work
> >> around it by running:
> >>
> >> m2 generate-sources javadoc:javadoc
> >>
> >> On 10/27/05, Peter Lynch <pe...@pub.missioncap.ca> wrote:
> >>
> > [snip]
> >
> >
> > ---------------------------------------------------------------------
> > 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
>
>

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


Re: [m2]How to add additional sources to javadoc?

Posted by Peter Lynch <pe...@pub.missioncap.ca>.
ohhh.... the trick is it will only work if the xmlbeans plugin detects 
there are new sources to generate. In other words

mvn clean generate-sources javadoc:javadoc
     ^^^^^

-Peter

Peter Lynch wrote:
> Doesn't work for me. Is there some specific pom setting I need?
> 
> The javadoc plugin just produces a lone target/javadoc/apidocs/index.html
> 
> Also, which implementation has the limitation - maven, javadoc plugin or
> xmlbeans plugin or something else?
> 
> -Peter
> 
> Brett Porter wrote:
> 
>> THis is a limitation in the current implementation, but you can work
>> around it by running:
>>
>> m2 generate-sources javadoc:javadoc
>>
>> On 10/27/05, Peter Lynch <pe...@pub.missioncap.ca> wrote:
>>
> [snip]
> 
> 
> ---------------------------------------------------------------------
> 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


Re: [m2]How to add additional sources to javadoc?

Posted by Peter Lynch <pe...@pub.missioncap.ca>.
Doesn't work for me. Is there some specific pom setting I need?

The javadoc plugin just produces a lone target/javadoc/apidocs/index.html

Also, which implementation has the limitation - maven, javadoc plugin or
xmlbeans plugin or something else?

-Peter

Brett Porter wrote:
> THis is a limitation in the current implementation, but you can work
> around it by running:
> 
> m2 generate-sources javadoc:javadoc
> 
> On 10/27/05, Peter Lynch <pe...@pub.missioncap.ca> wrote:
> 
[snip]


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


Re: [m2]How to add additional sources to javadoc?

Posted by Brett Porter <br...@gmail.com>.
THis is a limitation in the current implementation, but you can work
around it by running:

m2 generate-sources javadoc:javadoc

On 10/27/05, Peter Lynch <pe...@pub.missioncap.ca> wrote:
> I used the xmlbeans plugin to generate xmltypes from an xsd. The
> resulting sources are located in ./target/xmlbeans-source.
>
> Now I wish to generate javadoc for these sources. Typing mvn
> javadoc:javadoc does not create the javadoc for those sources. It
> appears somehow I need to add to the Maven project's compileSourceRoots
> as I see this in the javadoc plugin:
>
> StringBuffer sourcePath = new StringBuffer();
>          StringBuffer files = new StringBuffer();
>          for ( Iterator i =
> getProject().getCompileSourceRoots().iterator(); i.hasNext(); )
>          {
>              String sourceDirectory = (String) i.next();
>              String[] fileList = FileUtils.getFilesFromExtension(
> sourceDirectory, new String[]{"java"} );
>              if ( fileList != null && fileList.length != 0 )
>              {
>                  for ( int j = 0; j < fileList.length; j++ )
>                  {
>                      files.append( quotedPathArgument( fileList[j] ) );
>                      files.append( "\n" );
>                  }
>              }
>
>              sourcePath.append( sourceDirectory );
>
>              if ( i.hasNext() )
>              {
>                  sourcePath.append( PATH_SEPARATOR );
>              }
>          }
>
> Question: How do I add the xmlbeans-source directory to the source roots
> so that javadoc plugin picks them up??
>
> Thanks,
>
> Peter
>
> ---------------------------------------------------------------------
> 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


[m2]How to add additional sources to javadoc?

Posted by Peter Lynch <pe...@pub.missioncap.ca>.
I used the xmlbeans plugin to generate xmltypes from an xsd. The 
resulting sources are located in ./target/xmlbeans-source.

Now I wish to generate javadoc for these sources. Typing mvn 
javadoc:javadoc does not create the javadoc for those sources. It 
appears somehow I need to add to the Maven project's compileSourceRoots 
as I see this in the javadoc plugin:

StringBuffer sourcePath = new StringBuffer();
         StringBuffer files = new StringBuffer();
         for ( Iterator i = 
getProject().getCompileSourceRoots().iterator(); i.hasNext(); )
         {
             String sourceDirectory = (String) i.next();
             String[] fileList = FileUtils.getFilesFromExtension( 
sourceDirectory, new String[]{"java"} );
             if ( fileList != null && fileList.length != 0 )
             {
                 for ( int j = 0; j < fileList.length; j++ )
                 {
                     files.append( quotedPathArgument( fileList[j] ) );
                     files.append( "\n" );
                 }
             }

             sourcePath.append( sourceDirectory );

             if ( i.hasNext() )
             {
                 sourcePath.append( PATH_SEPARATOR );
             }
         }

Question: How do I add the xmlbeans-source directory to the source roots 
so that javadoc plugin picks them up??

Thanks,

Peter

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


Re: [m2] javadoc failing

Posted by Brett Porter <br...@gmail.com>.
Maven 2.0 stopped updating automatically as we felt that was a bit sneaky.

You can run with -U at any time to check for updates. We will soon
have a plugin goal that will check for updates across the board.

You can also configure to get updates on a particular interval by
changing repository configuration in settings. However, currently
there is no way to selectively install updates - once checked, all new
ones are obtained.

- Brett

On 10/24/05, Julian Wood <wo...@ucalgary.ca> wrote:
> Hmm, installing the latest javadoc plugin from svn into my local
> repository solves the problem. I had beta-1, and I installed beta-3.
> I wonder why this didn't happen automatically. Other plugins appear
> to update automatically.
>
> Thanks,
>
> J
>
> On 24-Oct-05, at 3:00 PM, Julian Wood wrote:
>
> > Javadoc creation is failing for me, simply because the javadoc
> > command is being invoked incorrectly. It would appear that it has
> > something to do with the way plexus is locating commands, but I'm
> > not sure.
> >
> > Embedded error: An error has occurred in javadoc report generation.
> > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/../
> > bin/javadoc: not found
> > ...
> > Caused by: java.io.IOException: /System/Library/Frameworks/
> > JavaVM.framework/Versions/1.4.2/Home/../bin/javadoc: not found
> >         at java.lang.UNIXProcess.forkAndExec(Native Method)
> >         at java.lang.UNIXProcess.<init>(UNIXProcess.java:54)
> >         at java.lang.Runtime.execInternal(Native Method)
> >         at java.lang.Runtime.exec(Runtime.java:566)
> >         at org.codehaus.plexus.util.cli.Commandline.execute
> > (Commandline.java:674)
> >
> > It should be coming up with
> >
> > /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/bin/
> > javadoc
> >
> > or even
> >
> > /usr/bin/javadoc
> >
> > since that's what my JAVA_HOME env var is defined as.
> >
> > Is there a setting I'm missing somewhere? Curiously, other
> > invocations of java tools (ie javac) are invoked properly. This has
> > been the same from m2a3 up to the current mvn2 release.
> >
> > Thanks,
> >
> > J
> >
> >
> > --
> > Julian Wood <wo...@ucalgary.ca>
> >
> > Programmer/Analyst
> > University of Calgary
> >
> > http://commons.ucalgary.ca
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
> >
>
> --
> Julian Wood <wo...@ucalgary.ca>
>
> Programmer/Analyst
> University of Calgary
>
> http://commons.ucalgary.ca
>
>
> ---------------------------------------------------------------------
> 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


Re: [m2] javadoc failing

Posted by Julian Wood <wo...@ucalgary.ca>.
Hmm, installing the latest javadoc plugin from svn into my local  
repository solves the problem. I had beta-1, and I installed beta-3.  
I wonder why this didn't happen automatically. Other plugins appear  
to update automatically.

Thanks,

J

On 24-Oct-05, at 3:00 PM, Julian Wood wrote:

> Javadoc creation is failing for me, simply because the javadoc  
> command is being invoked incorrectly. It would appear that it has  
> something to do with the way plexus is locating commands, but I'm  
> not sure.
>
> Embedded error: An error has occurred in javadoc report generation.
> /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/../ 
> bin/javadoc: not found
> ...
> Caused by: java.io.IOException: /System/Library/Frameworks/ 
> JavaVM.framework/Versions/1.4.2/Home/../bin/javadoc: not found
>         at java.lang.UNIXProcess.forkAndExec(Native Method)
>         at java.lang.UNIXProcess.<init>(UNIXProcess.java:54)
>         at java.lang.Runtime.execInternal(Native Method)
>         at java.lang.Runtime.exec(Runtime.java:566)
>         at org.codehaus.plexus.util.cli.Commandline.execute 
> (Commandline.java:674)
>
> It should be coming up with
>
> /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/bin/ 
> javadoc
>
> or even
>
> /usr/bin/javadoc
>
> since that's what my JAVA_HOME env var is defined as.
>
> Is there a setting I'm missing somewhere? Curiously, other  
> invocations of java tools (ie javac) are invoked properly. This has  
> been the same from m2a3 up to the current mvn2 release.
>
> Thanks,
>
> J
>
>
> --
> Julian Wood <wo...@ucalgary.ca>
>
> Programmer/Analyst
> University of Calgary
>
> http://commons.ucalgary.ca
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

--
Julian Wood <wo...@ucalgary.ca>

Programmer/Analyst
University of Calgary

http://commons.ucalgary.ca


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