Bug 754365 - package com.sun.javadoc does not exist; package com.sun.tools.doclet does not exist
Summary: package com.sun.javadoc does not exist; package com.sun.tools.doclet does not...
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: maven-plugin-tools
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Jaromír Cápík
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-11-16 09:40 UTC by Jaromír Cápík
Modified: 2016-02-01 01:55 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-11-16 16:21:47 UTC
Type: ---


Attachments (Terms of Use)
build.log (71.44 KB, text/x-log)
2011-11-16 09:42 UTC, Jaromír Cápík
no flags Details
root.log (101.19 KB, text/x-log)
2011-11-16 09:42 UTC, Jaromír Cápík
no flags Details

Description Jaromír Cápík 2011-11-16 09:40:59 UTC
Description of problem:
I couldn't build one of my packages in the rawhide (f17) environment, whilst there's no problem with building in the f16 environment.

The workaround for rawhide was to force the java version to 1.6.0.

Version-Release number of selected component (if applicable):
1:1.7.0.1-2.0.3.fc17

How reproducible:
always

Reproduction:
Build the maven-plugin-tools in rawhide with ">="
BuildRequires: java-devel >= 1:1.6.0

Workaround:
Build the maven-plugin-tools in rawhide with "="
BuildRequires: java-devel = 1:1.6.0

Actual results:
[ERROR] /builddir/build/BUILD/maven-plugin-tools-2.7/maven-plugin-tools-javadoc/src/main/java/org/apache/maven/tools/plugin/javadoc/MojoThreadSafeTypeTaglet.java:[22,28] error: package com.sun.tools.doclets does not exist
[ERROR] /builddir/build/BUILD/maven-plugin-tools-2.7/maven-plugin-tools-javadoc/src/main/java/org/apache/maven/tools/plugin/javadoc/AbstractMojoTaglet.java:[33,22] error: package com.sun.javadoc does not exist
[ERROR] /builddir/build/BUILD/maven-plugin-tools-2.7/maven-plugin-tools-javadoc/src/main/java/org/apache/maven/tools/plugin/javadoc/AbstractMojoTaglet.java:[34,28] error: package com.sun.tools.doclets does not exist
[ERROR] /builddir/build/BUILD/maven-plugin-tools-2.7/maven-plugin-tools-javadoc/src/main/java/org/apache/maven/tools/plugin/javadoc/AbstractMojoTaglet.java:[50,15] error: cannot find symbol
[ERROR]  class Taglet
/builddir/build/BUILD/maven-plugin-tools-2.7/maven-plugin-tools-javadoc/src/main/java/org/apache/maven/tools/plugin/javadoc/AbstractMojoTaglet.java:[53,28] error: cannot find symbol
...
... 

Expected results:
No errors

Comment 1 Jaromír Cápík 2011-11-16 09:42:37 UTC
Created attachment 533946 [details]
build.log

Comment 2 Jaromír Cápík 2011-11-16 09:42:59 UTC
Created attachment 533947 [details]
root.log

Comment 3 Deepak Bhole 2011-11-16 13:21:56 UTC
Re-assigning to maven-plugin-tools

Java 1.6 will be removed from Fedora eventually by the way (maybe even F17, it is undecided yet).

The proper fix is to make maven-plugin-tools not use internal com.sun.* API.

Comment 4 Alexander Kurtakov 2011-11-16 13:35:36 UTC
(In reply to comment #3)
> Re-assigning to maven-plugin-tools
> 
> Java 1.6 will be removed from Fedora eventually by the way (maybe even F17, it
> is undecided yet).
> 
> The proper fix is to make maven-plugin-tools not use internal com.sun.* API.

Deepak, 
How do you suggest this to happen?
There is no other API AFAIK. The only thing I found is http://openjdk.java.net/jeps/106 but it's gonna take long time before it's available in OpenJDK release, right?

Comment 5 Alexander Kurtakov 2011-11-16 13:38:31 UTC
Another thing is that these packages are present in OpenJDK 7 (tools.jar) but they are not found while on OpenJDK 6 they are. So it's quite probable that there is a packaging bug or something else preventing tools.jar from being accessible.
P.S. I don't question your com.sun comment and I totally agree with it but we have to find a solution.

Comment 6 Deepak Bhole 2011-11-16 14:54:54 UTC
Hi Alex,

I was a bit confused by the original report. I didn't realize that the classes were still there, just not visible.

It seems that somehow for OpenJDK6 maven was seeing tools.jar but now it isn't. I think the workaround should then be to add tools.jar to the classpath regardless of version of the JDK. With 1.6 this should have no ill-effect and with 1.7 the classes will be seen correctly. Tools.jar is not supposed to be in the system classpath since 1.5 (at least) anyway.

This link explains how to do it for maven:
http://maven.apache.org/general.html#tools-jar-dependency

Comment 7 Jaromír Cápík 2011-11-16 16:21:47 UTC
Thanks a lot ... I applied the proposed changes and it works.

I've also checked the latest upstream and the same changes were made there recently.

The package is rebuilt -> closing.


Note You need to log in before you can comment on or make changes to this bug.