vijaygarry / doclava

Automatically exported from code.google.com/p/doclava
Apache License 2.0
0 stars 0 forks source link

Even if Java target version is 1.5, Doclava is not fully 1.5 compatible #29

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. using Maven, import Doclava in a project compiled with Java1.5
2. generate javadoc

What is the expected output? What do you see instead?

$ mvn -version
Apache Maven 3.0.1 (r1038046; 2010-11-23 11:58:32+0100)
Java version: 1.5.0_24
Java home: /System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Home
Default locale: en_US, platform encoding: MacRoman
OS name: "mac os x" version: "10.6.4" arch: "i386" Family: "unix"

...

[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 19.303s
[INFO] Finished at: Sat Dec 04 22:13:24 CET 2010
[INFO] Final Memory: 16M/1016M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal 
org.apache.maven.plugins:maven-javadoc-plugin:2.7:jar (attach-javadocs) on 
project mybatis-guice: MavenReportException: Error while creating archive:
[ERROR] Exit code: 1 - javadoc: error - In doclet class 
com.google.doclava.Doclava,  method start has thrown an exception 
java.lang.reflect.InvocationTargetException
[ERROR] java.lang.NoSuchMethodError: java.lang.String.isEmpty()Z
[ERROR] at com.google.doclava.PackageInfo.<init>(PackageInfo.java:37)
[ERROR] at 
com.google.doclava.ProjectBuilder.obtainPackage(ProjectBuilder.java:385)
[ERROR] at com.google.doclava.ProjectBuilder.initClass(ProjectBuilder.java:157)
[ERROR] at com.google.doclava.ProjectBuilder.build(ProjectBuilder.java:70)
[ERROR] at com.google.doclava.Doclava.start(Doclava.java:246)
[ERROR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[ERROR] at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
[ERROR] at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.jav
a:25)
[ERROR] at java.lang.reflect.Method.invoke(Method.java:592)
[ERROR] at com.sun.tools.javadoc.DocletInvoker.invoke(DocletInvoker.java:269)
[ERROR] at com.sun.tools.javadoc.DocletInvoker.start(DocletInvoker.java:143)
[ERROR] at com.sun.tools.javadoc.Start.parseAndExecute(Start.java:340)
[ERROR] at com.sun.tools.javadoc.Start.begin(Start.java:128)
[ERROR] at com.sun.tools.javadoc.Main.execute(Main.java:41)
[ERROR] at com.sun.tools.javadoc.Main.main(Main.java:31)

Please use labels and text to provide additional information.

I suggest to:
* replace com.google.doclava.PackageInfo line #37 with {{{ mName = 
name.length() == 0 ? DEFAULT_PACKAGE : name; }}}
* remove the catch block in com.google.doclava.JarUtils lines #78-#80

That should be enough to make Doclava retro-compatible even if compiled with 
Java6

Original issue reported on code.google.com by simone.t...@gmail.com on 4 Dec 2010 at 9:20

GoogleCodeExporter commented 8 years ago
I found a little turnaround when using Maven, as I described on 
http://code.google.com/p/doclava/wiki/GettingStarted in the Warning section, I 
wonder if something similar can be done with Ant

Original comment by simone.t...@gmail.com on 6 Dec 2010 at 7:06

GoogleCodeExporter commented 8 years ago
Hello,
No way to fix 1.5 compatibilty ?
A lot projects needs to be still 1.5 

Original comment by oliver.lamy@gmail.com on 5 Aug 2011 at 8:54

GoogleCodeExporter commented 8 years ago
Salut Olivier!!! :)
are you in the condition to run the turnaround I proposed proposed on wiki page 
http://code.google.com/p/doclava/wiki/GettingStarted ?
In that way you can target your application to java5 but run mvn with java6 (I 
use the animal-sniffer plugin to check 1.5 compliance) and generate doclava 
doc...

Original comment by simone.t...@gmail.com on 5 Aug 2011 at 9:08

GoogleCodeExporter commented 8 years ago
Hello,
I'd like to use that for some ASF projects which need to be run and released 
with 1.5.
ATM I'm preparing a patch and will attach it here

Original comment by oliver.lamy@gmail.com on 5 Aug 2011 at 9:10

GoogleCodeExporter commented 8 years ago
here a patch.
there is a unit failure not due to the patch.

Original comment by oliver.lamy@gmail.com on 5 Aug 2011 at 9:18

Attachments:

GoogleCodeExporter commented 8 years ago
no news for this simple patch ???
The only solution is to fork this project ? (perso I don't like this open 
source way...)

Original comment by oliver.lamy@gmail.com on 29 Sep 2011 at 9:21

GoogleCodeExporter commented 8 years ago
Salut Olivier,
No objection from my side for applying the patch, anyway we have to wait for 
project owners to be approved.
IIUC JSilver dependency is already Java1.5 targeted so just applying the patch 
should work.

Original comment by simone.t...@gmail.com on 29 Sep 2011 at 9:28

GoogleCodeExporter commented 8 years ago
this issue is open since Dec 4, 2010 and no response.
really *SAD*

Original comment by oliver.lamy@gmail.com on 3 Oct 2011 at 9:04

GoogleCodeExporter commented 8 years ago

Original comment by bjdod...@gmail.com on 3 Oct 2011 at 5:38