Publishing a Plug-in to a Remote Repository

As a plug-in writer, the last step of your journey is to learn how to share your plug-ins with others. To make your Logifier plug-in available to other developers, publish your plug-in to a remote Maven repository.

How do I do that?

The Plugin plug-in has a plugin:repository-deploy goal that you can use to deploy your plug-in to a remote Maven repository. This goal is equivalent to the jar:deploy and war:deploy goals that you saw in Section 4.1. Configure the deployment properties as described in Section 4.1. For example, using SCP:

maven.repo.list = mavenbook
  
maven.repo.mavenbook = scp://www.mavenbook.org
maven.repo.mavenbook.directory = /var/www/html/maven
  
maven.repo.mavenbook.username = vmassol
maven.repo.mavenbook.password = somepassword

Now deploy the plug-in to the remote repository:

C:\dev\mavenbook\code\plugins\logifier2>maven plugin:repository-deploy [...] plugin:repository-deploy: [echo] maven.repo.list is set - using artifact deploy mode Will deploy to 1 repository(ies): mavenbook Deploying to repository: mavenbook Deploying: C:\dev\mavenbook\code\plugins\logifier2\project.xml-->mdn/poms/logifier-1.0.pom Executing command: mkdir -p /var/www/html/maven/mdn/poms Executing command: chmod g+w /var/www/html/maven/mdn/poms/logifier-1.0.pom Deploying: C:\dev\mavenbook\code\plugins\logifier2\project.xml.md5-->mdn/poms/logifier-1.0.pom.md5 Executing command: mkdir -p /var/www/html/maven/mdn/poms Executing command: chmod g+w /var/www/html/maven/mdn/poms/logifier-1.0.pom.md5 ...

Get Maven: A Developer's Notebook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.