ant

Ant Regular expression, seperate a path into directory name and file name where file name has multiple dots

I am trying to extract the directory and file name from a path. I have got it working with normal file names that only have a single dot as part of the extension name, but it fails to work if there are multiple dot's in the file name. Normal case results in: Web Content/javascript/more/andmore/evenmore AND uidoublerebel I am wanti...

Pass parameters to Junit Class from Ant

Hi, I'm using Junit under ant to perform Selenium Test.My test cases need to read files which contain test data(in order to accomplish data driven test). I don't mind embedding the file names in the test cases, but I'd like to have the name of the directory where the data files are stored parameterized in the build.xml file. What's the...

Automate adding multiple "sections" to the manifest?

I'm using ant to generate the MANIFEST.MF for a .jar, and I need to add multiple manifest <section> blocks based on a list of files in a directory. However, I need to automate the process to do this at build-time since the list will change between development and deployment. For example: <manifest file="MANIFEST.MF"> <foreach files="...

Ant build jar from multiple packages

I am attempting to create a JAR based on two separate Java packages. I can compile and run within Eclipse, but cannot get the code to function from the command line. I have Ant and the JDK correctly configured for usage, as I have an almost working Ant build script. The only problem is that the resulting JAR throws a ClassNotFoundExcepti...

Ant Tasks for Amazon EC2/S3?

Does anyone know of a good library providing Ant tasks for performing operations against Amazon EC2/S3? I'd like to leverage S3 for deployment of new WAR files for my applications, and figured Ant would be a good way to keep simplify the process and keep everything consistent. Any recommendations? ...

maven antrun plugin

I have the following in my pom: <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-ant-plugin</artifactId> <version>2.3</version> <configuration> <target> <echo message="hello ant, from Maven!" /> <echo>Maybe this will work?</echo> </target> </configuration> </pl...

Getting the Ant <modified> selector to work properly

I have a target in ANT that needs to run a compiler on a given set of files twice: once for debug, once for production. I only want to run the compiler if the source file has changed, so I set up a < modified> selector. However, since I need both the debug and prod task to run for a given modified file, I set the 'update' property to fal...

Ant - how to get all files' name in a specific folder

Here is my Ant script for generating jar package. I have bunch of jar packages for manifest Class-Path attribute, they are all in an specific folder. I don't want to hard code it, how can I get them automatically? <jar jarfile="${client_deploy_dir}/HelloWorld.jar" basedir="${client_work_dir}/compiled"> <manife...

NullPointerException in com.android.ant.ApkBuilderTask.execute when building with ant

I configured my android project to use ant. When building using the keyword release it fails with this message: java.lang.NullPointerException at com.android.ant.ApkBuilderTask.execute(ApkBuilderTask.java:239) at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291) at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown ...

Ant standard tasks

Maven has a fairly standardized project structure and standard plugins for compilation and testing. Is there something widespread for Ant? I found the following projects so far: Antiplate Ant Script Library But I'm not sure whether these are widespread and are likely to be maintained in the future. Does someone have experience with ...

how to have an excludes list in ant build script?

I'm trying to add an excludes list to my ant build script. I have a property (lets call it build.excludes) which looks something like this: build.excludes=MyApp,AnotherApp in my build script I have an if statement similar to the following: <for list="${appsList}" delimiter="" trim="true" param="currentApp" keepgoing="yes"> <seque...

junit and ant problem. Can not start test

when i am runing junit test from ant i always get: D:\metrike>ant test Buildfile: build.xml init: compile: test: [junit] Running jmt.test.TestCodeBase [junit] Testsuite: jmt.test.TestCodeBase [junit] Tests run: 1, Failures: 1, Errors: 0, Time elapsed: 0,046 sec [junit] Tests run: 1, Failures: 1, Errors: 0, Time elapse...

how come ANT javac command adds extra directories?

I start studying ANT today in order to make Java compiling easier. I wrote simple ANT script which only use javac command. What I am trying is compile from .....\head_first\src\com\masatosan\constant.java (source) to the destination directory: .....\head_first\WEB-INF\classes\com\masatosan\conf So the result would look like: .....\h...

How to configure Ant in netbeans 6.9 for my zend framework project

Hello, I switched to net-beans 6.9.1 to develop my php zend framwork projects. Now I want it to work with ANT. I have already an build directory with an build.xml. Can someone tell me how to configure and run my ant scripts from within netbeans? ...

Ant: put directory path into a file

In ant, I need to create a file named "current_build" with the only content (in plaintext) being the full name of the directory: So I have this: <echo file="${trainer.dir}/current_build">${trainer.dir}</echo> And in my build.properties, I have a relative path set: trainer.dir=../trainer In the current_build file, I wou...

ANT - how to use exclude, excludesfile with javac?

Looked at several post on stackoverflow as well as other sources (online + ANT definition guide book) but none of them helped so far. I can't exclude the file from compiling. I have just one file that wants to exclude from compiling and ANT documentation is not really telling the detail. I'm trying to exclude HTMLParser.java from compil...

ant_rules_r3.xml : error

I'm running mac osx. I downloaded the latest version of the SDK starter package (platform api7, revision 2). I use processing version of the build (190).When I try to run I get the errors below.I don't know what is it ? I hope who can help me getting started with android processing,please. Thanks. BUILD FAILED /Users/ed_crub/Document...

phpUnit & Ant unrecognized option --log-xml

Hello, I am trying to automate my testing procedure using Ant. This is my error: test: PHPUnit 3.5.0 by Sebastian Bergmann. unrecognized option --log-xml /var/www/nrka2/build/build.xml:30: exec returned: 1 BUILD FAILED (total time: 1 second) And this is my build.xml <?xml version="1.0" encoding="UTF-8"?> <project name="eventManager...

Errors in PHPUnit itself

PHP Notice: Please no longer include "PHPUnit/Framework.php". in /usr/share/php/PHPUnit/Framework.php on line 50 Fatal error: Class 'PHPUnit_Runner_StandardTestSuiteLoader' not found in /usr/share/php/PHPUnit/TextUI/TestRunner.php on line 434 PHP Fatal error: Class 'PHPUnit_Runner_StandardTestSuiteLoader' not found in /usr/share/p...

How to build for JDK 1.1.8?

I need to find a good way to build for JDK 1.1.8. So far I've tried using Eclipse, IntelliJ and Ant with no luck. With Ant (v 1.7.1) I tried setting the relevant parameters on the javac task (executable and compiler). Trouble is this: [javac] This version of java does not support the classic compiler; upgrading to modern. Is there ...