You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Mark Hobson <ma...@gmail.com> on 2005/08/28 16:50:21 UTC
[m2] Installing plugins with different groupIds
Do you have to configure anything differently for m2 to auto-discover
plugins that aren't in the org.apache.maven.plugins groupId? For
example, I have a simple plugin POM:
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>a</groupId>
<artifactId>a</artifactId>
<packaging>maven-plugin</packaging>
<version>1.0</version>
<dependencies>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-plugin-api</artifactId>
<version>2.0-beta-1-SNAPSHOT</version>
</dependency>
</dependencies>
</project>
A simple mojo:
/** @goal a */
public class AMojo extends AbstractMojo {
public void execute() throws MojoExecutionException {
getLog().info("--- A ---");
}
}
I then "m2 -DupdateReleaseInfo=true install" it and try to run it with
"m2 a:a", but it only seems to look for a matching plugin within
org.apache.maven.plugins? Also, the plugin-registry.xml even seems to
define it with that groupId:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-a-plugin</artifactId>
<useVersion>RELEASE</useVersion>
</plugin>
Am I missing anything obvious here?
Cheers,
Mark
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: [m2] Installing plugins with different groupIds
Posted by Mark Hobson <ma...@gmail.com>.
[added back to users list]
On 28/08/05, Brett Porter <br...@apache.org> wrote:
> ... for now, which was in April.
>
> The docs are out of date. You should use your own group ID, not
> o.a.m.plugins.
>
> There are two things you need to do to make it available from the
> command line:
[snip]
Great that worked a treat thanks. More info at
http://jira.codehaus.org/browse/MNG-377 if anyone's following this
thread.
Cheers,
Mark
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: [m2] Installing plugins with different groupIds
Posted by Mark Hobson <ma...@gmail.com>.
[added back to users list]
On 28/08/05, Brett Porter <br...@apache.org> wrote:
> ... for now, which was in April.
>
> The docs are out of date. You should use your own group ID, not
> o.a.m.plugins.
>
> There are two things you need to do to make it available from the
> command line:
[snip]
Great that worked a treat thanks. More info at
http://jira.codehaus.org/browse/MNG-377 if anyone's following this
thread.
Cheers,
Mark
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org
Re: [m2] Installing plugins with different groupIds
Posted by Brett Porter <br...@apache.org>.
... for now, which was in April.
The docs are out of date. You should use your own group ID, not
o.a.m.plugins.
There are two things you need to do to make it available from the
command line:
1) add your group to settings.xml under the plugin groups field
2) add a "plugin prefix" to the plugin plugin's configuration (if that
isn't confusing enough) so that the generated plugin is designated as
"a". This defaults to the artifactId with "maven" and "plugin" removed.
Alternatively, you can call goals like this:
m2 groupId:artifactId:goal
or
m2 groupId:artifactId:version:goal
eg:
m2 a:a:1.0:a
should work with the below.
- Brett
Vincent Siveton wrote:
>Hi Mark,
>
>Actually, <groupId>org.apache.maven.plugins</groupId> "is the only groupId
>acceptable for Maven plugins".
>http://maven.apache.org/maven2/developers/developing-plugins-with-marmalade.
>html
>
>Cheers,
>
>Vincent
>
>
>
>>-----Original Message-----
>>From: Mark Hobson [mailto:markhobson@gmail.com]
>>Sent: Sunday, August 28, 2005 10:50 AM
>>To: Maven Users List
>>Subject: [m2] Installing plugins with different groupIds
>>
>>Do you have to configure anything differently for m2 to auto-discover
>>plugins that aren't in the org.apache.maven.plugins groupId? For
>>example, I have a simple plugin POM:
>>
>><project>
>> <modelVersion>4.0.0</modelVersion>
>> <groupId>a</groupId>
>> <artifactId>a</artifactId>
>> <packaging>maven-plugin</packaging>
>> <version>1.0</version>
>> <dependencies>
>> <dependency>
>> <groupId>org.apache.maven</groupId>
>> <artifactId>maven-plugin-api</artifactId>
>> <version>2.0-beta-1-SNAPSHOT</version>
>> </dependency>
>> </dependencies>
>></project>
>>
>>A simple mojo:
>>
>>/** @goal a */
>>public class AMojo extends AbstractMojo {
>> public void execute() throws MojoExecutionException {
>> getLog().info("--- A ---");
>> }
>>}
>>
>>I then "m2 -DupdateReleaseInfo=true install" it and try to run it with
>>"m2 a:a", but it only seems to look for a matching plugin within
>>org.apache.maven.plugins? Also, the plugin-registry.xml even seems to
>>define it with that groupId:
>>
>> <plugin>
>> <groupId>org.apache.maven.plugins</groupId>
>> <artifactId>maven-a-plugin</artifactId>
>> <useVersion>RELEASE</useVersion>
>> </plugin>
>>
>>Am I missing anything obvious here?
>>
>>Cheers,
>>
>>Mark
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>For additional commands, e-mail: users-help@maven.apache.org
>>
>>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
>For additional commands, e-mail: dev-help@maven.apache.org
>
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org
RE: [m2] Installing plugins with different groupIds
Posted by Vincent Siveton <vi...@gmail.com>.
Hi Mark,
Actually, <groupId>org.apache.maven.plugins</groupId> "is the only groupId
acceptable for Maven plugins".
http://maven.apache.org/maven2/developers/developing-plugins-with-marmalade.
html
Cheers,
Vincent
> -----Original Message-----
> From: Mark Hobson [mailto:markhobson@gmail.com]
> Sent: Sunday, August 28, 2005 10:50 AM
> To: Maven Users List
> Subject: [m2] Installing plugins with different groupIds
>
> Do you have to configure anything differently for m2 to auto-discover
> plugins that aren't in the org.apache.maven.plugins groupId? For
> example, I have a simple plugin POM:
>
> <project>
> <modelVersion>4.0.0</modelVersion>
> <groupId>a</groupId>
> <artifactId>a</artifactId>
> <packaging>maven-plugin</packaging>
> <version>1.0</version>
> <dependencies>
> <dependency>
> <groupId>org.apache.maven</groupId>
> <artifactId>maven-plugin-api</artifactId>
> <version>2.0-beta-1-SNAPSHOT</version>
> </dependency>
> </dependencies>
> </project>
>
> A simple mojo:
>
> /** @goal a */
> public class AMojo extends AbstractMojo {
> public void execute() throws MojoExecutionException {
> getLog().info("--- A ---");
> }
> }
>
> I then "m2 -DupdateReleaseInfo=true install" it and try to run it with
> "m2 a:a", but it only seems to look for a matching plugin within
> org.apache.maven.plugins? Also, the plugin-registry.xml even seems to
> define it with that groupId:
>
> <plugin>
> <groupId>org.apache.maven.plugins</groupId>
> <artifactId>maven-a-plugin</artifactId>
> <useVersion>RELEASE</useVersion>
> </plugin>
>
> Am I missing anything obvious here?
>
> Cheers,
>
> Mark
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org