maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dennis Lundberg <denn...@apache.org>
Subject Re: Issue with maven-plugin-plugin: For two artifacts which have the same groupId, goalPrefix is not resolved correctly.
Date Tue, 13 Mar 2012 19:00:53 GMT
Hi

First try the latest version of maven-plugin-plugin, which is 2.9, to
see if that solves your issue.

On 2012-03-12 22:56, Dhawan Gayash wrote:
> Hi,
> 
> I am trying to write two plugins with the same groupId and goal but
> different artifactId. For example.
> 
> com.foo.bar.myOne-maven-plugin & com.foo.bar.myTwo-maven-plugin
> 
> In both these plugins I would like to configure goalPrefixes as "myone"
> and "mytwo". I am using maven-plugin-plugin for doing this with version 2.3
> 
> When I use mvn myone:<<GOAL>> it works fine. However when I use mvn
> mytwo:<<GOAL>> it still executes the myone plugin.
> 
> When I checked the depot location for how these plugins have been
> provisioned I find the maven-metadata-local.xml file to have these configs.
> 
> 
> |$/> cd /usr/local/.m2/repositories/3.0/com/foo/bar/
> $/> cat maven-metadata-local.xml
> 
> <?xml version="1.0" encoding="UTF-8"?>
> <metadata>
> <plugins>
> <plugin>
> <name>My First Plugin</name>
> <prefix>myone</prefix>
> <artifactId>myOne-maven-plugin</artifactId>
> </plugin>
> <plugin>
> <name>My Second Plugin</name>
> <prefix>mytwo</prefix>
> <artifactId>myOne-maven-plugin</artifactId> <!-- SHOULD BEEN
> myTwo-maven-plugin -->
> </plugin>
> </plugins>
> </metadata>|
> 
> This is a bug in maven-plugin-plugin version 2.3. Has this issue been
> resolved or should I file this bug in JIRA.
> 
> Steps to reproduce the bug:
> 
> 1.) Take two artifacts with same groupId.
> 2.) Configure goalPrefix by using maven-plugin-plugin. For both the plugins
> <build>
> <plugins>
> <plugin>
> <artifactId>maven-plugin-plugin</artifactId>
> <version>2.3</version>
> <configuration>
> <goalPrefix>myone</goalPrefix>
> </configuration>
> </plugin>
> </plugins>
> </build>
> 3.) Provision these plugins into your local repo.
> 4.) Execute the plugins using goalPrefix. And for further investigation
> please check the maven-metadata-local.xml
> 
> 
> Thanks,
> Dhawan
> 
> 


-- 
Dennis Lundberg

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Mime
View raw message