ant

ANT returning properties from an externally called build

Hi there ANT experts :-) I'm currently trying to refactor a couple of our ANT scripts and what I'd like to do is try and centralise some of the common targets they use into some kind of shared area. The target I'm trying to work on just now is configuration. Both our scripts currently have the same code which loads in external properti...

Netbeans Mobility Obfuscation problem (Proguard)

I am upgrading my development environment from Netbeans 5.5 to 6.9. Along with that comes a change from Proguard 3.5 to 4.4 for obfuscation of my J2ME apps. Where before my projects built fine, I now get warnings about not being able to find referenced classes. Warning: class1: can't find referenced class class2 Warning: class1: can...

How to run sys.sp_addlogin in ant sql task ?

Hi Ant guru, I got error BUILD FAILED C:\Projects...\build.xml:987: com.microsoft.sqlserver.jdbc.SQLServerException: The procedure 'sys.sp_addlogin' cannot be executed within a transaction. How can i make an ant sql task run this? thanks ...

How can i display a message in Maven

How can i display a message in Maven? In ant, we do have "echo" to display a message, but in maven, how can i do that? ...

What is a reasonable way to convert a complicated Ant script to a set of Eclipse projects?

I inherited an existing Ant build script. It invokes javac three times on three different source directories: shared, client, and server. It then produces two JAR files: client.jar (shared + client) and server.jar (shared + server). When I translated this to Eclipse, I ended up making three projects with appropriate dependencies. This w...

Using a Clover <fileset> on Hudson

We're trying to limit Clover to a certain package and therefore have a <fileset> definition in our Ant build file. Everything works fine from the command line (when we specify our known Ant target). But when it comes to the Clover plug-in on Hudson, we don't know which Ant target Hudson uses. Any pointers in using a Clover <fileset> on H...

Create project from maven archetype via Apache Ivy

If you want to create project with a Maven archetype you type mvn archetype:generate -DarchetypeGroupId=... -DarchetypeArtifactId=... \ -DarchetypeVersion=... -DgroupId=... -DartifactId=... \ -Dversion=... How this line would change if you are using Ivy? ...

How to use encrypted password in apache BasicDataSource?

At present i am keeping the password [ unencrypted ] in a property file. This password get placed as is in the configuration xml using ant. [ The configuration xml is for datasource, it is creating the object of dbcp.BasicDataSource ] Now, is it possible that after the ant target the password is copied in encrypted form. Heard the Ja...

Copy content of subfolders with Ant

How can I copy content of all subfolders of given folder using Ant? i.e. I have such folder structure folder/ folder/sub1/1.txt folder/sub1/f1/1.txt folder/sub2/2.txt ... I don't know exact names of subfolders. And I need to copy content from all of them into one folder (keeping the structure of content, i.e. copying all files into...

How do I execute an ant task for each line in a given file?

I need to execute an ant task for each line from a given file. Any ideas appreciated. ...

Managing environment configuration with ant/svn

If a project depends on other libraries whose locations are non-standard, where should the locations be stored? My current solution is to have something like this at the top of the Ant build.xml script: <!-- change these properties to point to the correct library locations on your system --> <property name="lib.foo" location="${user.hom...

Ant task for compiling GUI forms (Intellij IDEA)

How I can create a Ant task to compile GUI forms (XML) in Intellij IDEA? I use Scala and Java in my project. Java only for GUI class, and I create it with Intellij IDEA UI Designer. ...

Ant automatically reading .properties files?

Could it be that when executing ant from the command line, all paths to .properties files are stored in parameters? ...

How do i execute an ant task on files in a specified folder?

I have to preprocess some state machine (.sm) files using a compiler to generate java code before compiling the rest of my project, and using an ant task to do it. At this moment i have to add each file i need to parse manually in the ant target. How can i use ant to go through a directory i specify and execute the task on all files it ...

Use ANT to update build number and inject into source code

In my build.xml file I am incrementing a build version number in a property file like so: <target name="minor"> <propertyfile file="build_info.properties"> <entry key="build.minor.number" type="int" operation="+" value="1" pattern="00" /> <entry key="build.revision.number" type="int" value="0" pattern="00" /> ...

Android library projects custom builds

Hello all, I have a legacy application and need to split it into a library project (common code) and two application projects (paid and free applications). I don't use Eclipse for development, and also don't use Ant builds provided (generated) by Android SDK (there are several reasons for that: different project directory structure, uni...

How can I convert a complex applescript into a single line command for the terminal

I have a complex AppleScript that for some reasons has to be executed as a single line command. My Script looks like: tell application "Finder" tell disk "'myDiskName'" open set current view of container window to icon view set toolbar visible of container window to false set statusbar visible of cont...

Conditional compilation with Java and ant

I have a problem wit the software I'm working on. We are accessing Windows system calls via JNA, and we have to define some Windows structure (Java class that extends the JNA Structure) to be able to access them. The application has to work with 32-bit and 64-bit architecture, but the problem with the structures is that attributes in t...

Removing Date Comment from Apache's Ant PropertyFile Task

I'm using the propertyfile task shown below in my build script: <target name="build-brand" depends="-init" description="Adds version information to branding files."> <propertyfile file="${basedir}/branding/core/core.jar/org/netbeans/core/startup/Bundle.properties"> <entry key="currentVersion" value="${app.windowtitle} ${app....

re-use properties for multiple ant build files?

How can I have just 1 properties file be included into all of my ant build scripts? ...