Thanks much for your answer.
When a plugin is called, I'm confused as to what Classpath the plugin
itself gets. I see the project gets what I would expect, the
<dependencies> from the POM -- at least that is what I see in
project.artifacts.
But the plugin doesn't seem to get it's <dependencies>... When I print
System.getProperty("java.class.path") I see only::
[INFO] current Classpath=
c:\cwb-tools\ant\maven-2.0-beta-cwb/core/boot/classworlds-1.1-alpha-2.jar
Is there a set of properties for plugins like there is for project
(i.e. plugin.artifacts)??
Does classworlds take care of this somehow?? I know that, for example,
Ant must be on my Classpath because teh plugin is able to invoke it...
Thanks,
-- Chris
On 8/23/05, Trygve Laugstøl <[EMAIL PROTECTED]> wrote:
> On Tue, Aug 23, 2005 at 05:52:59PM -0500, Chris Berry wrote:
> > Greetings,
> > I am trying to figure out how to pass on the Classpath to Ant. I know
> > how to do this programmatically in Ant (e.g. project.setProperty) .
> > What I am trying to work out is how pass on the Classpath from the
> > *plugin*. By trial and error, I see that ${project.artifacts} results
> > in a HashSet of JARs for the *project* -- not the plugin.
> > I have a couple of questions
> >
> > 1) Is there a relatively comprehensive list of standard properties
> > (e.g. project.artifacts) somewhere?? (i.e. Is there a plugin.artifacts
> > ?? -- How would one know that??) I apologize in advance if this is in
> > the docs somewhere -- I have looked through them, and don't see
> > anything -- but may have overlooked them.
>
> Expressions that use the ${project..} prefix will query the current
> MavenProject object. Currently there doesn't seem to be a published
> javadoc site for the maven-project project so you'll have to read the
> sources for now.
>
> But it's worth noticing that the MavenProject object closely mimics the
> Model object which is documented in [1]. i.e: if you have the expression
> ${project.build.sourceDirectory} you would get the value "foo" from
>
> <project>
> <build>
> <sourceDirectory>foo</sourceDirectory>
> ...
>
> >
> > 2) How does one know what the Java (or whatever) equivalent of a
> > property would be. (e.g. project.artifacts converts to a HashSet --
> > How would one know that without resorting to trial-and-error??)
>
> See the first answer, when referencing ${project} you're querying a
> MavenProject object.
>
> > 3) Are there shortcuts like plugin.getDependencyPath( "axis:ant" ) in
> > maven2. (BTW: I do not want to use Marmalade. I am interested only in
> > using either Java and/or Ant)
>
> ${project.artifactMap}
>
> Artifacts in the map are keyed using:
>
> import org.apache.maven.artifact.ArtifactUtils;
> ArtifactUtils.versionlessKey( String groupId, String artifactId )
>
> [1]: http://maven.apache.org/maven2/maven-model/maven.html
>
> --
> Trygve
>
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.1 (GNU/Linux)
>
> iD8DBQFDC61j4EbM92cyCUURAiAtAJ4/EkD5wsLn86i/9P05bSJOAarTzgCfeAzC
> XqCEOcF0zKp5hx/9KEyrCIc=
> =VEdv
> -----END PGP SIGNATURE-----
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]