Jenkins 2.32.3 parameterized build ant project - project side

Jenkins端

1. The basic configuration is the same as the maven configuration. Note: The parameters do not need to add double quotation marks

  1. Build: Use ant to build, the ant here needs to be configured first in the system settings

Project side

Add build.xml

Important part description:

  1. Declare the execution environment

  2. Execute java code:
    2.1. Use the java tag to execute the main method of the java class with the specified path, the classpath in the java tag is the path where the java class is compiled after
    2.2. The classpath in the java tag is the running environment required for the execution of the class file
    2.3. In the java tag arg is the parameter passed to the main function, use ${} to get the parameters passed by Jenkins





Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324775588&siteId=291194637