Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to use jenkins+ant to build non-maven projects

2025-01-22 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/02 Report--

This article mainly introduces "how to use jenkins+ant to build non-maven projects". In daily operation, I believe many people have doubts about how to build non-maven projects with jenkins+ant. The editor consulted all kinds of materials and sorted out simple and easy-to-use methods of operation. I hope it will be helpful to answer the doubts about "how to use jenkins+ant to build non-maven projects". Next, please follow the editor to study!

A brief introduction to Jenkins

Concept: Jenkins is an open source software project, a continuous integration tool developed based on Java, used to monitor continuous repetitive work, aimed at providing an open and easy-to-use software platform, making continuous integration of software possible.

Official website: http://www.jenkins.org.cn/

Related features:

Open source and free

Cross-platform, support all platforms

Master/slave supports distributed build

Visual management page in the form of web

Installation and configuration is super simple

Timely and rapid help from tips

There are hundreds of plug-ins.

Download and install

Download the windows version of the war package directly from http://mirrors.jenkins-ci.org/ and put it in tomcat/webapps.

Start tomcat and enter http://127.0.0.1:8080/jenkins in the browser

The first access needs to be unlocked, and the password is in the /. Jenkins/secrets/initialAdminPassword file; after unlocking, you will be prompted to install the plug-in, select the default recommended plug-in, and then you need to wait a while.

The next step is to create the first administrator account and then go to the main interface

III. System configuration

Global tool configuration (JDK and Ant)

System configuration (Mail extension Notification, Custom message content)

Email header

[continuous integration] build notification: $PROJECT_NAME-Build # $BUILD_NUMBER-$BUILD_STATUS!

Email content

This email is sent automatically by the program, please do not reply!

Project name: $PROJECT_NAME

Build number: $BUILD_NUMBER

Svn version number: ${SVN_REVISION}

Build status: $BUILD_STATUS

Trigger reason: ${CAUSE}

Build log address: ${BUILD_URL} console

Build address: $BUILD_URL

Changeset: ${JELLY_SCRIPT,template= "html"}

Plug-in management (install plug-ins as needed)

4. Write the build.xml file (the file is usually placed in the root directory of the project. Please use Baidu for specific syntax).

Define the required directory

Clean up the directory archived after the build

Compile source code src, copy configuration files

Compile unit test case test (optional)

Use junit to execute unit test cases (optional)

Perform PMD static check (optional)

Pack it into war package.

Upload war package to linux server

Add project / configuration build steps

Click the New Task, enter the project name, and select the free-style software project.

Next, you will enter the configuration interface of the current project.

General:

Source code management:

Build triggers:

Cron syntax description: https://blog.csdn.net/MenofGod/article/details/81288987?utm_source=copy

Build the environment

Construction

Post-build operation

Custom mail configuration:

6. View the implementation result

At this point, the study on "how to use jenkins+ant to build non-maven projects" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report