Using GitHub as a MAVEN repository to publish your own jar packages relies on implementing a set of common parts of multiple projects, avoiding the copying and pasting of code between multiple projects in your team.
1, first in the local MAVEN location configuration file Setting.xml (without the file on the new file), add the configuration Maven warehouse address. I'm using my GitHub warehouse as a maven repository.
2. Add the MAVEN deployment plugin Maven-deploy-plugin to the project and configure the path, my path is mvn-pro under Target, deployed with Maven clean and deploy.
You can then compile the deployment to find the resulting deployed file in target. I used the idea IDE's MAVEN operation. You can also use MVN clean deploy I'm not familiar with the path of the MVN operation directly in the IDE.
After compiling, build the deployment file as follows:
3. Add the specified GitHub global server to the project
4, add plug-in Site-maven-pligin, because I set the mirror is Ari image, found that there is no plug-in mirror Site-maven-pligin, the introduction of a long and unsuccessful,
After changing the image, and go to projectstruct to add the dependent search plugin, find the plug-in, as well as the correct version 0.12, the plugin version error in the figure.
Add plug-in dependencies to your project
5, clone of the warehouse on GitHub Https://github.com/Jordan150513/maven-repo.git to the local target under the Mvn-repo. So Mvn-repo is a local git repository,
Then the MAVEN clean deploy is executed, and the resulting deployment file is in the local repository, and git push is far away.
Use of private libraries
6. Specify the MAVEN warehouse address of the custom dependency package
Add a custom dependency
Can.
Use GitHub as a MAVEN repository to publish your own jar packages rely on implementing a set of common parts of multiple projects, avoiding the duplication and pasting of code between multiple projects in your team