You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by nicolas de loof <ni...@apache.org> on 2009/01/16 14:13:35 UTC

how can a plugin get it's own jar Artifact ?

Hi,
from a maven plugin (gwt-mojo) I'd like to get the Artifact for the plugin
jar itslef.

${plugin.artifacts} and ${plugin.artifactMap} only contains the plugin
dependencies.

Any suggestion ?

Re: how can a plugin get it's own jar Artifact ?

Posted by nicolas de loof <ni...@apache.org>.
2009/1/16 nicolas de loof <ni...@apache.org>

> I solved this using ${plugin.version} and :
>         Artifact plugin =
> artifactFactory.createArtifact( "org.codehaus.mojo", "gwt-maven-plugin",
> version, Artifact.SCOPE_COMPILE, "maven-plugin" );
>
>         String localPath = localRepository.pathOf( plugin );
>
>         File myJar = new File( localRepository.getBasedir(), localPath );
>
> 2009/1/16 nicolas de loof <ni...@apache.org>
>
> Hi,
>> from a maven plugin (gwt-mojo) I'd like to get the Artifact for the plugin
>> jar itslef.
>>
>> ${plugin.artifacts} and ${plugin.artifactMap} only contains the plugin
>> dependencies.
>>
>> Any suggestion ?
>>
>
>

Re: how can a plugin get it's own jar Artifact ?

Posted by nicolas de loof <ni...@apache.org>.
I solved this using ${plugin.version} and :
        Artifact plugin =
artifactFactory.createArtifact( "org.codehaus.mojo", "gwt-maven-plugin",
version, Artifact.SCOPE_COMPILE, "maven-plugin" );

        String localPath = localRepository.pathOf( plugin );

        File myJar = new File( localRepository.getBasedir(), localPath );

2009/1/16 nicolas de loof <ni...@apache.org>

> Hi,
> from a maven plugin (gwt-mojo) I'd like to get the Artifact for the plugin
> jar itslef.
>
> ${plugin.artifacts} and ${plugin.artifactMap} only contains the plugin
> dependencies.
>
> Any suggestion ?
>