Use Jenkins+ant on Mac to execute first program

Source: Internet
Author: User

This article is intended to let students understand how to get Jenkis to run on Mac notebooks to simulate the actual work of building a Jenkins service platform on Linux
First of all according to the author's habits first say how to install Jenkis and Tomcat, first install Tomcat, on the computer input url:https://tomcat.apache.org/download-90.cgi download you need, I downloaded from the original location on the desktop, the path is installed on the desktop, the specific location is/users/zlr/desktop/apache-tomcat-9.0.6, and then use the command to start./users/zlr/desktop/ Apache-tomcat-9.0.6/bin/startup.sh can start Tomcat, open 127.0.0.1:8080 if you can see the page can be started, online said so can start ha, but under normal circumstances will not start, At this time to see the log path tail-300f/users/zlr/desktop/apache-tomcat-9.0.6/log/catalina.out, found an error

This error can be guessed that Tomcat and Java version does not match the result, the author of the machine is Jdk1.6,tomcat installed is 9, certainly not, you can change a website to download https://tomcat.apache.org/ download-70.cgi here can download version 7.0, and then continue to look at the log after installation, found no error, open the browser input 127.0.0.1:8080 can open normally, for the installation of Tomcat success

After installing Tomcat you can try to install Jenkis, it is recommended to download the appropriate war package under http://updates.jenkins-ci.org/download/war/this path, The author downloads to jenkis2.55 the package, according to the article Https://www.cnblogs.com/zhanggui/p/6227832.html said put to the specified location, but found still not start, or to trace the log, There is a row in the discovery log


It is estimated that the Java version of this machine and the version of Tomcat and this Jenkis version does not conform to the cause, in general, it is certainly the latest Java version and the Tomcat version of the most compatible, so I immediately changed the version, after the author repeatedly found that the wall, Sometimes the most official online will install Java files in/Library/Internet Plug-ins/javaappletplugin.plugin/contents/home/bin/java this path, But our code is more aware of the beginning of Java, so it is recommended an article https://www.cnblogs.com/cphmvp/p/6604316.html, this article in the 1.6,1.7,1.8 version of Java will be installed in the/ Under Library/java/javavirtualmachines Path
After installation, try to modify the local. bash_profile file and then successfully modify and execute the source, after refreshing the environment variable still does not, the author decisively restart the machine after OK

Enter Vi/users/shared/jenkins/home/secrets/initialadminpassword take out the password to put it in, start the installation, after the installation quickly to this step ~ here to start the establishment of the Jenkins task, Before I introduced a lot of ant to perform the task of the situation, this article to specifically demonstrate that the implementation of an ant script


On top of that, we already have a complete ant+buildxml+junit script, the so-called Jenkis feature is to use Jenkins to trigger the ant command, first set up a task, nothing is set and then configured

After the completion of the ant execution, click to build immediately, found that there is a problem, entered after the discovery of errors

In general must be a wave of 30 percent ha ~ ~ Ah, have to admit that it is really difficult, mainly the authority and other unexpected problems,, the main solution is to look at the log ~ Refueling Bar Everyone
Specific author in order to write this blog has encountered the problem of stepping over the pit:
1 cannot delete or open file: Use chmod 777 command plus permissions
2 Unable to create file error could not create tempfile in xxxxx, I just want to say, I really have no words, must or create a file problem, in the previous level directory using chmod 777 can

Really not easy, finally upload a picture of the author's last, I hope you look out ~

Use Jenkins+ant on Mac to execute first program

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.