mvn javadoc problem with java 8

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

mvn javadoc problem with java 8

Tobias Pietzsch
Hi,

when I try to build fiji project (specifically bigdataviewer-core) on the command line with

mvn clean install

I get the following errors when running with java 8
...
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-javadoc-plugin:2.9.1:jar (attach-javadocs) on project bigdataviewer-core: MavenReportException: Error while creating archive:
[ERROR] Exit code: 1 - javadoc: warning - Error fetching URL: http://jenkins.imagej.net/view/Fiji/job/Saalfeld-MPICBG-Maven/javadoc/
[ERROR] /Users/pietzsch/workspace/BigDataViewer/bigdataviewer-core/src/main/java/bdv/viewer/Source.java:57: error: reference not found
[ERROR] * Get the transform from the {@link #getSource(long) source} at timepoint
[ERROR] ^


Works fine with java 7 and java 6.

Is this a known problem?

I saw that I can disable javadoc-plugin by setting
        <properties>
                <javadoc.skip>true</javadoc.skip>
        </properties>
in my pom. Is this the recommended workaround?

best regards,
Tobias

_______________________________________________
ImageJ-devel mailing list
[hidden email]
http://imagej.net/mailman/listinfo/imagej-devel

signature.asc (465 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: mvn javadoc problem with java 8

Curtis Rueden
Hi Tobias,

> I get the following errors when running with java 8
> ...
>
> Works fine with java 7 and java 6.
>
> Is this a known problem?

Java 8's javadoc tool is much more stringent than previously, due to the addition of doclint checks [1].

I am ambivalent about making it easy to disable the doclint, because I think many of the new checks are valuable. However, some of the checks will take a lot of work to bring our code up to snuff -- e.g., the fact that @param, @return and @throws seem to be required now.

You can certainly disable it locally by passing "-Djavadoc.skip=true" to Maven from the CLI.

Please do not disable javadoc in the properties, because then Jenkins will fail to deploy the -javadoc artifact to the Maven repository.

Regards,
Curtis


On Wed, Feb 11, 2015 at 9:46 AM, Tobias Pietzsch <[hidden email]> wrote:
Hi,

when I try to build fiji project (specifically bigdataviewer-core) on the command line with

mvn clean install

I get the following errors when running with java 8
...
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-javadoc-plugin:2.9.1:jar (attach-javadocs) on project bigdataviewer-core: MavenReportException: Error while creating archive:
[ERROR] Exit code: 1 - javadoc: warning - Error fetching URL: http://jenkins.imagej.net/view/Fiji/job/Saalfeld-MPICBG-Maven/javadoc/
[ERROR] /Users/pietzsch/workspace/BigDataViewer/bigdataviewer-core/src/main/java/bdv/viewer/Source.java:57: error: reference not found
[ERROR] * Get the transform from the {@link #getSource(long) source} at timepoint
[ERROR] ^


Works fine with java 7 and java 6.

Is this a known problem?

I saw that I can disable javadoc-plugin by setting
        <properties>
                <javadoc.skip>true</javadoc.skip>
        </properties>
in my pom. Is this the recommended workaround?

best regards,
Tobias

_______________________________________________
ImageJ-devel mailing list
[hidden email]
http://imagej.net/mailman/listinfo/imagej-devel



_______________________________________________
ImageJ-devel mailing list
[hidden email]
http://imagej.net/mailman/listinfo/imagej-devel
Reply | Threaded
Open this post in threaded view
|

Re: mvn javadoc problem with java 8

dscho
Administrator
Hi Curtis,

On 2015-02-11 17:31, Curtis Rueden wrote:

>> I get the following errors when running with java 8
>> ...
>>
>> Works fine with java 7 and java 6.
>>
>> Is this a known problem?
>
> Java 8's javadoc tool is much more stringent than previously, due to
> the
> addition of doclint checks [1].

Curtis, you forgot to say that the `#getSource(long)` probably needs to
be replaced by a `#getSource(int, int)` because the class has only a
`getSource` method with the latter signature.

But I agree that Javadocs that are obviously wrong should be fixed
rather than switching off Javadoc generation in the Maven configuration.

Ciao,
Dscho

_______________________________________________
ImageJ-devel mailing list
[hidden email]
http://imagej.net/mailman/listinfo/imagej-devel
Reply | Threaded
Open this post in threaded view
|

Re: mvn javadoc problem with java 8

Curtis Rueden
Hi Dscho,

> Curtis, you forgot to say that the `#getSource(long)` probably needs
> to be replaced by a `#getSource(int, int)` because the class has only
> a `getSource` method with the latter signature.

Yeah, my reply's first draft basically said "just fix the invalid javadoc". Then I actually tried compiling with Java 8 and looked at what would need to be fixed. Over 100 errors, due to things like missing @param and @return and @throws. Fixing all of those things would actually be quite involved, especially across all 200+ repositories, so I begin to see the wisdom of working around it for now.

> But I agree that Javadocs that are obviously wrong should be fixed
> rather than switching off Javadoc generation in the Maven
> configuration.

Right, we definitely do not want to switch of javadoc generation. However, there is another way: <additionalparams>-D:doclint:none</additionalparams>. But it would need to go in a Java-8-specific profile. And again, I am ambivalent about doing it because in the long term, especially after we fully switch over to Java 8 some day, I would not want those checks disabled by default.

Regards,
Curtis

On Wed, Feb 11, 2015 at 10:36 AM, Johannes Schindelin <[hidden email]> wrote:
Hi Curtis,

On 2015-02-11 17:31, Curtis Rueden wrote:

I get the following errors when running with java 8
...

Works fine with java 7 and java 6.

Is this a known problem?

Java 8's javadoc tool is much more stringent than previously, due to the
addition of doclint checks [1].

Curtis, you forgot to say that the `#getSource(long)` probably needs to be replaced by a `#getSource(int, int)` because the class has only a `getSource` method with the latter signature.

But I agree that Javadocs that are obviously wrong should be fixed rather than switching off Javadoc generation in the Maven configuration.

Ciao,
Dscho


_______________________________________________
ImageJ-devel mailing list
[hidden email]
http://imagej.net/mailman/listinfo/imagej-devel
Reply | Threaded
Open this post in threaded view
|

Re: mvn javadoc problem with java 8

Tobias Pietzsch
Hi guys,

thanks for the comments!
I’ll just fix the javadoc, then.

best regards,
Tobias

On 11 Feb 2015, at 17:49, Curtis Rueden <[hidden email]> wrote:

Hi Dscho,

> Curtis, you forgot to say that the `#getSource(long)` probably needs
> to be replaced by a `#getSource(int, int)` because the class has only
> a `getSource` method with the latter signature.

Yeah, my reply's first draft basically said "just fix the invalid javadoc". Then I actually tried compiling with Java 8 and looked at what would need to be fixed. Over 100 errors, due to things like missing @param and @return and @throws. Fixing all of those things would actually be quite involved, especially across all 200+ repositories, so I begin to see the wisdom of working around it for now.

> But I agree that Javadocs that are obviously wrong should be fixed
> rather than switching off Javadoc generation in the Maven
> configuration.

Right, we definitely do not want to switch of javadoc generation. However, there is another way: <additionalparams>-D:doclint:none</additionalparams>. But it would need to go in a Java-8-specific profile. And again, I am ambivalent about doing it because in the long term, especially after we fully switch over to Java 8 some day, I would not want those checks disabled by default.

Regards,
Curtis

On Wed, Feb 11, 2015 at 10:36 AM, Johannes Schindelin <[hidden email]> wrote:
Hi Curtis,

On 2015-02-11 17:31, Curtis Rueden wrote:

I get the following errors when running with java 8
...

Works fine with java 7 and java 6.

Is this a known problem?

Java 8's javadoc tool is much more stringent than previously, due to the
addition of doclint checks [1].

Curtis, you forgot to say that the `#getSource(long)` probably needs to be replaced by a `#getSource(int, int)` because the class has only a `getSource` method with the latter signature.

But I agree that Javadocs that are obviously wrong should be fixed rather than switching off Javadoc generation in the Maven configuration.

Ciao,
Dscho



_______________________________________________
ImageJ-devel mailing list
[hidden email]
http://imagej.net/mailman/listinfo/imagej-devel

signature.asc (465 bytes) Download Attachment