Hmm. Answering my own question, it looks like "${plugin.artifactMap}"
might do the trick. Let me report back after I've had a chance to try
it out.

Lasse

On 1/17/07, Lasse Koskela <[EMAIL PROTECTED]> wrote:
Allan, Franz,

On 1/17/07, franz see <[EMAIL PROTECTED]> wrote:
> For more information about Maven Properties, please see [1].
> [1] http://docs.codehaus.org/display/MAVENUSER/MavenPropertiesGuide
>
> allan ramirez wrote:
> > Have you tried using ${plugin.artifacts} expression?

Thanks for the tips, although I still couldn't get it working.

I tried all of the artifact-related properties listed in Franz's link
and what I'm missing is, for example, the following.

My plugin's POM has a dependency to "maven-plugin-api" as follows:

<project ...>
  ...
  <artifactId>jdave-maven-plugin</artifactId>
  <packaging>maven-plugin</packaging>
  <dependencies>
    <dependency>
      <groupId>org.apache.maven</groupId>
      <artifactId>maven-plugin-api</artifactId>
      <version>2.0</version>
    </dependency>
    ...
  </dependency>
</project>

And a project that's using my plugin has a plugin dependency to my plugin:

<project>
  ...
  <build>
    <plugins>
      <plugin>
        <groupId>my</groupId>
        <artifactId>my-maven-plugin</artifactId>
        <executions>
          <execution>
            <phase>test</phase>
            <goals>
              <goal>test</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
</project>

Now I can figure out from within "my-maven-plugin" where the plugin's
Mojo class itself is loaded by asking the ClassLoader, for example.
The problem is that I can't see its dependencies.

The "project.pluginArtifacts" property seems to inject some stuff,
including "my-maven-plugin" but not the plugin's dependencies. Also,
the Artifact objects don't seem to have enough information to resolve
to an actual .jar file in the repository (their getVersion() says
"RELEASE"?).

Lasse

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

Reply via email to