Building JavaDoc and Sources JARs

Daniel Zwolenski zonski at gmail.com
Fri Jul 26 15:22:55 PDT 2013


Thanks guys - the source target worked like a charm so that's that bit
sorted. I don't need platform specific separations of source or javadoc
just the simple stuff - although technically I should put the source for
the native libs alongside the native files when I deploy them too. I don't
suppose anyone has a task that zips/jars up all the native code?

For the JavaDoc: there were a few issues on my end. I had java8 set as my
home, switching to java7 made some of the weirder errors go away. Then
adding the JDK doc to my JDK home got rid of a bunch more (I think). I
didn't have to set any properties just extract the doc into the JDK home.

Then I had to remove the 'web' module from the javadoc task as this was
referencing com.sun.webkit stuff that isn't there. I'm using the *Java78
backport* here.

Now I just have a whole lot of errors from the Ensemble stuff, along these
lines:

/Users/zonski/Development/openjdk/jfx78/jfx78/jfx78/apps/samples/Ensemble8/src/samples/java/ensemble/samples/scenegraph/stage/advancedstage/AdvancedStageApp.java:72:
error: cannot find symbol
public class AdvancedStageApp extends Application {
                                      ^
symbol: class Application


Not sure why but don't really care as easiest for me would be to just to
exclude all samples from the javadoc task. I assume I need to do something
with this line in the javadoc task:

exclude("com/**/*", "javafx/scene/ParentDesignInfo*", "Compile*",
"javafx/builder/**/*");


I'm sure it's simple but I've run out of time at the moment (moving
house/states) so I'll have to work this out later but if anyone knows off
the top of their head, that would help me.

Richard, I'll definitely respond to your question on module separation and
versioning when I get a chance. Might take a few days though.







On Fri, Jul 26, 2013 at 6:05 PM, Robert Fisher <rfisher at tesis.de> wrote:

> For a source jar/zip I added the following top-level task to my
> build.gradle file:
>
> task jfxrtSources(type: Zip) {
>         group = "Basic";
>         description = "Packs all sources for jfxrt.jar into a zip file";
>         archiveName = "build/javafx-src.zip";
>         includeEmptyDirs = false;
>         from("modules/base/src/main/java",
>                  "modules/builders/src/main/java",
>                  "modules/controls/src/main/java",
>                  "modules/designTime/src/main/java",
>                  "modules/fxml/src/main/java",
>                  "modules/fxpackager/src/main/java",
>                  "modules/graphics/src/main/java",
>                  "modules/web/src/main/java",
>                  "modules/swing/src/main/java",
>                  "modules/swt/src/main/java");
>
>         include("**/*.java");
> }
>
> If you want to exclude sources that are irrelevant for your target
> platform (e.g. android-specific sources in a windows build), you can just
> declare the task at top-level and put the implementation underneath
> "complileTargets {" , exactly as it is done for the "jfxrt" task for
> instance.
>
> Cheers,
> Rob
>
>
> -----Ursprüngliche Nachricht-----
> Von: openjfx-dev-bounces at openjdk.java.net [mailto:
> openjfx-dev-bounces at openjdk.java.net] Im Auftrag von Richard Bair
> Gesendet: Freitag, 26. Juli 2013 06:39
> An: Daniel Zwolenski
> Cc: openjfx-dev at openjdk.java.net
> Betreff: Re: Building JavaDoc and Sources JARs
>
> You gotta set the BUILD_JAVADOC flag. Look in gradle.properties.template
> -- all the different flags are pretty well documented there.
>
> For sources, somebody else posted a message about wanting to do that, and
> I think that's great. Just need to get a patch to the gradle build to
> create a source zip (per platform, or just one big zip with everything in
> it?)
>
> Richard
>
> On Jul 25, 2013, at 8:24 PM, Daniel Zwolenski <zonski at gmail.com> wrote:
>
> > For the Maven deploy I need a JAR of the JavaDoc and another
> > containing the sources. That's the rules.
> >
> > How do I build these with the Gradle build? I tried:
> >
> >> gradle javadoc
> >
> > and can't see any JavaDoc anywhere in the build directory?
> >
> > Admittedly I am running this on the 78 backport code, not the JFX
> > code, but I believe this part of the build should be the same?
> >
> > Full log:
> >
> > Daniels-MacBook-Pro:jfx78 zonski$ /usr/local/gradle-1.6/bin/gradle
> > javadoc The ConfigurationContainer.add() method has been deprecated
> > and is scheduled to be removed in Gradle 2.0. Please use the create()
> > method instead.
> > :buildSrc:clean UP-TO-DATE
> > :buildSrc:generateGrammarSource
> > error(10):  internal error: Can't get property indirectDelegates using
> > method get/isIndirectDelegates from org.antlr.tool.Grammar instance :
> > java.lang.NullPointerException
> > java.util.Objects.requireNonNull(Objects.java:203)
> > java.util.ArrayList.removeAll(ArrayList.java:674)
> > org.antlr.tool.CompositeGrammar.getIndirectDelegates(CompositeGrammar.
> > java:222)
> > org.antlr.tool.Grammar.getIndirectDelegates(Grammar.java:2620)
> > sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.j
> > ava:57)
> > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccess
> > orImpl.java:43)
> > java.lang.reflect.Method.invoke(Method.java:491)
> > org.antlr.stringtemplate.language.ASTExpr.invokeMethod(ASTExpr.java:56
> > 3)
> > org.antlr.stringtemplate.language.ASTExpr.rawGetObjectProperty(ASTExpr
> > .java:514)
> > org.antlr.stringtemplate.language.ASTExpr.getObjectProperty(ASTExpr.ja
> > va:416)
> > org.antlr.stringtemplate.language.ActionEvaluator.attribute(ActionEval
> > uator.java:351)
> > org.antlr.stringtemplate.language.ActionEvaluator.expr(ActionEvaluator
> > .java:136)
> > org.antlr.stringtemplate.language.ActionEvaluator.templateApplication(
> > ActionEvaluator.java:216)
> > org.antlr.stringtemplate.language.ActionEvaluator.expr(ActionEvaluator
> > .java:126)
> > org.antlr.stringtemplate.language.ActionEvaluator.action(ActionEvaluat
> > or.java:84)
> > org.antlr.stringtemplate.language.ASTExpr.write(ASTExpr.java:148)
> > org.antlr.stringtemplate.StringTemplate.write(StringTemplate.java:700)
> > org.antlr.stringtemplate.language.ASTExpr.write(ASTExpr.java:722)
> > org.antlr.stringtemplate.language.ASTExpr.writeAttribute(ASTExpr.java:
> > 659)
> > org.antlr.stringtemplate.language.ActionEvaluator.action(ActionEvaluat
> > or.java:86)
> > org.antlr.stringtemplate.language.ASTExpr.write(ASTExpr.java:148)
> > org.antlr.stringtemplate.StringTemplate.write(StringTemplate.java:700)
> > org.antlr.stringtemplate.language.ASTExpr.write(ASTExpr.java:722)
> > org.antlr.stringtemplate.language.ASTExpr.writeAttribute(ASTExpr.java:
> > 659)
> > org.antlr.stringtemplate.language.ActionEvaluator.action(ActionEvaluat
> > or.java:86)
> > org.antlr.stringtemplate.language.ASTExpr.write(ASTExpr.java:148)
> > org.antlr.stringtemplate.StringTemplate.write(StringTemplate.java:700)
> > org.antlr.stringtemplate.language.ASTExpr.write(ASTExpr.java:722)
> > org.antlr.stringtemplate.language.ASTExpr.writeAttribute(ASTExpr.java:
> > 659)
> > org.antlr.stringtemplate.language.ActionEvaluator.action(ActionEvaluat
> > or.java:86)
> > org.antlr.stringtemplate.language.ASTExpr.write(ASTExpr.java:148)
> > org.antlr.stringtemplate.StringTemplate.write(StringTemplate.java:700)
> > org.antlr.codegen.CodeGenerator.write(CodeGenerator.java:1278)
> > org.antlr.codegen.Target.genRecognizerFile(Target.java:94)
> > org.antlr.codegen.CodeGenerator.genRecognizer(CodeGenerator.java:463)
> > org.antlr.Tool.generateRecognizer(Tool.java:607)
> > org.antlr.Tool.process(Tool.java:429)
> > org.antlr.Tool.main(Tool.java:91)
> > :buildSrc:compileJava
> > :buildSrc:compileGroovy
> > :buildSrc:processResources
> > :buildSrc:classes
> > :buildSrc:jar
> > :buildSrc:assemble
> > :buildSrc:compileTestJava
> > Note:
> > /Users/zonski/Development/openjdk/jfx78/jfx78-zonski/jfx78/buildSrc/sr
> > c/test/java/com/sun/scenario/effect/compiler/parser/FieldSelectTest.ja
> > va
> > uses or overrides a deprecated API.
> > Note: Recompile with -Xlint:deprecation for details.
> > :buildSrc:compileTestGroovy UP-TO-DATE :buildSrc:processTestResources
> > UP-TO-DATE :buildSrc:testClasses :buildSrc:test :buildSrc:check
> > :buildSrc:build Missing or incorrect path to 'jfxrt.jar':
> >
> '/Library/Java/JavaVirtualMachines/jdk1.8.0.jdk/Contents/Home/jre/lib/ext/jfxrt.jar'.
> > Perhaps bad JDK_HOME?
> > /Library/Java/JavaVirtualMachines/jdk1.8.0.jdk/Contents/Home
> > Unsupported gradle version 1.6 in use. Only 1.4 is supported
> > OS_NAME: mac os x
> > OS_ARCH: x86_64
> > JAVA_HOME:
> > /Library/Java/JavaVirtualMachines/jdk1.8.0.jdk/Contents/Home/jre
> > JDK_HOME: /Library/Java/JavaVirtualMachines/jdk1.8.0.jdk/Contents/Home
> > COMPILE_TARGETS: mac
> > COMPILE_FLAGS_FILES: buildSrc/mac.gradle
> > BINARY_STUB:
> > /Library/Java/JavaVirtualMachines/jdk1.8.0.jdk/Contents/Home/jre/lib/e
> > xt/jfxrt.jar
> > HUDSON_JOB_NAME: not_hudson
> > HUDSON_BUILD_NUMBER: 0000
> > PROMOTED_BUILD_NUMBER: 00
> > PRODUCT_NAME: OpenJFX
> > RAW_VERSION: 7.8.0
> > RELEASE_NAME: 7.8
> > RELEASE_MILESTONE: ea
> > UPDATE_STUB_CACHE: false
> > The CompileOptions.useAnt property has been deprecated and is
> > scheduled to be removed in Gradle 2.0. There is no replacement for this
> property.
> > :updateCacheIfNeeded UP-TO-DATE
> > :base:processVersionInfo
> > :base:compileJava
> > [ant:javac] Note:
> > /Users/zonski/Development/openjdk/jfx78/jfx78-zonski/jfx78/modules/bas
> > e/src/main/java/com/sun/javafx/binding/SelectBinding.java
> > uses or overrides a deprecated API.
> > [ant:javac] Note: Recompile with -Xlint:deprecation for details.
> > [ant:javac] Note: Some input files use unchecked or unsafe operations.
> > [ant:javac] Note: Recompile with -Xlint:unchecked for details.
> > :base:processResources UP-TO-DATE
> > :base:classes
> > :base:jar
> > :graphics:compileJava
> > [ant:javac] Note: Some input files use or override a deprecated API.
> > [ant:javac] Note: Recompile with -Xlint:deprecation for details.
> > [ant:javac] Note: Some input files use unchecked or unsafe operations.
> > [ant:javac] Note: Recompile with -Xlint:unchecked for details.
> > :graphics:compilePrismCompilers
> > :graphics:generatePrismShaders
> > :graphics:compilePrismJavaShaders
> > :graphics:compileDecoraCompilers
> > :graphics:generateDecoraShaders
> > :graphics:compileDecoraHLSLShaders SKIPPED
> > :graphics:processDecoraShaders :graphics:compilePrismHLSLShaders
> > SKIPPED :graphics:processPrismShaders :graphics:processResources
> > :graphics:classes :graphics:jar :designTime:compileJava [ant:javac]
> > Note: Some input files use unchecked or unsafe operations.
> > [ant:javac] Note: Recompile with -Xlint:unchecked for details.
> > :designTime:processResources UP-TO-DATE :designTime:classes
> > :designTime:jar :controls:compileJava [ant:javac] Note: Some input
> > files use or override a deprecated API.
> > [ant:javac] Note: Recompile with -Xlint:deprecation for details.
> > [ant:javac] Note: Some input files use unchecked or unsafe operations.
> > [ant:javac] Note: Recompile with -Xlint:unchecked for details.
> > :controls:processResources
> > :controls:classes
> > :controls:jar
> > :swing:compileJava
> > [ant:javac] Note:
> > /Users/zonski/Development/openjdk/jfx78/jfx78-zonski/jfx78/modules/swi
> > ng/src/main/java/javafx/embed/swing/SwingCursors.java
> > uses or overrides a deprecated API.
> > [ant:javac] Note: Recompile with -Xlint:deprecation for details.
> > [ant:javac] Note: Some input files use unchecked or unsafe operations.
> > [ant:javac] Note: Recompile with -Xlint:unchecked for details.
> > :swing:processResources UP-TO-DATE
> > :swing:classes
> > :swing:jar
> > :swt:compileJava
> > [ant:javac] Note: Some input files use unchecked or unsafe operations.
> > [ant:javac] Note: Recompile with -Xlint:unchecked for details.
> > :swt:processResources UP-TO-DATE
> > :swt:classes
> > :swt:jar
> > :fxml:compileJava
> > [ant:javac] Note:
> > /Users/zonski/Development/openjdk/jfx78/jfx78-zonski/jfx78/modules/fxm
> > l/src/main/java/javafx/fxml/FXMLLoader.java
> > uses unchecked or unsafe operations.
> > [ant:javac] Note: Recompile with -Xlint:unchecked for details.
> > :fxml:processResources UP-TO-DATE
> > :fxml:classes
> > :web:compileJava SKIPPED
> > :web:processResources
> > :web:classes
> > :javadoc SKIPPED
> > :apps:compileJava UP-TO-DATE
> > :apps:processResources UP-TO-DATE
> > :apps:classes UP-TO-DATE
> > :apps:javadoc SKIPPED
> > :base:javadoc SKIPPED
> > :web:copyClassesFromBinaryStub
> > The specified zip file ZIP
> >
> '/Library/Java/JavaVirtualMachines/jdk1.8.0.jdk/Contents/Home/jre/lib/ext/jfxrt.jar'
> > does not exist and will be silently ignored. This behaviour has been
> > deprecated and is scheduled to be removed in Gradle 2.0 :web:jar
> > :builders:compileJava [ant:javac] Note: Some input files use unchecked
> > or unsafe operations.
> > [ant:javac] Note: Recompile with -Xlint:unchecked for details.
> > :builders:processResources UP-TO-DATE
> > :builders:classes
> > :graphics:javadoc SKIPPED
> > :designTime:javadoc SKIPPED
> > :controls:javadoc SKIPPED
> > :swing:javadoc SKIPPED
> > :swt:javadoc SKIPPED
> > :web:javadoc SKIPPED
> > :builders:javadoc SKIPPED
> > :fxml:javadoc SKIPPED
> > :fxpackager:compileJava
> > [ant:javac] Note: Some input files use unchecked or unsafe operations.
> > [ant:javac] Note: Recompile with -Xlint:unchecked for details.
> > :fxpackager:man
> > :fxpackager:processResources
> > :fxpackager:classes
> > :fxpackager:javadoc SKIPPED
> > :apps:experiments:compileJava SKIPPED
> > :apps:experiments:processResources SKIPPED :apps:experiments:classes
> > SKIPPED :apps:experiments:javadoc SKIPPED :apps:samples:compileJava
> > SKIPPED :apps:samples:processResources SKIPPED :apps:samples:classes
> > SKIPPED :apps:samples:javadoc SKIPPED
> > :apps:experiments:3DViewer:compileJava
> > [ant:javac] Note: Some input files use or override a deprecated API.
> > [ant:javac] Note: Recompile with -Xlint:deprecation for details.
> > [ant:javac] Note: Some input files use unchecked or unsafe operations.
> > [ant:javac] Note: Recompile with -Xlint:unchecked for details.
> > :apps:experiments:3DViewer:processResources
> > :apps:experiments:3DViewer:classes
> > :apps:experiments:3DViewer:javadoc SKIPPED
> > :apps:experiments:Modena:compileJava
> > [ant:javac] Note: Some input files use or override a deprecated API.
> > [ant:javac] Note: Recompile with -Xlint:deprecation for details.
> > [ant:javac] Note: Some input files use unchecked or unsafe operations.
> > [ant:javac] Note: Recompile with -Xlint:unchecked for details.
> > :apps:experiments:Modena:processResources
> > :apps:experiments:Modena:classes
> > :apps:experiments:Modena:javadoc SKIPPED
> > :apps:samples:Ensemble8:compileJava
> > [ant:javac] Note: Some input files use or override a deprecated API.
> > [ant:javac] Note: Recompile with -Xlint:deprecation for details.
> > [ant:javac] Note: Some input files use unchecked or unsafe operations.
> > [ant:javac] Note: Recompile with -Xlint:unchecked for details.
> > :apps:samples:Ensemble8:processResources
> > :apps:samples:Ensemble8:classes
> > :apps:samples:Ensemble8:javadoc SKIPPED
> >
> > BUILD SUCCESSFUL
> >
> > Total time: 3 mins 33.101 secs
>
>
>
>


More information about the openjfx-dev mailing list