You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Da...@SunGardEBS.com on 2007/06/20 22:59:27 UTC

"-javadoc" jars

Hi Everyone,

Is there anyway to include the "-javadoc" jars created  by the javadoc 
plugin in a war or ear with maven 2?

Thanks,

David Williams
205-271-6159

Re: "-javadoc" jars

Posted by Tim Kettler <ti...@udo.edu>.
David,

the dependency:copy-dependencies goal uses the project dependencies, the 
dependency:copy goal uses a list of dependencies defined in the plugin 
configuration (See [1] for an example). If you want the javadoc jar 
unpacked to the target location just use the dependency:unpack goal.

The missing classifer description is a bug in the documentation that 
should be fixed. A classifier attribute *is* present in the ArtifactItem 
class [2].

-Tim

[1] 
http://maven.apache.org/plugins/maven-dependency-plugin/examples/copying-artifacts.html
[2] 
http://svn.apache.org/viewvc/maven/plugins/tags/maven-dependency-plugin-2.0-alpha-4/src/main/java/org/apache/maven/plugin/dependency/fromConfiguration/ArtifactItem.java?view=markup

DavidWilliams@SunGardEBS.com schrieb:
> Tim,
> 
> I read the maven-dependency-plugin over and how would you tell the plugin 
> to copy the javadoc jar and not the project jar?  I did not see 
> <classifier> as an option. 
> 
> From the maven-dependency-plugin website
> Collection of ArtifactItems to work on. (ArtifactItem contains groupId, 
> artifactId, version, type, location, destFile, markerFile and overwrite.) 
> 
> Thanks,
> 
> David
> 
> 
> 
> Tim Kettler <ti...@udo.edu> 
> 06/21/2007 09:09 AM
> Please respond to
> "Maven Users List" <us...@maven.apache.org>
> 
> 
> To
> Maven Users List <us...@maven.apache.org>
> cc
> 
> Subject
> Re: "-javadoc" jars
> 
> 
> 
> 
> 
> 
> To add/clarify my previous mail:
> 
> Adding the javadoc dependency to the <procject/><dependencies/> section 
> is probably not what you want (this would add the javadoc jar to the 
> compilation classpath as well).
> 
> Instead I would use the maven-dependency-plugin [1] to copy the jar [2] 
> to the right location in the target directory so that it gets jarred up 
> to the final war.
> 
> [1] http://maven.apache.org/plugins/maven-dependency-plugin/
> [2] http://maven.apache.org/plugins/maven-dependency-plugin/copy-mojo.html
> 
> -Tim
> 
> Tim Kettler schrieb:
>> No, with <jarOutputDirectory/> you just tell the plugin where to create 
>> the javadoc jar. This will not help you to access it as a dependency 
>> from a repository.
>>
>> However, your actual problem is solved easily. It's no problem at all 
>> that the javadoc jar is deployed alongsite the main artifact in the same 
> 
>> directory. This is by design! These auxiliary artifacts are distinct 
>> from the main artifact in the directory by the "-{classifier}.jar" part 
>> of their name. To declare a dependency to them just add the classifier 
>> part to the dependency description in your pom.
>>
>> For example:
>>
>> <dependency>
>>   <group>mygroup</group>
>>   <artifact>myartifact</artifact>
>>   <version>0.1</version>
>>   <classifier>javadoc</classifier>
>> </dependency>
>>
>> -Tim
>>
>> DavidWilliams@SunGardEBS.com schrieb:
>>> Tim
>>>
>>> I haven't.  I missed that option while looking at all those other 
>>> options. = )  What I would like to do is be able to list these javadoc 
>>> jars as a dependency of another project.  However they are installed 
>>> to the same directory as the project jar.  I'm thinking I need them in 
>>> a separate directory so I can grab them as a dependency.  Hopefully 
>>> the jarOutputDirectory will help me do this.  If anyone knows of a 
>>> different way, please let me know.
>>>
>>> Thanks for your response,
>>>
>>> David
>>>
>>>
>>>
>>> Tim Kettler <ti...@udo.edu> 06/21/2007 12:27 AM
>>> Please respond to
>>> "Maven Users List" <us...@maven.apache.org>
>>>
>>>
>>> To
>>> Maven Users List <us...@maven.apache.org>
>>> cc
>>>
>>> Subject
>>> Re: "-javadoc" jars
>>>
>>>
>>>
>>>
>>>
>>>
>>> Hi,
>>>
>>> have you tried the 'jarOutputDirectory' config parameter found in the 
>>> plugin documentation [1]?
>>>
>>> -Tim
>>>
>>> [1] http://maven.apache.org/plugins/maven-javadoc-plugin/jar-mojo.html
>>>
>>> DavidWilliams@SunGardEBS.com schrieb:
>>>> Hi Everyone,
>>>>
>>>> Is there anyway to include the "-javadoc" jars created  by the 
>>>> javadoc plugin in a war or ear with maven 2?
>>>>
>>>> Thanks,
>>>>
>>>> David Williams
>>>> 205-271-6159
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>> For additional commands, e-mail: users-help@maven.apache.org
>>>
>>>
>>> _____________________________________
>>> CONFIDENTIALITY:  This email (including any attachments) may contain 
>>> confidential, proprietary and privileged information, and unauthorized 
>>> disclosure or use is prohibited.  If you received this email in error, 
>>> please notify the sender and delete this email from your system. 
>>> Thank you.
>>>
>>
>> ---------------------------------------------------------------------
>> 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
> 
> 
> _____________________________________
> CONFIDENTIALITY:  This email (including any attachments) may contain 
> confidential, proprietary and privileged information, and unauthorized 
> disclosure or use is prohibited.  If you received this email in error, 
> please notify the sender and delete this email from your system.  Thank 
> you.
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: "-javadoc" jars

Posted by Da...@SunGardEBS.com.
Tim,

I read the maven-dependency-plugin over and how would you tell the plugin 
to copy the javadoc jar and not the project jar?  I did not see 
<classifier> as an option. 

>From the maven-dependency-plugin website
Collection of ArtifactItems to work on. (ArtifactItem contains groupId, 
artifactId, version, type, location, destFile, markerFile and overwrite.) 

Thanks,

David



Tim Kettler <ti...@udo.edu> 
06/21/2007 09:09 AM
Please respond to
"Maven Users List" <us...@maven.apache.org>


To
Maven Users List <us...@maven.apache.org>
cc

Subject
Re: "-javadoc" jars






To add/clarify my previous mail:

Adding the javadoc dependency to the <procject/><dependencies/> section 
is probably not what you want (this would add the javadoc jar to the 
compilation classpath as well).

Instead I would use the maven-dependency-plugin [1] to copy the jar [2] 
to the right location in the target directory so that it gets jarred up 
to the final war.

[1] http://maven.apache.org/plugins/maven-dependency-plugin/
[2] http://maven.apache.org/plugins/maven-dependency-plugin/copy-mojo.html

-Tim

Tim Kettler schrieb:
> No, with <jarOutputDirectory/> you just tell the plugin where to create 
> the javadoc jar. This will not help you to access it as a dependency 
> from a repository.
> 
> However, your actual problem is solved easily. It's no problem at all 
> that the javadoc jar is deployed alongsite the main artifact in the same 

> directory. This is by design! These auxiliary artifacts are distinct 
> from the main artifact in the directory by the "-{classifier}.jar" part 
> of their name. To declare a dependency to them just add the classifier 
> part to the dependency description in your pom.
> 
> For example:
> 
> <dependency>
>   <group>mygroup</group>
>   <artifact>myartifact</artifact>
>   <version>0.1</version>
>   <classifier>javadoc</classifier>
> </dependency>
> 
> -Tim
> 
> DavidWilliams@SunGardEBS.com schrieb:
>> Tim
>>
>> I haven't.  I missed that option while looking at all those other 
>> options. = )  What I would like to do is be able to list these javadoc 
>> jars as a dependency of another project.  However they are installed 
>> to the same directory as the project jar.  I'm thinking I need them in 
>> a separate directory so I can grab them as a dependency.  Hopefully 
>> the jarOutputDirectory will help me do this.  If anyone knows of a 
>> different way, please let me know.
>>
>> Thanks for your response,
>>
>> David
>>
>>
>>
>> Tim Kettler <ti...@udo.edu> 06/21/2007 12:27 AM
>> Please respond to
>> "Maven Users List" <us...@maven.apache.org>
>>
>>
>> To
>> Maven Users List <us...@maven.apache.org>
>> cc
>>
>> Subject
>> Re: "-javadoc" jars
>>
>>
>>
>>
>>
>>
>> Hi,
>>
>> have you tried the 'jarOutputDirectory' config parameter found in the 
>> plugin documentation [1]?
>>
>> -Tim
>>
>> [1] http://maven.apache.org/plugins/maven-javadoc-plugin/jar-mojo.html
>>
>> DavidWilliams@SunGardEBS.com schrieb:
>>> Hi Everyone,
>>>
>>> Is there anyway to include the "-javadoc" jars created  by the 
>>> javadoc plugin in a war or ear with maven 2?
>>>
>>> Thanks,
>>>
>>> David Williams
>>> 205-271-6159
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>
>>
>> _____________________________________
>> CONFIDENTIALITY:  This email (including any attachments) may contain 
>> confidential, proprietary and privileged information, and unauthorized 
>> disclosure or use is prohibited.  If you received this email in error, 
>> please notify the sender and delete this email from your system. 
>> Thank you.
>>
> 
> 
> ---------------------------------------------------------------------
> 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


_____________________________________
CONFIDENTIALITY:  This email (including any attachments) may contain 
confidential, proprietary and privileged information, and unauthorized 
disclosure or use is prohibited.  If you received this email in error, 
please notify the sender and delete this email from your system.  Thank 
you.

Re: "-javadoc" jars

Posted by Tim Kettler <ti...@udo.edu>.
To add/clarify my previous mail:

Adding the javadoc dependency to the <procject/><dependencies/> section 
is probably not what you want (this would add the javadoc jar to the 
compilation classpath as well).

Instead I would use the maven-dependency-plugin [1] to copy the jar [2] 
to the right location in the target directory so that it gets jarred up 
to the final war.

[1] http://maven.apache.org/plugins/maven-dependency-plugin/
[2] http://maven.apache.org/plugins/maven-dependency-plugin/copy-mojo.html

-Tim

Tim Kettler schrieb:
> No, with <jarOutputDirectory/> you just tell the plugin where to create 
> the javadoc jar. This will not help you to access it as a dependency 
> from a repository.
> 
> However, your actual problem is solved easily. It's no problem at all 
> that the javadoc jar is deployed alongsite the main artifact in the same 
> directory. This is by design! These auxiliary artifacts are distinct 
> from the main artifact in the directory by the "-{classifier}.jar" part 
> of their name. To declare a dependency to them just add the classifier 
> part to the dependency description in your pom.
> 
> For example:
> 
> <dependency>
>   <group>mygroup</group>
>   <artifact>myartifact</artifact>
>   <version>0.1</version>
>   <classifier>javadoc</classifier>
> </dependency>
> 
> -Tim
> 
> DavidWilliams@SunGardEBS.com schrieb:
>> Tim
>>
>> I haven't.  I missed that option while looking at all those other 
>> options. = )  What I would like to do is be able to list these javadoc 
>> jars as a dependency of another project.  However they are installed 
>> to the same directory as the project jar.  I'm thinking I need them in 
>> a separate directory so I can grab them as a dependency.  Hopefully 
>> the jarOutputDirectory will help me do this.  If anyone knows of a 
>> different way, please let me know.
>>
>> Thanks for your response,
>>
>> David
>>
>>
>>
>> Tim Kettler <ti...@udo.edu> 06/21/2007 12:27 AM
>> Please respond to
>> "Maven Users List" <us...@maven.apache.org>
>>
>>
>> To
>> Maven Users List <us...@maven.apache.org>
>> cc
>>
>> Subject
>> Re: "-javadoc" jars
>>
>>
>>
>>
>>
>>
>> Hi,
>>
>> have you tried the 'jarOutputDirectory' config parameter found in the 
>> plugin documentation [1]?
>>
>> -Tim
>>
>> [1] http://maven.apache.org/plugins/maven-javadoc-plugin/jar-mojo.html
>>
>> DavidWilliams@SunGardEBS.com schrieb:
>>> Hi Everyone,
>>>
>>> Is there anyway to include the "-javadoc" jars created  by the 
>>> javadoc plugin in a war or ear with maven 2?
>>>
>>> Thanks,
>>>
>>> David Williams
>>> 205-271-6159
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>
>>
>> _____________________________________
>> CONFIDENTIALITY:  This email (including any attachments) may contain 
>> confidential, proprietary and privileged information, and unauthorized 
>> disclosure or use is prohibited.  If you received this email in error, 
>> please notify the sender and delete this email from your system.  
>> Thank you.
>>
> 
> 
> ---------------------------------------------------------------------
> 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: "-javadoc" jars

Posted by Da...@SunGardEBS.com.
Thank you Tim!!!  I'll give that a try.

David




Tim Kettler <ti...@udo.edu> 
06/21/2007 08:29 AM
Please respond to
"Maven Users List" <us...@maven.apache.org>


To
Maven Users List <us...@maven.apache.org>
cc

Subject
Re: "-javadoc" jars






No, with <jarOutputDirectory/> you just tell the plugin where to create 
the javadoc jar. This will not help you to access it as a dependency 
from a repository.

However, your actual problem is solved easily. It's no problem at all 
that the javadoc jar is deployed alongsite the main artifact in the same 
directory. This is by design! These auxiliary artifacts are distinct 
from the main artifact in the directory by the "-{classifier}.jar" part 
of their name. To declare a dependency to them just add the classifier 
part to the dependency description in your pom.

For example:

<dependency>
   <group>mygroup</group>
   <artifact>myartifact</artifact>
   <version>0.1</version>
   <classifier>javadoc</classifier>
</dependency>

-Tim

DavidWilliams@SunGardEBS.com schrieb:
> Tim
> 
> I haven't.  I missed that option while looking at all those other 
options. 
> = )  What I would like to do is be able to list these javadoc jars as a 
> dependency of another project.  However they are installed to the same 
> directory as the project jar.  I'm thinking I need them in a separate 
> directory so I can grab them as a dependency.  Hopefully the 
> jarOutputDirectory will help me do this.  If anyone knows of a different 

> way, please let me know.
> 
> Thanks for your response,
> 
> David
> 
> 
> 
> Tim Kettler <ti...@udo.edu> 
> 06/21/2007 12:27 AM
> Please respond to
> "Maven Users List" <us...@maven.apache.org>
> 
> 
> To
> Maven Users List <us...@maven.apache.org>
> cc
> 
> Subject
> Re: "-javadoc" jars
> 
> 
> 
> 
> 
> 
> Hi,
> 
> have you tried the 'jarOutputDirectory' config parameter found in the 
> plugin documentation [1]?
> 
> -Tim
> 
> [1] http://maven.apache.org/plugins/maven-javadoc-plugin/jar-mojo.html
> 
> DavidWilliams@SunGardEBS.com schrieb:
>> Hi Everyone,
>>
>> Is there anyway to include the "-javadoc" jars created  by the javadoc 
>> plugin in a war or ear with maven 2?
>>
>> Thanks,
>>
>> David Williams
>> 205-271-6159
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 
> 
> _____________________________________
> CONFIDENTIALITY:  This email (including any attachments) may contain 
> confidential, proprietary and privileged information, and unauthorized 
> disclosure or use is prohibited.  If you received this email in error, 
> please notify the sender and delete this email from your system.  Thank 
> you.
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


_____________________________________
CONFIDENTIALITY:  This email (including any attachments) may contain 
confidential, proprietary and privileged information, and unauthorized 
disclosure or use is prohibited.  If you received this email in error, 
please notify the sender and delete this email from your system.  Thank 
you.

Re: "-javadoc" jars

Posted by Tim Kettler <ti...@udo.edu>.
No, with <jarOutputDirectory/> you just tell the plugin where to create 
the javadoc jar. This will not help you to access it as a dependency 
from a repository.

However, your actual problem is solved easily. It's no problem at all 
that the javadoc jar is deployed alongsite the main artifact in the same 
directory. This is by design! These auxiliary artifacts are distinct 
from the main artifact in the directory by the "-{classifier}.jar" part 
of their name. To declare a dependency to them just add the classifier 
part to the dependency description in your pom.

For example:

<dependency>
   <group>mygroup</group>
   <artifact>myartifact</artifact>
   <version>0.1</version>
   <classifier>javadoc</classifier>
</dependency>

-Tim

DavidWilliams@SunGardEBS.com schrieb:
> Tim
> 
> I haven't.  I missed that option while looking at all those other options. 
> = )  What I would like to do is be able to list these javadoc jars as a 
> dependency of another project.  However they are installed to the same 
> directory as the project jar.  I'm thinking I need them in a separate 
> directory so I can grab them as a dependency.  Hopefully the 
> jarOutputDirectory will help me do this.  If anyone knows of a different 
> way, please let me know.
> 
> Thanks for your response,
> 
> David
> 
> 
> 
> Tim Kettler <ti...@udo.edu> 
> 06/21/2007 12:27 AM
> Please respond to
> "Maven Users List" <us...@maven.apache.org>
> 
> 
> To
> Maven Users List <us...@maven.apache.org>
> cc
> 
> Subject
> Re: "-javadoc" jars
> 
> 
> 
> 
> 
> 
> Hi,
> 
> have you tried the 'jarOutputDirectory' config parameter found in the 
> plugin documentation [1]?
> 
> -Tim
> 
> [1] http://maven.apache.org/plugins/maven-javadoc-plugin/jar-mojo.html
> 
> DavidWilliams@SunGardEBS.com schrieb:
>> Hi Everyone,
>>
>> Is there anyway to include the "-javadoc" jars created  by the javadoc 
>> plugin in a war or ear with maven 2?
>>
>> Thanks,
>>
>> David Williams
>> 205-271-6159
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 
> 
> _____________________________________
> CONFIDENTIALITY:  This email (including any attachments) may contain 
> confidential, proprietary and privileged information, and unauthorized 
> disclosure or use is prohibited.  If you received this email in error, 
> please notify the sender and delete this email from your system.  Thank 
> you.
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: "-javadoc" jars

Posted by Da...@SunGardEBS.com.
Tim

I haven't.  I missed that option while looking at all those other options. 
= )  What I would like to do is be able to list these javadoc jars as a 
dependency of another project.  However they are installed to the same 
directory as the project jar.  I'm thinking I need them in a separate 
directory so I can grab them as a dependency.  Hopefully the 
jarOutputDirectory will help me do this.  If anyone knows of a different 
way, please let me know.

Thanks for your response,

David



Tim Kettler <ti...@udo.edu> 
06/21/2007 12:27 AM
Please respond to
"Maven Users List" <us...@maven.apache.org>


To
Maven Users List <us...@maven.apache.org>
cc

Subject
Re: "-javadoc" jars






Hi,

have you tried the 'jarOutputDirectory' config parameter found in the 
plugin documentation [1]?

-Tim

[1] http://maven.apache.org/plugins/maven-javadoc-plugin/jar-mojo.html

DavidWilliams@SunGardEBS.com schrieb:
> Hi Everyone,
> 
> Is there anyway to include the "-javadoc" jars created  by the javadoc 
> plugin in a war or ear with maven 2?
> 
> Thanks,
> 
> David Williams
> 205-271-6159


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


_____________________________________
CONFIDENTIALITY:  This email (including any attachments) may contain 
confidential, proprietary and privileged information, and unauthorized 
disclosure or use is prohibited.  If you received this email in error, 
please notify the sender and delete this email from your system.  Thank 
you.

Re: "-javadoc" jars

Posted by Tim Kettler <ti...@udo.edu>.
Hi,

have you tried the 'jarOutputDirectory' config parameter found in the 
plugin documentation [1]?

-Tim

[1] http://maven.apache.org/plugins/maven-javadoc-plugin/jar-mojo.html

DavidWilliams@SunGardEBS.com schrieb:
> Hi Everyone,
> 
> Is there anyway to include the "-javadoc" jars created  by the javadoc 
> plugin in a war or ear with maven 2?
> 
> Thanks,
> 
> David Williams
> 205-271-6159


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org