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

Scan directories in groovy with ant builder file scanner

I want to use fileScanner of AntBuilder to go over directories. My code looks like: scanner = new AntBuilder().fileScanner { fileset(dir:sourcedir, casesensitive:false) { include(name:pattern) type(type:'dir') } } I want to…
user1805755
  • 25
  • 1
  • 5
1
vote
0 answers

Groovy-Ant Preserve File Structure in Zip Archive

I am working with Ant in Groovy, and I want to operate on all files in a directory that match certain criteria. I have the following: def fileSet = ant.fileset(dir: srcDir, id: "files", includes: pattern){ date(datetime: time when: "before",…
Steve
  • 4,457
  • 12
  • 48
  • 89
0
votes
0 answers

How to config ant tools jar in groovy script when using AntBuilder

When I use ant, I can use "ant -lib libs" to exec some sshexec tasks,but in AntBuilder I have No idea how to use it. Are there any approaches can config ant tool jar? Help me find a way to fix the problem.
0
votes
1 answer

NoBean found exception

**I am getting below error even though i have down the @autowired .please some one let me know why this issue happening its a ant build with spring config utor. 2022-07-08 10:18:09,856 WARN…
Onr
  • 1
  • 3
0
votes
0 answers

Ant Build query

excuse my terms with regards to the build tool, as I am new to this. I have a Java test application, when I use it on eclipse and run the testcases, everything works smooth. This application also can be built with the ANT tool. Now, the next…
0
votes
1 answer

Ant parallel task for signjar

im trying to run the ant task to run parallely under list of folders. But this isnt working. The below Code throws me "jar must be set through jar attribute or nested filesets". I tried various options for parallel but no success. Appreciate help …
John Levin
  • 41
  • 3
0
votes
0 answers

Groovy throws file not found when tried to unzip a previously downloaded file

I'm trying to unzip a previously downloaded zip file to the branch and it's throwing the following error when unzipping it with antbuilder, and any other method suggested for unzipping in groovy: [ERROR] Pipeline failed: src…
0
votes
1 answer

AntBuilder : Warning: Could not find file to copy

In this Jenkinsfile, I want to copy the list of changed files in GitHub to a new directory /toucd, and then upload them to UCD. I don't know why the AntBuilder is giving me the above error" Could not find file to copy". Please help. …
Alex
  • 180
  • 2
  • 3
  • 10
0
votes
0 answers

How to handle command line validations in ant build?

I am new to ant build. I am trying to validate command line arguments. Following is my code: build.xml snippet for taking in args:
0
votes
1 answer

Providing main-class attribute through AntBuilder in a gradle script

Is there a way to specify the main-class of the jar in its manifest file as a parameter in Groovy's AntBuilder? def jAnt = project.createAntBuilder(); jAnt.jar( basedir: build_dir + "/classes", //I have only one class with the main…
Rishikesh
  • 39
  • 1
  • 6
0
votes
1 answer

Ant Build ArrayIndexOutOfBoundsException in Java workspace

I am trying to build a Web Application with Ant build script. Application has many modules and after compiling couple of projects build fails with following error logs: [javac] An exception has occurred in the compiler (1.4.2). Please file a bug at…
user3731930
  • 137
  • 1
  • 1
  • 8
0
votes
1 answer

How to check part of file name and delete/replace the file in ant?

How can I check part of file name from downloads and replace old file from target. Version is part of file name. If old version file not exist then simply copy it. Consider files in 'downloads' are latest. Folder 'downloads' have latest file from…
Prem
  • 316
  • 1
  • 5
  • 23
0
votes
1 answer

How to read section from .properties file in ant build?

I have .properties file with variables=values, I want to override few of them based on environment/mode (DEV, QA, PROD) I want to read properties from file based on section. Want to read all default properties which are out of any section and some…
Prem
  • 316
  • 1
  • 5
  • 23
0
votes
2 answers

Can't create a zip file within a shared library for jenkins pipeline

I try to create a zip file within a shared library for jenkins pipeline with the help of AntBuilder. A simple zip file can be created, but as soon as I try to use a block it does not work. I don't get any error message or Exceptions. How can I debug…
slowjack2k
  • 2,566
  • 1
  • 15
  • 23
0
votes
1 answer

Ant Builds but all of junit tests failing

I am new on using ant and junit. I have the following problem. My ant build.xml builds successfully but during running the junit tests the following message appears. [echo] Running JUnit tests.... [mkdir] Created dir:…