Real Maven private server builder-artifactory

Source: Internet
Author: User
Tags artifactory

To make good use of Maven in a team, the repository private server is inevitable. Otherwise, the curious eyes of team mate will all be consumed in the long jar download process.

I used to introduce a simple but stupid way to build a private server-upload the. m2/Repository directory downloaded by Comrade Lei Feng to any web server. In fact, there are many professional Maven server builders in the world. See theserviceside'sArticle-- Setting up a Maven repository.

I used artifactory. Suddenly, I thought that the Java service application was so easy to use at the moment, and I didn't need to install anything. I double-click artifactory. BAT, and you will start the jetty Web server, which is used as a typical unpacking.

Getting started in 10 minutes

  • Double-click artifactory. BAT to start the default artifactory service.
  • Http: // localhost: 8081/artifactory/, use admin/password to log on to the management interface.
  • Modify the Pom. xml of your project to add a private server definition. < Repositories >
    < Repository >
    < ID > Artifactory </ ID >
    < Name > Your local artifactory </ Name >
    < URL > HTTP: /localhost: 8081/artifactory/Repo </ URL >
    </ Repository >
    </ Repositories >

    < Pluginrepositories >
    < Pluginrepository >
    < ID > Artifactory </ ID >
    < Name > Your local artifactory </ Name >
    < URL > HTTP: /localhost: 8081/artifactory/plugins-releases </ URL >
    < Snapshots >
    < Enabled > False </ Enabled >
    </ Snapshots >
    </ Pluginrepository >
    </ Pluginrepositories >

  • Run the maven command of the project normally and request jar from artifactory. If artifactory has been downloaded, it will be directly returned to you. If not, it will go to the repo official site to download it. Go to the artifactory management interface and refresh the browse the repository constantly.

In addition, some jar files not available on the server on the official website can also be conveniently stored in artifactory through the deploy management interface.

Finally, your team's artifactory server can not directly connect to the Internet, you need to use the HTTP proxy server, see http://www.jfrog.org/sites/artifactory/latest/configuration.html. Also, you can configure it at remote-repo.Sockettimeoutmillis, The default value is 5000 milliseconds..

We recommend that you use artifactory to build a jar repository on servers with ample bandwidth to download the jar from springside :)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.