javadoc JDK 8 build dependency

Werner Dietl wdietl at gmail.com
Wed May 2 12:07:57 PDT 2012


Mike,

>> currently building the JDK documentation fails
>
> Do you mean running "ant javadoc-javac", or something else?
> Using the repository at https://code.google.com/p/jsr308-langtools/, "ant
> javadoc-javac" works for me (on a machine at UW CSE).

this is about the type-annotations forest at:

http://hg.openjdk.java.net/type-annotations/type-annotations/

In this version, class ElementType is in the jdk repository, but the
langtools repository uses ElementType.TYPE_USE.
There is a dependency between the javadoc usage in the jdk build
scripts and langtools.
We prevent the static compilation error by accessing
ElementType.TYPE_USE via reflection. However, we also need to make
sure that the right version of ElementType is used during execution.
My proposed patch uses the new ElementType when executing javadoc in
the jdk build.
In jsr308-langtools we don't have this issue because we use our own
copy of class ElementType and don't rebuild the whole OpenJDK forest.

I now have the type-annotations forest set up on our UW build server.
See the error report at:

http://buffalo.cs.washington.edu:8080/job/type-annotations/lastBuild/console

(You all should have read access to this; let me know if not.)

Best regards,
cu, WMD.


>> From: Werner Dietl <wdietl at gmail.com>
>> Subject: javadoc JDK 8 build dependency
>> Date: Mon, 30 Apr 2012 22:21:44 -0700>
>>
>> Dear fellow type annotations developers,
>>
>> currently building the JDK documentation fails, because javadoc now
>> uses the ElementTypes.TYPE_USE field. We prevent the static compile
>> error by looking up the field via reflection; however, we also need to
>> adapt the classpath at execution time to use the correct version of
>> ElementTypes.
>> I propose the following simple change:
>>
>>
>> diff --git a/make/common/shared/Defs-java.gmk b/make/common/shared/Defs-java.gmk
>> --- a/make/common/shared/Defs-java.gmk
>> +++ b/make/common/shared/Defs-java.gmk
>> @@ -178,7 +178,7 @@
>>               "-Xbootclasspath/p:$(JAVAH_JAR)$(CLASSPATH_SEPARATOR)$(JAVAC_JAR)"  \
>>               -jar $(JAVAH_JAR) $(JAVAHFLAGS)
>>    JAVADOC_CMD = $(BOOT_JAVA_CMD) \
>> -             "-Xbootclasspath/p:$(JAVADOC_JAR)$(CLASSPATH_SEPARATOR)$(JAVAC_JAR)$(CLASSPATH_SEPARATOR)$(DOCLETS_JAR)"
>> \
>> +             "-Xbootclasspath/p:$(CLASSBINDIR)$(CLASSPATH_SEPARATOR)$(JAVADOC_JAR)$(CLASSPATH_SEPARATOR)$(JAVAC_JAR)$(CLASSPATH_SEPARATOR)$(DOCLETS_JAR)"
>> \
>>               -jar $(JAVADOC_JAR) $(JAVADOCFLAGS)
>>  else
>>    # If no explicit tools, use boot tools (add VM flags in this case)
>>
>>
>> Please do let me know if you're not running into this build problem
>> and I'll investigate my setup.
>> Is this an acceptable additional build dependency?
>> Could you update me on the build status on the Oracle servers?
>>
>> Thanks and best regards,
>> cu, WMD.
>>
>> --
>> http://www.google.com/profiles/wdietl



-- 
http://www.google.com/profiles/wdietl


More information about the type-annotations-dev mailing list