aspose file tools*
The moose likes Ant, Maven and Other Build Tools and the fly likes Maven plugin prefix resolution doesn't seem to work as expected Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "Maven plugin prefix resolution doesn Watch "Maven plugin prefix resolution doesn New topic
Author

Maven plugin prefix resolution doesn't seem to work as expected

Orton K Randy
Ranch Hand

Joined: Aug 12, 2011
Posts: 41

Hello,
I've created a MOJO for a specific application need. I've followed maven's guidelines in naming the plugin so that I didn't have to mention the full

for executing my plugin(I've named it to match the format ${prefix}-maven-plugin). I've even included the 'goalPrefix' property in the plugin POM's configuration section. Here's a sniff of what I did to my plugin's POM:

But I'm still unable to execute my plugin just using mvn ${prefix}:goal since it complains it can't find the plugin in any repository. I've still had to use mvn groupId:artifactId:version:goal Any idea why?

Coderanch, best ever forum on the net. Hands down.
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5827
    
    7

You need one more thing. In you settings.xml file, add the following:



Without this, Maven doesn't know to look into that groupId to find additional plugins.


JBoss In Action
Orton K Randy
Ranch Hand

Joined: Aug 12, 2011
Posts: 41

True, maven only seems to recognize plugins that belong to maven/codehaus groupIds. So I've had to add my plugin group specification to the settings xml. Not that I'm ok with doing so, but I don't have a choice right now. Cheers for the info, mate.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Maven plugin prefix resolution doesn't seem to work as expected