Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 544076 - ejavadoc addition to java-utils-2.eclass
Summary: ejavadoc addition to java-utils-2.eclass
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Java (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Java team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 496986
  Show dependency tree
 
Reported: 2015-03-22 01:16 UTC by William L. Thomson Jr.
Modified: 2015-04-04 21:07 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
java-utils-2 eclass ejavac patch (java-utils-2_eclass-ejavac.patch,745 bytes, patch)
2015-03-23 16:28 UTC, William L. Thomson Jr.
Details | Diff
java-pkg-simple eclass ejavac patch (java-pkg-simple_eclass-ejavac.patch,484 bytes, patch)
2015-03-23 16:29 UTC, William L. Thomson Jr.
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description William L. Thomson Jr. 2015-03-22 01:16:15 UTC
Proposed ejavadoc addition to java-utils-2.eclass. This is due to 1.8 having strict rules for javadoc. Could be used for other default javadoc flags and other.


# @FUNCTION: ejavadoc
# @USAGE: <javadoc_arguments>
# @DESCRIPTION:
# javadoc wrapper function. Will use the set some flags based on
# the version of the jdk due to strict javadoc rules in 1.8
ejavadoc() {

  debug-print-function ${FUNCNAME} $*

  local javadoc_args="";

  if java-pkg_is-vm-version-ge "1.8" ; then
	javadoc_args="-Xdoclint:none ";
  fi

  javadoc ${javadoc_args} "${@}" || die "ejavadoc failed"

}
Comment 1 James Le Cuirot gentoo-dev 2015-03-23 10:44:40 UTC
Looks good to me but please attach an actual patch that also includes a change to java-pkg-simple. I believe this is the only eclass that calls javadoc directly.

What about javadocs built via Ant? Does Ant know how to deal with this? Is our Ant version recent enough?
Comment 2 William L. Thomson Jr. 2015-03-23 16:21:57 UTC
I didn't make it a patch because I was not sure where it would go in the eclass. Not that its location or otherwise matters. But I can make a patch, which will just suggest a location really.

As for a patch for java-pkg-simple, I can make that. But its only in one place and literally a change from javadoc to ejavadoc. I can provide a patch for that, but is a very trivial change.

The ant aspect is another story. None of the eclasses handle the rewrite stuff, that is done by the python xml re-writer. I suppose that could be modified to set the flag by default just the same. Then again upstream might address this, and/or could be done via sed to build.xml or otherwise. Hard to say how to handle that, but out of consistency. Some sort of changes to the xml rewriter would likely make the most sense. Set the flag always by default, just as ejavadoc will.

I know the ant stuff does not call ejava stuff, so it would not be changing it to use ejavadoc. It would be a matter of adding the flag/argument build.xml via the xml rewriter.
Comment 3 William L. Thomson Jr. 2015-03-23 16:28:43 UTC
Created attachment 399560 [details, diff]
java-utils-2 eclass ejavac patch
Comment 4 William L. Thomson Jr. 2015-03-23 16:29:11 UTC
Created attachment 399562 [details, diff]
java-pkg-simple eclass ejavac patch
Comment 5 James Le Cuirot gentoo-dev 2015-04-04 21:07:29 UTC
Unfortunately I don't think Ant handles this (Ant's own build.xml adds -Xdoclint:none manually!) but that can be dealt with separately.

  04 Apr 2015; James Le Cuirot <chewi@gentoo.org> java-utils-2.eclass,
  java-pkg-simple.eclass:
  Add ejavadoc function. Thanks to wltjr. Fixes bug #544076.