Maven plugin naming best practices

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Maven plugin naming best practices

Christian Moen
Hello list,

We are working on a Maven plugin that makes downloading large external
resources easier through a caching scheme.  We would like to open source
and publish the plugin as we believe it is generally useful.

What are best practices for naming plugins?

Our artifact id is download-maven-plugin and my understanding is that a
maven prefix is reserved for Maven's own plugins.  What about group ids?
Our group id is currently com.atilika.

I'm seeing that Maven's own plugins use group id org.apache.maven.plugins.
I'm also seeing that many third party packages use group ids such as
com.foocompany.

Which group id is preferable - com.atilika or com.atilika.maven.plugins?
Are there any best practices or recommendations here?

Many thanks,
Christian
Reply | Threaded
Open this post in threaded view
|

Re: Maven plugin naming best practices

Tommy Svensson
Hello Christian,  

I’m just a maven user like yourself. I think you should stick with your company name, i.e com.atilika. The ’org.apache.maven.plugins’ are reserved for plugins comming from the apache-maven project itself. So if you put your code on github and submit binaries to maven central or bintray you should use your company domain as group.  

Personally I would go with ’com.atilika.maven.plugins’, but that is just my opinion. I can’t say it is more correct.

/Tommy  


På 7 juli 2018 till 08:05:47, Christian Moen ([hidden email](mailto:[hidden email])) skrev:

> Hello list,
>  
> We are working on a Maven plugin that makes downloading large external
> resources easier through a caching scheme. We would like to open source
> and publish the plugin as we believe it is generally useful.
>  
> What are best practices for naming plugins?
>  
> Our artifact id is download-maven-plugin and my understanding is that a
> maven prefix is reserved for Maven's own plugins. What about group ids?
> Our group id is currently com.atilika.
>  
> I'm seeing that Maven's own plugins use group id org.apache.maven.plugins.
> I'm also seeing that many third party packages use group ids such as
> com.foocompany.
>  
> Which group id is preferable - com.atilika or com.atilika.maven.plugins?
> Are there any best practices or recommendations here?
>  
> Many thanks,
> Christian
Reply | Threaded
Open this post in threaded view
|

Re: Maven plugin naming best practices

Karl Heinz Marbaise-3
In reply to this post by Christian Moen
Hi Christian,

On 07/07/18 08:05, Christian Moen wrote:

> Hello list,
>
> We are working on a Maven plugin that makes downloading large external
> resources easier through a caching scheme.  We would like to open source
> and publish the plugin as we believe it is generally useful.
>
> What are best practices for naming plugins?
>
> Our artifact id is download-maven-plugin and my understanding is that a
> maven prefix is reserved for Maven's own plugins.  What about group ids?
> Our group id is currently com.atilika.

First the name should not start with maven-{plugnName}-plugin ...more
details in [1]. and yes the groupId can't be used cause you wont have
permission to upload it into central by it's groupId (org.apache...*)..

And yes download-maven-plugin would ok but if it is related to resources
I would change the name to give intention of the plugin by its
name...but of course that's up to you...


[1]:
http://maven.apache.org/guides/plugin/guide-java-plugin-development.html
>
> I'm seeing that Maven's own plugins use group id org.apache.maven.plugins.
> I'm also seeing that many third party packages use group ids such as
> com.foocompany.
>
> Which group id is preferable - com.atilika or com.atilika.maven.plugins?
> Are there any best practices or recommendations here?

I would suggest to use com.atilika.maven.plugins to make clear that it
is a maven plugin...

Kind regards
Karl Heinz Marbaise

>
> Many thanks,
> Christian
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]