[jira] [Created] (YETUS-524) audience-annotations can not be used as a dependency in a gradle build

2017-06-23 Thread Grant Henke (JIRA)
Grant Henke created YETUS-524:
-

 Summary: audience-annotations can not be used as a dependency in a 
gradle build
 Key: YETUS-524
 URL: https://issues.apache.org/jira/browse/YETUS-524
 Project: Yetus
  Issue Type: Bug
  Components: Audience Annotations
Affects Versions: 0.4.0
Reporter: Grant Henke
 Fix For: 0.5.0


The Yetus audience-annotations module uses a jdk profile in the parent 
yetus-project pom to define the tool.jar to use in the dependency management 
section:

{code:title=audience-annotations/pom.xml}
...


  
  jdk.tools
  jdk.tools
  system
  
  true

  
...
{code}

{code:title=yetus-project/pom.xml}
...


  jdk1.7
  
1.7
  
  

  
jdk.tools
jdk.tools
1.7
system
${java.home}/../lib/tools.jar
  

  

...
{code}

This causes issues when trying to download the maven dependency via a gradle 
project because gradle does not support jdk profile activation and views 
profile activation requirements as a reproducibility anti-pattern to be 
avoided. ([source|https://blog.gradle.org/maven-pom-profiles]).

The issue seen in a gradle build is below:
{noformat}
> Could not resolve org.apache.yetus:audience-annotations:0.4.0.
 Required by: ...
  > Could not resolve org.apache.yetus:audience-annotations:0.4.0.
 > Could not parse POM 
https://repo1.maven.org/maven2/org/apache/yetus/audience-annotations/0.4.0/audience-annotations-0.4.0.pom
> Unable to resolve version for dependency 'jdk.tools:jdk.tools:jar'
{noformat}

This occurs because without any default version and no jdk profile activated 
jdk.tools is an invalid dependency. Given that its optional, it could simply be 
ignored. However, gradle has no way to force this even if setting the 
transitive = false property.

This is easily fixed by adding a default dependency when no jdk profile is 
activated. 



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Created] (YETUS-542) audience-annotations-jdiff version 0.5.0 was not pushed to maven central

2017-08-23 Thread Grant Henke (JIRA)
Grant Henke created YETUS-542:
-

 Summary: audience-annotations-jdiff version 0.5.0 was not pushed 
to maven central
 Key: YETUS-542
 URL: https://issues.apache.org/jira/browse/YETUS-542
 Project: Yetus
  Issue Type: Bug
Affects Versions: 0.5.0
Reporter: Grant Henke


The audience-annotations-jdiff module appears to be missing for the 0.5.0 
release in maven central:
http://central.maven.org/maven2/org/apache/yetus/audience-annotations-jdiff/



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (YETUS-628) Class level InterfaceAudience is not applied to internal classes/enums

2018-05-07 Thread Grant Henke (JIRA)

[ 
https://issues.apache.org/jira/browse/YETUS-628?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16466075#comment-16466075
 ] 

Grant Henke commented on YETUS-628:
---

This was not working when generating Javadoc using the 
IncludePublicAnnotationsStandardDoclet.

> Class level InterfaceAudience is not applied to internal classes/enums
> --
>
> Key: YETUS-628
> URL: https://issues.apache.org/jira/browse/YETUS-628
> Project: Yetus
>  Issue Type: Improvement
>  Components: Audience Annotations
>Affects Versions: 0.7.0
>Reporter: Grant Henke
>Priority: Major
>
> When defining a class with internal classes and enums, if no explicit 
> InterfaceAudience is applied to internal classes it would be useful if the 
> inner classes and enums had the same InterfaceAudience as the parent class. 
> Example: 
> {code:java}
> @InterfaceAudience.Public
> public class MyClass {
>...
>public enum MyEnum {
>...
>}
>...
> }{code}
> For now every internal class/enum needs to be defined: 
> {code:java}
> @InterfaceAudience.Public
> public class MyClass {
>...
>@InterfaceAudience.Public
>public enum MyEnum {
>...
>}
>...
> }
> {code}
>  
> This would also be useful for InterfaceStability.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (YETUS-629) Remove System.out.println from Doclets

2018-05-07 Thread Grant Henke (JIRA)

[ 
https://issues.apache.org/jira/browse/YETUS-629?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16466087#comment-16466087
 ] 

Grant Henke commented on YETUS-629:
---

Sure I can put one up this week. 

> Remove System.out.println from Doclets
> --
>
> Key: YETUS-629
> URL: https://issues.apache.org/jira/browse/YETUS-629
> Project: Yetus
>  Issue Type: Bug
>Affects Versions: 0.7.0
>Reporter: Grant Henke
>Priority: Major
>  Labels: beginner
>
> The doclet uses System.out.println to print the name of the doclet being 
> called. This is noise that isn't needed in regular runs/logs. If it's useful 
> for debugging, perhaps adding a verbose mode would be useful. I suspect this 
> was accidentally introduced and can simply be removed. 
> Example:
> https://github.com/apache/yetus/blob/master/audience-annotations-component/audience-annotations/src/main/java/org/apache/yetus/audience/tools/IncludePublicAnnotationsStandardDoclet.java#L48:5



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Created] (YETUS-619) audience-annotations-jdiff doclet does not work on Java 9

2018-03-06 Thread Grant Henke (JIRA)
Grant Henke created YETUS-619:
-

 Summary: audience-annotations-jdiff doclet does not work on Java 9
 Key: YETUS-619
 URL: https://issues.apache.org/jira/browse/YETUS-619
 Project: Yetus
  Issue Type: Bug
  Components: Audience Annotations
Affects Versions: 0.7.0
Reporter: Grant Henke


When compiling with Java 9, builds fail to find the jdk.tools jar. This looks 
to be a result of the Java 9 Jigsaw changes. I found a brief description here: 
[https://stackoverflow.com/a/35244168]

A maven pom file containing the following should be able to reproduce the issue:
{code:java}

   org.apache.maven.plugins
   maven-javadoc-plugin
   ${maven-javadoc-plugin.version}
   
  
 org.apache.yetus.audience.tools.IncludePublicAnnotationsStandardDoclet
  
  
 org.apache.yetus
 audience-annotations-jdiff
 0.7.0
  
  ...
   

{code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Created] (YETUS-625) Add audience-annotations Maven build example usage

2018-04-11 Thread Grant Henke (JIRA)
Grant Henke created YETUS-625:
-

 Summary: Add audience-annotations Maven build example usage
 Key: YETUS-625
 URL: https://issues.apache.org/jira/browse/YETUS-625
 Project: Yetus
  Issue Type: Improvement
  Components: Audience Annotations, website and documentation
Affects Versions: 0.7.0
Reporter: Grant Henke


An example of how the audience annotations should correctly be used in a maven 
build would be helpful to users.  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Created] (YETUS-626) Doclet hides/prevents doclint output

2018-04-12 Thread Grant Henke (JIRA)
Grant Henke created YETUS-626:
-

 Summary: Doclet hides/prevents doclint output
 Key: YETUS-626
 URL: https://issues.apache.org/jira/browse/YETUS-626
 Project: Yetus
  Issue Type: Bug
Affects Versions: 0.7.0
Reporter: Grant Henke


When using the IncludePublicAnnotationsStandardDoclet all Java 8+ doclint 
warnings are suppressed. 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Created] (YETUS-629) Remove System.out.println from Doclets

2018-04-13 Thread Grant Henke (JIRA)
Grant Henke created YETUS-629:
-

 Summary: Remove System.out.println from Doclets
 Key: YETUS-629
 URL: https://issues.apache.org/jira/browse/YETUS-629
 Project: Yetus
  Issue Type: Bug
Affects Versions: 0.7.0
Reporter: Grant Henke


The doclet uses System.out.println to print the name of the doclet being 
called. This is noise that isn't needed in regular runs/logs. If it's useful 
for debugging, perhaps adding a verbose mode would be useful. I suspect this 
was accidentally introduced and can simply be removed. 

Example:

https://github.com/apache/yetus/blob/master/audience-annotations-component/audience-annotations/src/main/java/org/apache/yetus/audience/tools/IncludePublicAnnotationsStandardDoclet.java#L48:5



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Created] (YETUS-628) Class level InterfaceAudience is not applied to internal classes/enums

2018-04-13 Thread Grant Henke (JIRA)
Grant Henke created YETUS-628:
-

 Summary: Class level InterfaceAudience is not applied to internal 
classes/enums
 Key: YETUS-628
 URL: https://issues.apache.org/jira/browse/YETUS-628
 Project: Yetus
  Issue Type: Improvement
  Components: Audience Annotations
Affects Versions: 0.7.0
Reporter: Grant Henke


When defining a class with internal classes and enums, if no explicit 
InterfaceAudience is applied to internal classes it would be useful if the 
inner classes and enums had the same InterfaceAudience as the parent class. 

Example: 
{code:java}
@InterfaceAudience.Public
public class MyClass {
   ...
   public enum MyEnum {
   ...
   }
   ...
}{code}
For now every internal class/enum needs to be defined: 
{code:java}
@InterfaceAudience.Public
public class MyClass {
   ...
   @InterfaceAudience.Public
   public enum MyEnum {
   ...
   }
   ...
}
{code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (YETUS-628) Class level InterfaceAudience is not applied to internal classes/enums

2018-04-13 Thread Grant Henke (JIRA)

 [ 
https://issues.apache.org/jira/browse/YETUS-628?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Grant Henke updated YETUS-628:
--
Description: 
When defining a class with internal classes and enums, if no explicit 
InterfaceAudience is applied to internal classes it would be useful if the 
inner classes and enums had the same InterfaceAudience as the parent class. 

Example: 
{code:java}
@InterfaceAudience.Public
public class MyClass {
   ...
   public enum MyEnum {
   ...
   }
   ...
}{code}
For now every internal class/enum needs to be defined: 
{code:java}
@InterfaceAudience.Public
public class MyClass {
   ...
   @InterfaceAudience.Public
   public enum MyEnum {
   ...
   }
   ...
}
{code}
 

This would also be useful for InterfaceStability.

  was:
When defining a class with internal classes and enums, if no explicit 
InterfaceAudience is applied to internal classes it would be useful if the 
inner classes and enums had the same InterfaceAudience as the parent class. 

Example: 
{code:java}
@InterfaceAudience.Public
public class MyClass {
   ...
   public enum MyEnum {
   ...
   }
   ...
}{code}
For now every internal class/enum needs to be defined: 
{code:java}
@InterfaceAudience.Public
public class MyClass {
   ...
   @InterfaceAudience.Public
   public enum MyEnum {
   ...
   }
   ...
}
{code}


> Class level InterfaceAudience is not applied to internal classes/enums
> --
>
> Key: YETUS-628
> URL: https://issues.apache.org/jira/browse/YETUS-628
> Project: Yetus
>  Issue Type: Improvement
>  Components: Audience Annotations
>Affects Versions: 0.7.0
>Reporter: Grant Henke
>Priority: Major
>
> When defining a class with internal classes and enums, if no explicit 
> InterfaceAudience is applied to internal classes it would be useful if the 
> inner classes and enums had the same InterfaceAudience as the parent class. 
> Example: 
> {code:java}
> @InterfaceAudience.Public
> public class MyClass {
>...
>public enum MyEnum {
>...
>}
>...
> }{code}
> For now every internal class/enum needs to be defined: 
> {code:java}
> @InterfaceAudience.Public
> public class MyClass {
>...
>@InterfaceAudience.Public
>public enum MyEnum {
>...
>}
>...
> }
> {code}
>  
> This would also be useful for InterfaceStability.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Created] (YETUS-627) Doclet does not work with Gradle Javadoc generation

2018-04-13 Thread Grant Henke (JIRA)
Grant Henke created YETUS-627:
-

 Summary: Doclet does not work with Gradle Javadoc generation
 Key: YETUS-627
 URL: https://issues.apache.org/jira/browse/YETUS-627
 Project: Yetus
  Issue Type: Bug
  Components: Audience Annotations
 Environment: Gradle 4.6, Java 1.8.0_121
Reporter: Grant Henke


The IncludePublicAnnotationsStandardDoclet does not work with Gradle Javadoc 
generation, though it does for Maven in the same project. It appears Maven 
passes slightly different arguments to the Javadoc tool. 

In Gradle I configured the Javadoc task to use the Doclet via:
{code:java}
configurations {
   doclet
}

dependencies {
   doclet "org.apache.yetus:audience-annotations:0.7.0"
}

javadoc {
   options.docletpath = configurations.doclet.files.asType(List)
   options.doclet = 
'org.apache.yetus.audience.tools.IncludePublicAnnotationsStandardDoclet'
}{code}
Running _gradle javadoc_ results in: 

 
{code:java}
IncludePublicAnnotationsStandardDoclet java.lang.ArrayStoreException: 
com.sun.proxy.$Proxy2 at 
java.util.AbstractCollection.toArray(AbstractCollection.java:196) at 
com.sun.tools.doclets.internal.toolkit.util.IndexBuilder.buildIndexMap(IndexBuilder.java:160)
 at 
com.sun.tools.doclets.internal.toolkit.util.IndexBuilder.(IndexBuilder.java:124)
 at 
com.sun.tools.doclets.internal.toolkit.util.IndexBuilder.(IndexBuilder.java:103)
 at 
com.sun.tools.doclets.formats.html.HtmlDoclet.generateOtherFiles(HtmlDoclet.java:122)
 at 
com.sun.tools.doclets.internal.toolkit.AbstractDoclet.startGeneration(AbstractDoclet.java:146)
 at 
com.sun.tools.doclets.internal.toolkit.AbstractDoclet.start(AbstractDoclet.java:82)
 at com.sun.tools.doclets.formats.html.HtmlDoclet.start(HtmlDoclet.java:80) at 
com.sun.tools.doclets.standard.Standard.start(Standard.java:39) at 
org.apache.yetus.audience.tools.IncludePublicAnnotationsStandardDoclet.start(IncludePublicAnnotationsStandardDoclet.java:51)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) 
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 at java.lang.reflect.Method.invoke(Method.java:498) at 
com.sun.tools.javadoc.DocletInvoker.invoke(DocletInvoker.java:310) at 
com.sun.tools.javadoc.DocletInvoker.start(DocletInvoker.java:189) at 
com.sun.tools.javadoc.Start.parseAndExecute(Start.java:366) at 
com.sun.tools.javadoc.Start.begin(Start.java:219) at 
com.sun.tools.javadoc.Start.begin(Start.java:205) at 
com.sun.tools.javadoc.Main.execute(Main.java:64) at 
com.sun.tools.javadoc.Main.main(Main.java:54)
{code}
 

Digging into the stack trace a bit it appears that the issue comes from 
building an index of packages, however Gradle passes the class files to Javadoc 
and does not pass packages. This is a valid way to generate Javadoc as 
documented here: 
[https://docs.oracle.com/javase/7/docs/technotes/tools/solaris/javadoc.html#documentingclasses]

The Javadoc options Gradle generates are (with path substitutions): 

 
{code:java}
-classpath '/some/classpath/paths/...'
-d '/some/destination/directory'
-doclet 'org.apache.yetus.audience.tools.IncludePublicAnnotationsStandardDoclet'
-docletpath '/path/to/audience-annotations-0.7.0.jar'
-doctitle 'some API'
-quiet 
-windowtitle 'some API'
'/path/to/some/Class.java'
'/path/to/some/Class2.java'
'/path/to/some/Class3.java'
...{code}
There is no great way to add packages to the Javadoc options output in Gradle, 
but one hacky solution does allow it to successfully generate Javadocs. Forcing 
a valid package name into the options by passing it with an option that takes 
no arguments will allow the task to succeed. 

In Gradle I added:

 
{code:java}
javadoc {
   ...
   // A Javadoc option that takes no parameter, 
   // and a valid package as the parameter.
   options.addStringOption("notimestamp", "some.valid.package")
}{code}
This results in the the following javadoc options:

 

 
{code:java}
-classpath '/some/classpath/paths/...'
-d '/some/destination/directory'
-doclet 'org.apache.yetus.audience.tools.IncludePublicAnnotationsStandardDoclet'
-docletpath '/path/to/audience-annotations-0.7.0.jar'
-doctitle 'some API'
-notimestamp 'some.valid.package'
-quiet 
-windowtitle 'some API'
'/path/to/some/Class.java'
'/path/to/some/Class2.java'
'/path/to/some/Class3.java'
...
{code}
Note: The packages would generally come just before the list of classes per the 
documentation, but this seams to work for some reason. 
(https://docs.oracle.com/javase/7/docs/technotes/tools/solaris/javadoc.html#documentingboth)

 

When running gradle javadoc there may be a warning like below when using this 
hacky workaround:
{code:java}
javadoc: warning - No source files for package some.valid.package
{code}
 

 

 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)