简体   繁体   中英

how to configure jenkins by invoking ant and build a job?

In the jenkins configure project, i have the build step "Invoke Ant".

I have a build.xml file in a specific path and this xml file has import tags which imports two other xml files which are in the same path.

My job is getting failed because it is unable to find the files to be imported. I'm getting the error like "cannot find abc/def/xyz.xml"

I have given the build.xml file path in the "build file" column.

  1. What should I type in the properties column and java options column?
  2. How to give path for the other two files which needs to be imported by build.xml file?

Option 1. Make sure all files are relative to Jenkins workspace

Option 2. Hard-code the files' path in your build.xml

Option 3. Setup a property for the path of those files in your build.xml . Give that property a default value of whatever the path is right now (to make sure it still works without Jenkins). When invoking from Jenkins, in the properties field, enter the property name with a value for the absolute path that should be reachable.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM