6.12. Publishing a Plug-in to a Remote RepositoryAs 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. 6.12.1. 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 Will deploy to 1 repository(ies): mavenbook Deploying to repository: mavenbook Deploying: C:\dev\mavenbook\code\plugins\logifier2\target\maven\logifier-1.0.jar-->mdn/plugins/logifier-1.0.jar Executing command: mkdir -p /var/www/html/maven/mdn/plugins Executing command: chmod g+w /var/www/html/maven/mdn/plugins/logifier-1.0.jar Deploying: C:\dev\mavenbook\code\plugins\logifier2\target\maven\logifier-1.0.jar.md5-->mdn/plugins/logifier-1.0.jar.md5 Executing command: mkdir -p /var/www/html/maven/mdn/plugins Executing command: chmod g+w /var/www/html/maven/mdn/plugins/logifier-1.0.jar.md5 BUILD SUCCESSFUL 6.12.2. What just happened?Congratulations, you are now a plug-in developer. Enjoy Maven! |