First, install and configure Maven
1. Download the apache-maven-3.3.3 package and unzip it to/library
2. Configure MAVEN Environment variables
1) Open console input vim. bash_profile Modify the environment variable configuration file, add the following to specify MAVEN's home directory, m2_home the path to the extracted Maven folder
2) Enter the source. Bash_profile in the console to make the configuration file effective
3. Enter MVN-V to see if the configuration was successful
4. Integrating maven in the IDE
1) Add MAVEN support
The IDE for this experiment is IntelliJ idea, right-click on an existing project, select Add Framework support, select Maven in the Left tab, then click OK
2) Edit the Pom.xml file to add JUnit jar packages to the project
1 <?XML version= "1.0" encoding= "UTF-8"?>2 <Projectxmlns= "http://maven.apache.org/POM/4.0.0"3 Xmlns:xsi= "Http://www.w3.org/2001/XMLSchema-instance"4 xsi:schemalocation= "http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">5 <modelversion>4.0.0</modelversion>6 7 <groupId>GroupId</groupId>8 <Artifactid>Softwaretest</Artifactid>9 <version>1.0-snapshot</version>Ten <Dependencies> One <Dependency> A <groupId>Junit</groupId> - <Artifactid>Junit</Artifactid> - <version>4.11</version> the </Dependency> - </Dependencies> - </Project>
Second, install and configure Git
1. Install git
Mac users can install Xcode from AppStore. Xcode is integrated with git, but not installed by default, run Xcode, choose Menu "Xcode", "Preferences", find "Downloads" in pop-up window, select "Command line Tools", click "Install" You can complete the installation.
2. View the GIT version
Enter Git--version in console to see if the installation was successful
3. Configure the user name and e-mail address in the console input
" Your Name " "[email protected]"
4. Add versioning to the project and upload it to GitHub, select Vcs-import into Version control-share project on GitHub, add git versioning to the project and upload to GitHub
Third, install and configure Jenkins
1. Install Jenkins
Put Jenkins.war into Tomcat's WebApp directory and start Tomcat (run/library/apache-tomcat-8.0.23/bin/startup.sh) Access http://127.0.0.1:8080 /jenkins/
2. Install Git and GitHub plugins, click System Management-Manage plugins, install git Plugin and GitHub Plugin
3. Configure Jenkins, click System Management-system settings, configure MAVEN and JDK home directories, git executable file path
4. Create a new Continuous integration task
1. Tap New, enter the item name, and choose to build a MAVEN project
2) source management in the selected Git,repository URL to enter the project address in GitHub, build column goals and Options fill in the clean install
3) Click Save to build the project, after the build is successful, click to enter to view the test results
[Spm_lab] Continuous integration experiment