Getting error while building ant job in jenkins

Solved1.37K viewsJenkinsant jenkins

Getting error while building ant job in jenkins

I am trying to build an ant job in Jenkins but facing with below issues,

Started by user UAE
Running as SYSTEM
Building in workspace /var/lib/jenkins/workspace/TestItem
[TestItem] $ ant -file build.xml
Error: Could not find or load main class org.apache.tools.ant.launch.Launcher
Build step 'Invoke Ant' marked build as failure
Finished: FAILURE

Share:
vito Selected answer as best September 21, 2021
0

You need to configure Ant in Jenkins to build Ant jobs. Follow the below steps to do the same,

  1. In Jenkins, Manage Jenkins
  2. Global Tool Configuration
  3. Ant
  4. Add Ant
  5. Provide a name (eg: Ant) and keep the checkbox marked
  6. Save

Build the job now.

Share:
vito Selected answer as best September 21, 2021
0