You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Mikael Petterson <mi...@ericsson.com> on 2014/01/14 13:14:21 UTC
How to include @inheritDoc from a dependent jar
Hi,
We are building a maven site that will contain javadoc for our AppX api ( jar file).
AppX depends on a few other jar files ( that we have built using maven) . One dependency jar contain an interface with javadoc and we have a class implementing it, in AppX.
AppX has @inheritDoc in in the javadoc so we don't have to rewrite it.
When I use the following under <report>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.8.1</version>
</plugin>
But when I open up the javadoc for my Appx and look at the class implementing the interface there is no javadoc. What am I missing?
Br,
//mike
RE: How to include @inheritDoc from a dependent jar
Posted by Mikael Petterson <mi...@ericsson.com>.
Thanks for reply Martin. See my comments below.
Br,
//mike
-----Original Message-----
From: Martin Gainty [mailto:mgainty@hotmail.com]
Sent: den 14 januari 2014 13:27
To: users@maven.apache.org
Subject: RE: How to include @inheritDoc from a dependent jar
> From: mikael.petterson@ericsson.com
> To: users@maven.apache.org
> Subject: How to include @inheritDoc from a dependent jar
> Date: Tue, 14 Jan 2014 12:14:21 +0000
>
> Hi,
>
> We are building a maven site that will contain javadoc for our AppX api ( jar file).
> AppX depends on a few other jar files ( that we have built using maven) . One dependency jar contain an interface with javadoc and we have a class implementing it, in AppX.
> AppX has @inheritDoc in in the javadoc so we don't have to rewrite it.
>
> When I use the following under <report>
>
> <plugin>
> <groupId>org.apache.maven.plugins</groupId>
> <artifactId>maven-javadoc-plugin</artifactId>
> <version>2.8.1</version>
> </plugin>
>
> But when I open up the javadoc for my Appx and look at the class implementing the interface there is no javadoc. What am I missing?
MG>@Inheritdoc pulls Javadoc comments @comment @author @param @throws
MG>@return from Implemented interface If you have none of the Javadoc
MG>tags in the corresponding base method of implemented interface then
MG>AppX class will not be able to 'inherit' those Javadoc attributes
I have the following:
Interface in dependency jar javadoc:
/**
* Deletes the object found at the specified location.
*
* @param Object any type of object
* @throws InvalidObjectException lots of text
* @throws NoSuchObjectException lots of text
*/
public void delete (Object object)throws throws InvalidObjectException, NoSuchObjectException;
Implementing class:
/**
* {@inheritDoc}
*/
@Override
public void delete(Object object) throws InvalidObjectException, NoSuchObjectException {
//implementation of delete
}
Is this correct or? Since this will not produce any javadoc for implementation of delete ( last code).
> Br,
>
> //mike
"The longest journey is the the journey inwards..Of him who has chosen his dentiny..Who has started upon his quest for the source of his being".... Dag Hammarskjold
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
RE: How to include @inheritDoc from a dependent jar
Posted by Mikael Petterson <mi...@ericsson.com>.
Hi,
Ok. I am almost done with it....
I have done the following in my pom.xml
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.8.1</version>
<reportSets>
<reportSet>
<id>aggregate</id>
<configuration>
<!-- switch on dependency-driven aggregation -->
<includeDependencySources>true</includeDependencySources>
<!-- include ONLY dependency of managed-objects -->
<dependencySourceIncludes>
<dependencySourceInclude> managed-objects:*</dependencySourceInclude>
</dependencySourceIncludes>
</configuration>
<reports>
<report>aggregate</report>
</reports>
</reportSet>
</reportSets>
</plugin>
<plugin>
When I run ' mvn clean site' it generates the javadoc and puts it in ../target/site/apidocs/
However when I run the 'mvn site:run' to check the site it seems not to load the new javadoc. Webserver still shows the old.
Any ideas why and how I can make it show the latest?
All hints appreciated!
Br,
//mike
-----Original Message-----
From: Mikael Petterson [mailto:mikael.petterson@ericsson.com]
Sent: den 16 januari 2014 15:04
To: Maven Users List
Subject: RE: How to include @inheritDoc from a dependent jar
Hi,
I realized one mistake. I use the following under build tag:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<configuration>
<includeDependencySources>true</includeDependencySources>
<dependencySourceIncludes>
<dependencySourceInclude>managed-objects:*</dependencySourceInclude>
</dependencySourceIncludes>
</configuration>
</plugin>
I run 'mvn clean install'
I can see that it is loading source files for all packages in my classes
Loading source files for package <my package1>...
Loading source files for package <my package2>...
Loading source files for package <my package3>...
Constructing Javadoc information...
Standard Doclet version 1.7.0_21
Building tree for all the packages and classes...
but not for depending classes!!
What am I missing?
Br
//mike
-----Original Message-----
From: Mikael Petterson [mailto:mikael.petterson@ericsson.com]
Sent: den 16 januari 2014 10:20
To: Maven Users List
Subject: RE: How to include @inheritDoc from a dependent jar
Ok so I have added all in my pom.xml
<reporting>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-project-info-reports-plugin</artifactId>
<version>2.4</version>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>taglist-maven-plugin</artifactId>
<version>2.4</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.8.1</version>
<configuration>
<includeTransitiveDependencySources>true</includeTransitiveDependencySources>
</configuration>
</plugin>
</reporting>
How can I make sure that the javadoc plugin is executed ( under reporting).
I tried:
'mvn site:run'
But I don't get the source of depending jars ( I know source is available for them).
Br,
//mikael
-----Original Message-----
From: Stuart McCulloch [mailto:mcculls@gmail.com]
Sent: den 15 januari 2014 12:38
To: Maven Users List
Subject: Re: How to include @inheritDoc from a dependent jar
On 15 Jan 2014, at 08:20, Mikael Petterson <mi...@ericsson.com> wrote:
> Hi,
>
> New try :-)
>
> I have the following:
>
> Interface in dependency jar javadoc:
>
> /**
> * Deletes the object found at the specified location.
> *
> * @param Object any type of object
> * @throws InvalidObjectException lots of text
> * @throws NoSuchObjectException lots of text
> */
> public void delete (Object object)throws throws
> InvalidObjectException, NoSuchObjectException;
>
> Implementing class:
>
> /**
> * {@inheritDoc}
> */
> @Override
> public void delete(Object object) throws InvalidObjectException, NoSuchObjectException {
> //implementation of delete
> }
>
> Is this correct or? Since this will not produce any javadoc for implementation of delete ( last code).
>
> Do I need to do anything special in the maven javadoc plugin?
The javadoc tool works primarily from source, and by default the maven javadoc plugin doesn't include the sources of dependencies - which is why @inheritDoc doesn't include the javadoc from the dependency.
You can tell the javadoc plugin to include the sources of dependencies with:
<includeDependencySources>true</includeDependencySources>
and include the sources of transitive dependencies with:
<includeTransitiveDependencySources>true</includeTransitiveDependencySources>
You can also use dependencySourceExcludes / dependencySourceIncludes to control which particular sources get pulled in
( this assumes that the dependency sources - typically produced by the maven source plugin - are available in the local/remote repository )
> Br.
>
> //mike
>
> -----Original Message-----
> From: Martin Gainty [mailto:mgainty@hotmail.com]
> Sent: den 14 januari 2014 13:27
> To: users@maven.apache.org
> Subject: RE: How to include @inheritDoc from a dependent jar
>
>
>
>
>> From: mikael.petterson@ericsson.com
>> To: users@maven.apache.org
>> Subject: How to include @inheritDoc from a dependent jar
>> Date: Tue, 14 Jan 2014 12:14:21 +0000
>>
>> Hi,
>>
>> We are building a maven site that will contain javadoc for our AppX api ( jar file).
>> AppX depends on a few other jar files ( that we have built using maven) . One dependency jar contain an interface with javadoc and we have a class implementing it, in AppX.
>> AppX has @inheritDoc in in the javadoc so we don't have to rewrite it.
>>
>> When I use the following under <report>
>>
>> <plugin>
>> <groupId>org.apache.maven.plugins</groupId>
>> <artifactId>maven-javadoc-plugin</artifactId>
>> <version>2.8.1</version>
>> </plugin>
>>
>> But when I open up the javadoc for my Appx and look at the class implementing the interface there is no javadoc. What am I missing?
>
> MG>@Inheritdoc pulls Javadoc comments @comment @author @param @throws
> MG>@return from Implemented interface If you have none of the Javadoc
> MG>tags in the corresponding base method of implemented interface then
> MG>AppX class will not be able to 'inherit' those Javadoc attributes
>
>> Br,
>>
>> //mike
> "The longest journey is the the journey inwards..Of him who has chosen
> his dentiny..Who has started upon his quest for the source of his
> being".... Dag Hammarskjold
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
FW: How to include @inheritDoc from a dependent jar
Posted by Mikael Petterson <mi...@ericsson.com>.
Hi,
Just checking one last time if someone has input about this or knows whom to contact.
I have done the following in my pom.xml
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.8.1</version>
<reportSets>
<reportSet>
<id>aggregate</id>
<configuration>
<!-- switch on dependency-driven aggregation -->
<includeDependencySources>true</includeDependencySources>
<!-- include ONLY dependency of managed-objects -->
<dependencySourceIncludes>
<dependencySourceInclude> managed-objects:*</dependencySourceInclude>
</dependencySourceIncludes>
</configuration>
<reports>
<report>aggregate</report>
</reports>
</reportSet>
</reportSets>
</plugin>
<plugin>
When I run ' mvn clean site' it generates the javadoc and puts it in ../target/site/apidocs/
However when I run the 'mvn site:run' to check the site it seems not to load the new javadoc. Webserver still shows the old.
Any ideas why and how I can make it show the latest?
All hints appreciated!
Br,
//mike
-----Original Message-----
From: Mikael Petterson [mailto:mikael.petterson@ericsson.com]
Sent: den 16 januari 2014 15:04
To: Maven Users List
Subject: RE: How to include @inheritDoc from a dependent jar
Hi,
I realized one mistake. I use the following under build tag:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<configuration>
<includeDependencySources>true</includeDependencySources>
<dependencySourceIncludes>
<dependencySourceInclude>managed-objects:*</dependencySourceInclude>
</dependencySourceIncludes>
</configuration>
</plugin>
I run 'mvn clean install'
I can see that it is loading source files for all packages in my classes
Loading source files for package <my package1>...
Loading source files for package <my package2>...
Loading source files for package <my package3>...
Constructing Javadoc information...
Standard Doclet version 1.7.0_21
Building tree for all the packages and classes...
but not for depending classes!!
What am I missing?
Br
//mike
-----Original Message-----
From: Mikael Petterson [mailto:mikael.petterson@ericsson.com]
Sent: den 16 januari 2014 10:20
To: Maven Users List
Subject: RE: How to include @inheritDoc from a dependent jar
Ok so I have added all in my pom.xml
<reporting>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-project-info-reports-plugin</artifactId>
<version>2.4</version>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>taglist-maven-plugin</artifactId>
<version>2.4</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.8.1</version>
<configuration>
<includeTransitiveDependencySources>true</includeTransitiveDependencySources>
</configuration>
</plugin>
</reporting>
How can I make sure that the javadoc plugin is executed ( under reporting).
I tried:
'mvn site:run'
But I don't get the source of depending jars ( I know source is available for them).
Br,
//mikael
-----Original Message-----
From: Stuart McCulloch [mailto:mcculls@gmail.com]
Sent: den 15 januari 2014 12:38
To: Maven Users List
Subject: Re: How to include @inheritDoc from a dependent jar
On 15 Jan 2014, at 08:20, Mikael Petterson <mi...@ericsson.com> wrote:
> Hi,
>
> New try :-)
>
> I have the following:
>
> Interface in dependency jar javadoc:
>
> /**
> * Deletes the object found at the specified location.
> *
> * @param Object any type of object
> * @throws InvalidObjectException lots of text
> * @throws NoSuchObjectException lots of text
> */
> public void delete (Object object)throws throws
> InvalidObjectException, NoSuchObjectException;
>
> Implementing class:
>
> /**
> * {@inheritDoc}
> */
> @Override
> public void delete(Object object) throws InvalidObjectException, NoSuchObjectException {
> //implementation of delete
> }
>
> Is this correct or? Since this will not produce any javadoc for implementation of delete ( last code).
>
> Do I need to do anything special in the maven javadoc plugin?
The javadoc tool works primarily from source, and by default the maven javadoc plugin doesn't include the sources of dependencies - which is why @inheritDoc doesn't include the javadoc from the dependency.
You can tell the javadoc plugin to include the sources of dependencies with:
<includeDependencySources>true</includeDependencySources>
and include the sources of transitive dependencies with:
<includeTransitiveDependencySources>true</includeTransitiveDependencySources>
You can also use dependencySourceExcludes / dependencySourceIncludes to control which particular sources get pulled in
( this assumes that the dependency sources - typically produced by the maven source plugin - are available in the local/remote repository )
> Br.
>
> //mike
>
> -----Original Message-----
> From: Martin Gainty [mailto:mgainty@hotmail.com]
> Sent: den 14 januari 2014 13:27
> To: users@maven.apache.org
> Subject: RE: How to include @inheritDoc from a dependent jar
>
>
>
>
>> From: mikael.petterson@ericsson.com
>> To: users@maven.apache.org
>> Subject: How to include @inheritDoc from a dependent jar
>> Date: Tue, 14 Jan 2014 12:14:21 +0000
>>
>> Hi,
>>
>> We are building a maven site that will contain javadoc for our AppX api ( jar file).
>> AppX depends on a few other jar files ( that we have built using maven) . One dependency jar contain an interface with javadoc and we have a class implementing it, in AppX.
>> AppX has @inheritDoc in in the javadoc so we don't have to rewrite it.
>>
>> When I use the following under <report>
>>
>> <plugin>
>> <groupId>org.apache.maven.plugins</groupId>
>> <artifactId>maven-javadoc-plugin</artifactId>
>> <version>2.8.1</version>
>> </plugin>
>>
>> But when I open up the javadoc for my Appx and look at the class implementing the interface there is no javadoc. What am I missing?
>
> MG>@Inheritdoc pulls Javadoc comments @comment @author @param @throws
> MG>@return from Implemented interface If you have none of the Javadoc
> MG>tags in the corresponding base method of implemented interface then
> MG>AppX class will not be able to 'inherit' those Javadoc attributes
>
>> Br,
>>
>> //mike
> "The longest journey is the the journey inwards..Of him who has chosen
> his dentiny..Who has started upon his quest for the source of his
> being".... Dag Hammarskjold
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
RE: How to include @inheritDoc from a dependent jar
Posted by Mikael Petterson <mi...@ericsson.com>.
Hi,
I realized one mistake. I use the following under build tag:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<configuration>
<includeDependencySources>true</includeDependencySources>
<dependencySourceIncludes>
<dependencySourceInclude>managed-objects:*</dependencySourceInclude>
</dependencySourceIncludes>
</configuration>
</plugin>
I run 'mvn clean install'
I can see that it is loading source files for all packages in my classes
Loading source files for package <my package1>...
Loading source files for package <my package2>...
Loading source files for package <my package3>...
Constructing Javadoc information...
Standard Doclet version 1.7.0_21
Building tree for all the packages and classes...
but not for depending classes!!
What am I missing?
Br
//mike
-----Original Message-----
From: Mikael Petterson [mailto:mikael.petterson@ericsson.com]
Sent: den 16 januari 2014 10:20
To: Maven Users List
Subject: RE: How to include @inheritDoc from a dependent jar
Ok so I have added all in my pom.xml
<reporting>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-project-info-reports-plugin</artifactId>
<version>2.4</version>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>taglist-maven-plugin</artifactId>
<version>2.4</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.8.1</version>
<configuration>
<includeTransitiveDependencySources>true</includeTransitiveDependencySources>
</configuration>
</plugin>
</reporting>
How can I make sure that the javadoc plugin is executed ( under reporting).
I tried:
'mvn site:run'
But I don't get the source of depending jars ( I know source is available for them).
Br,
//mikael
-----Original Message-----
From: Stuart McCulloch [mailto:mcculls@gmail.com]
Sent: den 15 januari 2014 12:38
To: Maven Users List
Subject: Re: How to include @inheritDoc from a dependent jar
On 15 Jan 2014, at 08:20, Mikael Petterson <mi...@ericsson.com> wrote:
> Hi,
>
> New try :-)
>
> I have the following:
>
> Interface in dependency jar javadoc:
>
> /**
> * Deletes the object found at the specified location.
> *
> * @param Object any type of object
> * @throws InvalidObjectException lots of text
> * @throws NoSuchObjectException lots of text
> */
> public void delete (Object object)throws throws
> InvalidObjectException, NoSuchObjectException;
>
> Implementing class:
>
> /**
> * {@inheritDoc}
> */
> @Override
> public void delete(Object object) throws InvalidObjectException, NoSuchObjectException {
> //implementation of delete
> }
>
> Is this correct or? Since this will not produce any javadoc for implementation of delete ( last code).
>
> Do I need to do anything special in the maven javadoc plugin?
The javadoc tool works primarily from source, and by default the maven javadoc plugin doesn't include the sources of dependencies - which is why @inheritDoc doesn't include the javadoc from the dependency.
You can tell the javadoc plugin to include the sources of dependencies with:
<includeDependencySources>true</includeDependencySources>
and include the sources of transitive dependencies with:
<includeTransitiveDependencySources>true</includeTransitiveDependencySources>
You can also use dependencySourceExcludes / dependencySourceIncludes to control which particular sources get pulled in
( this assumes that the dependency sources - typically produced by the maven source plugin - are available in the local/remote repository )
> Br.
>
> //mike
>
> -----Original Message-----
> From: Martin Gainty [mailto:mgainty@hotmail.com]
> Sent: den 14 januari 2014 13:27
> To: users@maven.apache.org
> Subject: RE: How to include @inheritDoc from a dependent jar
>
>
>
>
>> From: mikael.petterson@ericsson.com
>> To: users@maven.apache.org
>> Subject: How to include @inheritDoc from a dependent jar
>> Date: Tue, 14 Jan 2014 12:14:21 +0000
>>
>> Hi,
>>
>> We are building a maven site that will contain javadoc for our AppX api ( jar file).
>> AppX depends on a few other jar files ( that we have built using maven) . One dependency jar contain an interface with javadoc and we have a class implementing it, in AppX.
>> AppX has @inheritDoc in in the javadoc so we don't have to rewrite it.
>>
>> When I use the following under <report>
>>
>> <plugin>
>> <groupId>org.apache.maven.plugins</groupId>
>> <artifactId>maven-javadoc-plugin</artifactId>
>> <version>2.8.1</version>
>> </plugin>
>>
>> But when I open up the javadoc for my Appx and look at the class implementing the interface there is no javadoc. What am I missing?
>
> MG>@Inheritdoc pulls Javadoc comments @comment @author @param @throws
> MG>@return from Implemented interface If you have none of the Javadoc
> MG>tags in the corresponding base method of implemented interface then
> MG>AppX class will not be able to 'inherit' those Javadoc attributes
>
>> Br,
>>
>> //mike
> "The longest journey is the the journey inwards..Of him who has chosen
> his dentiny..Who has started upon his quest for the source of his
> being".... Dag Hammarskjold
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
RE: How to include @inheritDoc from a dependent jar
Posted by Mikael Petterson <mi...@ericsson.com>.
Ok so I have added all in my pom.xml
<reporting>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-project-info-reports-plugin</artifactId>
<version>2.4</version>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>taglist-maven-plugin</artifactId>
<version>2.4</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.8.1</version>
<configuration>
<includeTransitiveDependencySources>true</includeTransitiveDependencySources>
</configuration>
</plugin>
</reporting>
How can I make sure that the javadoc plugin is executed ( under reporting).
I tried:
'mvn site:run'
But I don't get the source of depending jars ( I know source is available for them).
Br,
//mikael
-----Original Message-----
From: Stuart McCulloch [mailto:mcculls@gmail.com]
Sent: den 15 januari 2014 12:38
To: Maven Users List
Subject: Re: How to include @inheritDoc from a dependent jar
On 15 Jan 2014, at 08:20, Mikael Petterson <mi...@ericsson.com> wrote:
> Hi,
>
> New try :-)
>
> I have the following:
>
> Interface in dependency jar javadoc:
>
> /**
> * Deletes the object found at the specified location.
> *
> * @param Object any type of object
> * @throws InvalidObjectException lots of text
> * @throws NoSuchObjectException lots of text
> */
> public void delete (Object object)throws throws
> InvalidObjectException, NoSuchObjectException;
>
> Implementing class:
>
> /**
> * {@inheritDoc}
> */
> @Override
> public void delete(Object object) throws InvalidObjectException, NoSuchObjectException {
> //implementation of delete
> }
>
> Is this correct or? Since this will not produce any javadoc for implementation of delete ( last code).
>
> Do I need to do anything special in the maven javadoc plugin?
The javadoc tool works primarily from source, and by default the maven javadoc plugin doesn't include the sources of dependencies - which is why @inheritDoc doesn't include the javadoc from the dependency.
You can tell the javadoc plugin to include the sources of dependencies with:
<includeDependencySources>true</includeDependencySources>
and include the sources of transitive dependencies with:
<includeTransitiveDependencySources>true</includeTransitiveDependencySources>
You can also use dependencySourceExcludes / dependencySourceIncludes to control which particular sources get pulled in
( this assumes that the dependency sources - typically produced by the maven source plugin - are available in the local/remote repository )
> Br.
>
> //mike
>
> -----Original Message-----
> From: Martin Gainty [mailto:mgainty@hotmail.com]
> Sent: den 14 januari 2014 13:27
> To: users@maven.apache.org
> Subject: RE: How to include @inheritDoc from a dependent jar
>
>
>
>
>> From: mikael.petterson@ericsson.com
>> To: users@maven.apache.org
>> Subject: How to include @inheritDoc from a dependent jar
>> Date: Tue, 14 Jan 2014 12:14:21 +0000
>>
>> Hi,
>>
>> We are building a maven site that will contain javadoc for our AppX api ( jar file).
>> AppX depends on a few other jar files ( that we have built using maven) . One dependency jar contain an interface with javadoc and we have a class implementing it, in AppX.
>> AppX has @inheritDoc in in the javadoc so we don't have to rewrite it.
>>
>> When I use the following under <report>
>>
>> <plugin>
>> <groupId>org.apache.maven.plugins</groupId>
>> <artifactId>maven-javadoc-plugin</artifactId>
>> <version>2.8.1</version>
>> </plugin>
>>
>> But when I open up the javadoc for my Appx and look at the class implementing the interface there is no javadoc. What am I missing?
>
> MG>@Inheritdoc pulls Javadoc comments @comment @author @param @throws
> MG>@return from Implemented interface If you have none of the Javadoc
> MG>tags in the corresponding base method of implemented interface then
> MG>AppX class will not be able to 'inherit' those Javadoc attributes
>
>> Br,
>>
>> //mike
> "The longest journey is the the journey inwards..Of him who has chosen
> his dentiny..Who has started upon his quest for the source of his
> being".... Dag Hammarskjold
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: How to include @inheritDoc from a dependent jar
Posted by Stuart McCulloch <mc...@gmail.com>.
On 15 Jan 2014, at 08:20, Mikael Petterson <mi...@ericsson.com> wrote:
> Hi,
>
> New try :-)
>
> I have the following:
>
> Interface in dependency jar javadoc:
>
> /**
> * Deletes the object found at the specified location.
> *
> * @param Object any type of object
> * @throws InvalidObjectException lots of text
> * @throws NoSuchObjectException lots of text
> */
> public void delete (Object object)throws throws InvalidObjectException, NoSuchObjectException;
>
> Implementing class:
>
> /**
> * {@inheritDoc}
> */
> @Override
> public void delete(Object object) throws InvalidObjectException, NoSuchObjectException {
> //implementation of delete
> }
>
> Is this correct or? Since this will not produce any javadoc for implementation of delete ( last code).
>
> Do I need to do anything special in the maven javadoc plugin?
The javadoc tool works primarily from source, and by default the maven javadoc plugin doesn’t include the sources of dependencies - which is why @inheritDoc doesn’t include the javadoc from the dependency.
You can tell the javadoc plugin to include the sources of dependencies with:
<includeDependencySources>true</includeDependencySources>
and include the sources of transitive dependencies with:
<includeTransitiveDependencySources>true</includeTransitiveDependencySources>
You can also use dependencySourceExcludes / dependencySourceIncludes to control which particular sources get pulled in
( this assumes that the dependency sources - typically produced by the maven source plugin - are available in the local/remote repository )
> Br.
>
> //mike
>
> -----Original Message-----
> From: Martin Gainty [mailto:mgainty@hotmail.com]
> Sent: den 14 januari 2014 13:27
> To: users@maven.apache.org
> Subject: RE: How to include @inheritDoc from a dependent jar
>
>
>
>
>> From: mikael.petterson@ericsson.com
>> To: users@maven.apache.org
>> Subject: How to include @inheritDoc from a dependent jar
>> Date: Tue, 14 Jan 2014 12:14:21 +0000
>>
>> Hi,
>>
>> We are building a maven site that will contain javadoc for our AppX api ( jar file).
>> AppX depends on a few other jar files ( that we have built using maven) . One dependency jar contain an interface with javadoc and we have a class implementing it, in AppX.
>> AppX has @inheritDoc in in the javadoc so we don't have to rewrite it.
>>
>> When I use the following under <report>
>>
>> <plugin>
>> <groupId>org.apache.maven.plugins</groupId>
>> <artifactId>maven-javadoc-plugin</artifactId>
>> <version>2.8.1</version>
>> </plugin>
>>
>> But when I open up the javadoc for my Appx and look at the class implementing the interface there is no javadoc. What am I missing?
>
> MG>@Inheritdoc pulls Javadoc comments @comment @author @param @throws
> MG>@return from Implemented interface If you have none of the Javadoc
> MG>tags in the corresponding base method of implemented interface then
> MG>AppX class will not be able to 'inherit' those Javadoc attributes
>
>> Br,
>>
>> //mike
> "The longest journey is the the journey inwards..Of him who has chosen his dentiny..Who has started upon his quest for the source of his being".... Dag Hammarskjold
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
FW: How to include @inheritDoc from a dependent jar
Posted by Mikael Petterson <mi...@ericsson.com>.
Hi,
New try :-)
I have the following:
Interface in dependency jar javadoc:
/**
* Deletes the object found at the specified location.
*
* @param Object any type of object
* @throws InvalidObjectException lots of text
* @throws NoSuchObjectException lots of text
*/
public void delete (Object object)throws throws InvalidObjectException, NoSuchObjectException;
Implementing class:
/**
* {@inheritDoc}
*/
@Override
public void delete(Object object) throws InvalidObjectException, NoSuchObjectException {
//implementation of delete
}
Is this correct or? Since this will not produce any javadoc for implementation of delete ( last code).
Do I need to do anything special in the maven javadoc plugin?
Br.
//mike
-----Original Message-----
From: Martin Gainty [mailto:mgainty@hotmail.com]
Sent: den 14 januari 2014 13:27
To: users@maven.apache.org
Subject: RE: How to include @inheritDoc from a dependent jar
> From: mikael.petterson@ericsson.com
> To: users@maven.apache.org
> Subject: How to include @inheritDoc from a dependent jar
> Date: Tue, 14 Jan 2014 12:14:21 +0000
>
> Hi,
>
> We are building a maven site that will contain javadoc for our AppX api ( jar file).
> AppX depends on a few other jar files ( that we have built using maven) . One dependency jar contain an interface with javadoc and we have a class implementing it, in AppX.
> AppX has @inheritDoc in in the javadoc so we don't have to rewrite it.
>
> When I use the following under <report>
>
> <plugin>
> <groupId>org.apache.maven.plugins</groupId>
> <artifactId>maven-javadoc-plugin</artifactId>
> <version>2.8.1</version>
> </plugin>
>
> But when I open up the javadoc for my Appx and look at the class implementing the interface there is no javadoc. What am I missing?
MG>@Inheritdoc pulls Javadoc comments @comment @author @param @throws
MG>@return from Implemented interface If you have none of the Javadoc
MG>tags in the corresponding base method of implemented interface then
MG>AppX class will not be able to 'inherit' those Javadoc attributes
> Br,
>
> //mike
"The longest journey is the the journey inwards..Of him who has chosen his dentiny..Who has started upon his quest for the source of his being".... Dag Hammarskjold
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
RE: How to include @inheritDoc from a dependent jar
Posted by Mikael Petterson <mi...@ericsson.com>.
Hi,
New try :-)
I have the following:
Interface in dependency jar javadoc:
/**
* Deletes the object found at the specified location.
*
* @param Object any type of object
* @throws InvalidObjectException lots of text
* @throws NoSuchObjectException lots of text
*/
public void delete (Object object)throws throws InvalidObjectException, NoSuchObjectException;
Implementing class:
/**
* {@inheritDoc}
*/
@Override
public void delete(Object object) throws InvalidObjectException, NoSuchObjectException {
//implementation of delete
}
Is this correct or? Since this will not produce any javadoc for implementation of delete ( last code).
Br.
//mike
-----Original Message-----
From: Martin Gainty [mailto:mgainty@hotmail.com]
Sent: den 14 januari 2014 13:27
To: users@maven.apache.org
Subject: RE: How to include @inheritDoc from a dependent jar
> From: mikael.petterson@ericsson.com
> To: users@maven.apache.org
> Subject: How to include @inheritDoc from a dependent jar
> Date: Tue, 14 Jan 2014 12:14:21 +0000
>
> Hi,
>
> We are building a maven site that will contain javadoc for our AppX api ( jar file).
> AppX depends on a few other jar files ( that we have built using maven) . One dependency jar contain an interface with javadoc and we have a class implementing it, in AppX.
> AppX has @inheritDoc in in the javadoc so we don't have to rewrite it.
>
> When I use the following under <report>
>
> <plugin>
> <groupId>org.apache.maven.plugins</groupId>
> <artifactId>maven-javadoc-plugin</artifactId>
> <version>2.8.1</version>
> </plugin>
>
> But when I open up the javadoc for my Appx and look at the class implementing the interface there is no javadoc. What am I missing?
MG>@Inheritdoc pulls Javadoc comments @comment @author @param @throws
MG>@return from Implemented interface If you have none of the Javadoc
MG>tags in the corresponding base method of implemented interface then
MG>AppX class will not be able to 'inherit' those Javadoc attributes
> Br,
>
> //mike
"The longest journey is the the journey inwards..Of him who has chosen his dentiny..Who has started upon his quest for the source of his being".... Dag Hammarskjold
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
RE: How to include @inheritDoc from a dependent jar
Posted by Martin Gainty <mg...@hotmail.com>.
> From: mikael.petterson@ericsson.com
> To: users@maven.apache.org
> Subject: How to include @inheritDoc from a dependent jar
> Date: Tue, 14 Jan 2014 12:14:21 +0000
>
> Hi,
>
> We are building a maven site that will contain javadoc for our AppX api ( jar file).
> AppX depends on a few other jar files ( that we have built using maven) . One dependency jar contain an interface with javadoc and we have a class implementing it, in AppX.
> AppX has @inheritDoc in in the javadoc so we don't have to rewrite it.
>
> When I use the following under <report>
>
> <plugin>
> <groupId>org.apache.maven.plugins</groupId>
> <artifactId>maven-javadoc-plugin</artifactId>
> <version>2.8.1</version>
> </plugin>
>
> But when I open up the javadoc for my Appx and look at the class implementing the interface there is no javadoc. What am I missing?
MG>@Inheritdoc pulls Javadoc comments @comment @author @param @throws @return from Implemented interface
MG>If you have none of the Javadoc tags in the corresponding base method of implemented interface
MG>then AppX class will not be able to 'inherit' those Javadoc attributes
> Br,
>
> //mike
"The longest journey is the the journey inwards..Of him who has chosen his dentiny..Who has started upon his quest for the source of his being".... Dag Hammarskjold