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

[EMAIL PROTECTED] 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 <[EMAIL PROTECTED]> 06/21/2007 09:09 AM
Please respond to
"Maven Users List" <users@maven.apache.org>


To
Maven Users List <users@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

[EMAIL PROTECTED] 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 <[EMAIL PROTECTED]> 06/21/2007 12:27 AM
Please respond to
"Maven Users List" <users@maven.apache.org>


To
Maven Users List <users@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

[EMAIL PROTECTED] 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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


_____________________________________
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


_____________________________________
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to