Comments inline.
Thanks,
-- Chris 

On 8/24/05, John Casey <[EMAIL PROTECTED]> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> One thing we're considering adding to m2 in the very near term is the
> concept of dependencies that are tied directly to a plugin definition.

Don't we already have this?? I have dependencies defined for my plugin
and they are all there when I call my Ant tasks (using an extended
version of AbstractAntMojo). I have verified this.


> As for locating plugin resources, it depends on what you're looking for.
> If it's bundled with the plugin or one of its dependencies, you should
> be able to use ClassLoader.getResource(..) to retrieve it by name. OTOH,
> if you're trying to get the path to one of the plugin dependencies, you
> can execute something similar to the following:
> 
> /**
> ~ * @parameter expression="${plugin.artifactMap}"
> ~ * @required
> ~ * @readonly
> ~ */
> private Map pluginArtifacts;
> public void execute() {
> ~  String key = ArtifactUtils.versionlessKey( "depGroupId", "depArtifactId" );
> ~  Artifact artifact = (Artifact) pluginArtifacts.get( key );
> ~  File depPath = artifact.getFile();
> 
> Does this answer your question, or am I misunderstanding?

Unfortunately, this doesn't really work in my case. Say I have an Ant
build file named "axis.xml" and I bundle this into my Plugin JAR. I
cannot access this as a File. Yes, it has a path in the URL sense (i.e
jar:/...) But Ant wants a regular old file that I can get an absolute
path to. (BTW: Ant is just an example. The same could hold true for
many other situations)

Is there any way to bundle files (such as axis.xml) into the
repository -- such that I could access it directly as,say,
${localRepository}/blah/plugins/axis-plugin/1.0-SNAPSHOT/axis.xml

Of course, I could unjar the Plugin into /target -- but that seems
like a hack...

Thanks for all your help & insight,
Cheers,
-- Chris

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

Reply via email to