And also I now discovered that if I use <type>, then it has to be
specified for the artifact both in <dependencies> and
<dependencyManagement>. If I could use metadata, I would have expected
to be able to define it in <dependencyManagement> and optionally
override it in <dependencies>
Ittay Dror wrote:
Ok, now I really need this mechanism. I want to be able to specify,
per platform, the type of artifact to use. With properties, this would
mean mapping each platform (aol in NAR lingo) to a type specifier. But
with just 'type', I can't do that.
Ittay
Ittay Dror wrote:
The question was supposed to be general, since I think it's a generic
issue that plugins may need.
My scenario is this: I'm using the NAR plugin. This plugin packages
native libraries and headers so they can be used as dependencies.
Everything works great when generating the artifact. I can create
shared and static libraries from the same project (as attached
artifacts). However, when another project wants to use them as a
dependency, there's a problem where that project can't define whether
it wants to use the shared artifact or the static. Currently, this
is determined by the dependency artifact.
What I wanted was a way of defining the dependency so I can add a
parameter defining 'shared' or 'static', which the NAR plugin will
use to know what artifact to download and use. I found a workaround
to this issue, by using the 'type' parameter in the artifact and
having the plugin define ArtifactHandler components for the different
types (if i just define 'type' as 'shared', this will be the
extension of the artifact, which is not good, it should be 'jar').
This also means the plugin should be defined with 'extensions' true.
All of this makes the plugin complex. Btw, using classifiers won't
help here, since each dependency in fact defines several artifacts to
use, depending on operating system.
I don't think the explanation above made it clearer why I want this,
since it requires knowing the NAR plugin and its requirements,
however, as my analysis goes, if there was a way of defining metadata
that is used by plugins, this case would have been solved in a
simpler way I think.
Thank you,
Ittay
Wayne Fay wrote:
Tell us more about what you want to do and why, and perhaps someone
will have a better response to your question.
Wayne
On 4/7/08, Ittay Dror <[EMAIL PROTECTED]> wrote:
I want to be able to write in the project something like
....
<dependency>
....
<properties>
<some.key>some value</some.key>
</properties>
</dependency>
(or any other layout, maybe <configuration> instead of <properties>)
So that my plugin can use the metadata to affect its behavior.
How can I do that? If not possible, are there plans to add?
Thank you,
Ittay
--
Ittay Dror <[EMAIL PROTECTED]>
Tikal <http://www.tikalk.com>
Tikal Project <http://tikal.sourceforge.net>
---------------------------------------------------------------------
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]
--
Ittay Dror <[EMAIL PROTECTED]>
Tikal <http://www.tikalk.com>
Tikal Project <http://tikal.sourceforge.net>
--
Ittay Dror <[EMAIL PROTECTED]>
Tikal <http://www.tikalk.com>
Tikal Project <http://tikal.sourceforge.net>
--
Ittay Dror <[EMAIL PROTECTED]>
Tikal <http://www.tikalk.com>
Tikal Project <http://tikal.sourceforge.net>