- DevOps for Salesforce
- Priyanka Dive Nagraj Gornalli
- 232字
- 2021-07-16 17:38:55
Configuring Maven in the Jenkins server
Go to Manage Jenkins | Global Tool Configuration.
We have already installed Maven on our machine. So enter a name for the Maven installation and the M2_HOME path as follows:

Let's configure our Jenkins job to build our sample project:
- Click on create new jobs:

- Create a Jenkins job with the Maven plugin. Provide the job name devops-ci-cd (you can choose another project name, if you want):

- In the Source Code Management section, provide the Git URL of your project. Provide credentials to clone the repository in Jenkins:

- Choose GitHub hook trigger for GitScm polling in Build Triggers. If Jenkins receives a PUSH GitHub webhook from the preceding repository, it will trigger this job:

- Provide a path to root pom.xml. It will be a relative path to the module root. In Build, add Root POM as pom.xml and Goals and options as package:

- Save your work and click on Build now.
This will create my-app-1.0-SNAPSHOT.jar in the /var/lib/Jenkins/workspace/target folder. You can check the console logs while the project build is in progress.
Once the JAR is successfully built, you can see the console logs as shown in the following screenshot:

We have completed a continuous integration job successfully. Now, we need to add the Jenkins webhook URL in the GitHub settings to trigger a Jenkins build whenever someone pushes code to our GitHub project.
推薦閱讀
- 高效能辦公必修課:Word圖文處理
- Introduction to DevOps with Kubernetes
- 工業機器人技術及應用
- 計算機圖形學
- UTM(統一威脅管理)技術概論
- iClone 4.31 3D Animation Beginner's Guide
- Associations and Correlations
- MATLAB/Simulink權威指南:開發環境、程序設計、系統仿真與案例實戰
- 內??刂萍捌鋺?/a>
- Dreamweaver CS6精彩網頁制作與網站建設
- Hadoop應用開發基礎
- INSTANT Adobe Story Starter
- 工業機器人操作
- 貫通Java Web輕量級應用開發
- Oracle 11g Anti-hacker's Cookbook