Questions tagged [antbuilder]

Ant is a software tool for automating software build processes. ANT BELONGS TO the Apache group.

Apache Ant is a software tool for automating software build processes. It is similar to Make but is implemented using the Java language, requires the Java platform, and is best suited to building Java projects.

The most immediately noticeable difference between Ant and Make is that Ant uses XML to describe the build process and its dependencies, whereas Make uses Makefile format. By default the XML file is named build.xml.

Ant is an Apache project. It is open source software, and is released under the Apache License.

75 questions
1
vote
1 answer

How to make a war file with ant in groovy?

I have following script which is aim to make a war file. def ant = new AntBuilder() ant.ant(antfile:'build.xml', dir:APP_ROOT, target:'war') unfortunately I am getting following error when groovy try to run ant.ant(... line Error executing script…
dogukan sonmez
  • 335
  • 3
  • 8
1
vote
1 answer

How to display all resources included in a Groovy AntBuilder classpath?

I am using Groovy's AntBuilder to build a Java project. An error is occurring where classes are missing that really look like they should be included. I want to print out every JAR/WAR that's included in the following classpath closure, but I…
Kaleb Brasee
  • 51,193
  • 8
  • 108
  • 113
1
vote
0 answers

Execute failed: java.io.IOException: Cannot run program "powershell": CreateProcess error=2, The system cannot find the file specified

An Ant BuildException has occured: The following error occurred while executing this line: C:\Polarion\data\workspace\polarion-data\jobs\20191203-1104\sources\ProjektNEU\templates.polarion\CIC\null\build.xml:869: Execute failed: java.io.IOException:…
Felix
  • 33
  • 4
1
vote
0 answers

AntBuilder ignore targets when import 2 or more build.xml using ant.importBuilder() on build.gradle.kts

I need to import many ant files(build.xml) for a build.gradle.kts. If I import only one build.xml working fine, but if a try a second build file this second file don't have all targets imported. I tried rename all task during import…
jcebidanes
  • 41
  • 1
  • 9
1
vote
0 answers

How to pass language_in to Apache Ant build task

Ant is running jscomp on some JavaScript files. It doesn't recognise ES6 and newer features and the task fails indicating syntax errors on let, etc. I found suggestions that language_in needs to be passed with appropriate ECMAScript version. How can…
marekful
  • 14,986
  • 6
  • 37
  • 59
1
vote
1 answer

NoClassDefFoundError after creating executable jar with libraries using ant

I have created a sample application to demonstrate the problem I'm facing. My sample app contains single class with main method and a dependency on log4j package com.example.foo; public class MainClass { private static final org.slf4j.Logger…
PC.
  • 6,870
  • 5
  • 36
  • 71
1
vote
1 answer

Groovy AntBuilder - Specify Java Temp Dir

In my Groovy program, I am using Groovy AntBuilder to call the Ant ReplaceRegExp task. def antBuilder = new AntBuilder() antBuilder.replaceregexp(....) However on Unix, I get the following exception: Could not create tempfile in /tmp at…
Perihelion
  • 33
  • 1
  • 6
1
vote
1 answer

Fail build on PMD errors/warnings

I have a JAVA ANT project and I am trying to integrate PMD scripts with it so that I can check for all errors and warnings in my project. Below is snippet of ANT script which I have added in my build.xml:
Abhishek
  • 1,999
  • 5
  • 26
  • 52
1
vote
1 answer

how to add source code to jar file using ant build.xml

I want to add all my source code to jar file using ant while creating jar file from source code. I want to have two files 1- myProject.jar 2-myproject_source.jar What should i use and where should i put it?
itro
  • 7,006
  • 27
  • 78
  • 121
1
vote
3 answers

Is it possible to run a program by downloading the source folder in eclipse?

I was curious if it is possible to run a project in a different desktop by just downloading the source folder and setting it as the workspace? If possible, how can I run it? When I try, an ant-builder shows up when running it. Any help would be…
user2999870
  • 345
  • 4
  • 12
1
vote
1 answer

Change metadata and artifact Repository names with p2 and Ant builder from build.xml file

I want to change the name of my resulting repositories when running a Ant build for a deplayable feature from: "repository name='file://buildRepo - artifacts' t.." to a more friendly one. i have tried using ...
1
vote
1 answer

Specify Groovy AntBuilder execution directory

I can execute a pom.xml with goals using AntBuilder like so. def ant = new AntBuilder() ant.sequential { exec(executable:'mvn') { arg(value:'clean') arg(value:'install') } } But how do I specify the execution directory to…
jeremyjjbrown
  • 7,772
  • 5
  • 43
  • 55
1
vote
2 answers

AntBuilder ant echo task to append text to a file

I am running ant task in a groovy file and below is the snippet of it: def user="USER" project.ant.echo(file:"/a/b/c/test.properties", message:"user=${user}", append="true") I am trying to append text to the file, by running the script multiple…
user1470220
  • 123
  • 2
  • 15
1
vote
0 answers

Inherit classpath id in master build.xml

I have a base build.xml in that contains: I want to inherit this path id in all the build.xml as all these…
Rahul Singh
  • 781
  • 11
  • 27
1
vote
1 answer

Groovy AntBuilder scp catch exception

I need to copy some files using scp from a remote host. If the file is not there I need to display a message. The problem I have, is that I cannot catch a FileNotFound Exception. All I have is a BuildException, but this is raised even if the…
CC.
  • 2,736
  • 11
  • 53
  • 70