Lao Li share: Continuous integration Learn Jenkins's git and MAVEN configuration 2

Source: Internet
Author: User

8. Check code updates and compile

You can set the timer check compile function by poll SCM.

For example, */5 * * * * is checked every 5 minutes, if there is an update in the Git repository, the build operation is performed.

9. Speed up download with maven

See: http://blog.csdn.net/sheismylife/article/details/7209722

Jenkins '. M2 directory path in:/var/lib/jenkins/.m2/

Clear all Jar packages First, then create the settings.xml file and edit the following:

<settings>

<mirrors>

<mirror>

<!--this sends everything else to/public-

<id>nexus</id>

<mirrorOf>*</mirrorOf>

<url>http://S1:8081/nexus/content/groups/public</url>

</mirror>

</mirrors>

<profiles>

<profile>

<id>nexus</id>

<!--Enable snapshots for the built on central repo to direct-to-

<!--all requests to nexus via the mirror--

<repositories>

<repository>

<id>central</id>

<url>http://central</url>

<releases><enabled>true</enabled></releases>

<snapshots><enabled>true</enabled></snapshots>

</repository>

</repositories>

<pluginRepositories>

<pluginRepository>

<id>central</id>

<url>http://central</url>

<releases><enabled>true</enabled></releases>

<snapshots><enabled>true</enabled></snapshots>

</pluginRepository>

</pluginRepositories>

</profile>

</profiles>

<activeProfiles>

<!--make the profiles active all the time-

<activeProfile>nexus</activeProfile>

</activeProfiles>

</settings>

Now click on Build to test, open console output, see the command line output, if you find the jar package downloaded from S1, it is correct. Compared with the use of a few, save more than 1 minutes.

Lao Li share: Continuous integration Learn Jenkins's git and MAVEN configuration 2

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.