maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Aurélien Baudet (JIRA) <>
Subject [jira] [Commented] (MJAVADOC-606) doclint fails checking references on dependencies with scope 'provided'
Date Tue, 28 May 2019 07:15:01 GMT


Aurélien Baudet commented on MJAVADOC-606:

Finally, I found the solution so I write it here for anyone else that has the same issue.

The dependencies in 'provided' scope are not included as stated in the documentation.
So in order to reference a class present in such a dependency, we just need to add it to the
javadoc classpath like this:

And now everything works fine !

> doclint fails checking references on dependencies with scope 'provided'
> -----------------------------------------------------------------------
>                 Key: MJAVADOC-606
>                 URL:
>             Project: Maven Javadoc Plugin
>          Issue Type: Improvement
>          Components: javadoc
>    Affects Versions: 3.1.0
>            Reporter: Aurélien Baudet
>            Priority: Major
> Referencing classes from a dependency with scope provided in javadoc using @link fails
due to doclint error. It happens during phase javadoc:aggregate. As written in the documentation,
the scope compile is used when generating javadoc: "Requires dependency resolution of artifacts
in scope: compile". However, there should be a way to reference external classes with scope
provided because:
> - sometimes we need to explain something that will happen if the dependency is present
or not
> - sometimes we need to explain features that are handled by external dependency provided
by external system (like Spring Boot or JavaEE server)
> For the moment, the only possibility is to disable "reference" group for doclint which
is bad because I can't ensure that all internal references are working.
> {code:xml}
> <dependency>
> 	<groupId>org.springframework.boot</groupId>
> 	<artifactId>spring-boot-autoconfigure</artifactId>
> 	<scope>provided</scope>
> </dependency>
> {code}
> {code:java}
> /**
>  * see {@link WebMvcAutoConfiguration} to ...
>  */
> class Foo {
> }
> {code}

This message was sent by Atlassian JIRA

View raw message