Thanks for the tip Lukas, I haven't explored the maven tags much, except the reactor and copyResources.

<maven:get...> seems appropriate in your case where you need access to another plugins resources, but it smells funny for a plugin to have to go to extra means to access it's own resources because it's being called indirectly (via a tag it defines)...that's essentially saying that a plugin should not rely on the value of plugin.resources pointing to it's own resources.

Perhaps I've designed/separated my plugins incorrectly. plugin-A is providing the means to "compile" a resource via both a goal (a:compile) and a tag (also a:compile). The reason for the tag is so that different input and output directories, along with a compilation "strategy" can be passed as attributes instead of relying on properties, which may have different values depending on the plugin calling the tag. For example, plugin-A defaults to pom.build.sourceDirectory as the input directory, while plugin-B defaults to pom.build.unitTestSourceDirectory.

My current plugin functionality is close enough for now that I might just forego this problem and begin the move to Mojo.

doug


Lukas Theussl wrote:

In the pdf plugin I use this to access some resources from the xdoc plugin:

<maven:get plugin="maven-xdoc-plugin" property="plugin.resources" var="xdoc.plugin.resources" />

HTH
-Lukas


Doug Douglass wrote:

I know, m1 (1.0.2) and plugin.jelly is old hat, but I need a little help.

Here's the scenario...

1) plugin-A defines tag a:foo which uses resources provided with the plugin.

  2) plugin-B uses tag a:foo to do some work.

3) plugin-B fails with error from within plugin-A saying that the resources "local" to plugin-A cannot be found.

It's obvious that the plugin.resources property is being set once for the currently executing plugin. Therefore, in the scenario above plugin.resources is providing the path to plugin-Bs resources.

So, how should such a situation be handled (besides re-writing in a Mojo and moving to m2 ;) ?

TIA,
Doug

---------------------------------------------------------------------
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]


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

Reply via email to