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
signature.asc
Description: Digital signature