ant

Are there any good NSIS alternatives specifically for Java projects?

Title just about says it all. Are there any good scriptable installer/uninstaller systems made for Java projects? Ideally a system that interfaces well with Ant build scripts. Thanks! ...

Ant: Concatenate properties from a fileset

Hi everyone, I am trying to do the following in ANT but I am stuck. Read which projects are installed in my project workspace. workspace buildtools build.xml project1 build.xml project.name = "project1" IP = "44.55.66.77" SERVER_NAME = "project1.local" DOCUMEN...

How to block a status from an Ivy resolve

Hello. At our company, we use a base ant file that is included by everyone to do their builds. It contains the things we want to define globally and uniform, like build-test, test-coverage, build-release, publish on ivy, etc. I would like to enforce that in the ivy resolve that is done for creating a release build, libraries that hav...

How do I build a single bundled JAR with all the needed classes to run a Java application?

I'm going to deploy a Java application with a custom launcher, and I need to have all the classes needed for my app in a single jar file so I don't have to deploy the entire Java SE libraries with it. I was thinking of using some pre-existent ant tasks to create a target that recursively searches all my compiled classes files for its d...

Sourcing a shell profile in an ant build file?

I am using cruisecontrol and ant to build some legacy executables that also depend on a shell profile to setup env vars properly. Is there a way to exec this profile using ant in the current process so the makefiles ant calls get the env vars correctly? Another solution would be if there is a way to add the profile sourcing to the sub m...

Ant Fileset Expansion doesn't work

Hello everyone, I get a very confusing reaction from my ant build-file and I'm wondering whether I'm just not clever enough or this might actually be a bug. I've got the following property set globally in my project: <property name="lib.dir" location="lib"/> Then I'll try to add some files out of this directory into a jar file via f...

Need help resolving Clover issue.

Hey Guys, Forgive me if the question is too vague. I am not a clover expert but i need this issue resolved. Clover seem to be having issues with a particular class as show in the trace below. I need to exclude this class entirely from the clovers part cause the class isnt all that necessary. Is this even a clover issue or just a java is...

Compiling MXML with ANT - default-background-color not working

When I compile an .as file with MXMLC via ANT Build and set the default-background-color and default-frame-rate compiler options everything works fine. However, when I compile the main Application file of a Flex Project ( .mxml ) these options are not working or are not visible in the output when I launch. The framerate returns as NaN an...

Android ant compile fails: java.lang.NoClassDefFoundError: com.android.jarutils.SignedJarBuilder

So I created my build.xml from scratch using the android utility: $ /opt/android-sdk-linux_86/tools/android create project --target android-6 --name Dash --path . --activity Main --package com.gtosoft.dash Then I try to kick off a compile, but it fails! $ ant release Buildfile: build.xml [setup] Android SDK Tools Revision 6 ...

How can I get Eclipse to launch Ant in one keypress?

I changed the keybinding for Run Ant Build to F10 when Editing Javascript Source and also tried In Windows. In both cases F10 opens the file menu. If I press F11 while the ant build.xml is highlighted, it runs. If I press F11 any other time Eclipse opens up the Debug Configuration dialog. If I try Ctrl+F11 it tells me there are no launc...

How can I override a specific Seam component?

I have been mocking out some seam components using the following signature: @Name("myService") @Install(debug = true, precedence = Install.MOCK) public class MyServiceMock implements MyService I enable my mocks by changing this line in my components.xml <core:init transaction-management-enabled="false" /> to this: <core:init tran...

Verification of dependency authenticy in automated build systems

Hi everyone, I was just pointed to a very interesting article about a security problem called Cross Build Injection (XBI). Bascially it is a fancy name for smuggling bad code into an application at build time via automated build systems such as ant, maven or ivy. The problem could be alleviated by introducing a cryptographic signature ...

How to make an Ant task to sign and pack200 all my JAR files?

My JAR files must be signed for a webstart application. It would be nice to also have them packed to minimize the download time. I'm trying to configure an Ant task to automatically do it during the deploy of the application. Since the pack process reorganizes the jar internal structure invalidating the signature, the Pack200 documentati...

Exclude selected packages in jar command - build script

My project structure has these base packages. a.b.c.core a.b.c.web a.b.c.common And core,web,common packages will have sub packages. I have compiled all the java files under src dir and copied the class files to a dir. <javac srcdir="${src}" destdir="${build}/myapp" debug="true"> <classpath refid="compile.classpath"/> <classpath...

How to get a .jar to recognise and use a bundled log4j.xml file?

I'm building a project with ant and during the build I'd like to bundle a log4j.xml file directly into the .jar to make distribution simpler. I've been successful in adding the file to the .jar, but it doesn't seem to be recognised. What do I need to do to ensure the file is recognised and used by log4j? I'm new to Java, so a clear desc...

Ant macrodef: Is there a way to get the contents of an element parameter?

I'm trying to debug a macrodef in Ant. I cannot seem to find a way to display the contents of a parameter sent as an element. <project name='debug.macrodef'> <macrodef name='def.to.debug'> <attribute name='attr' /> <element name='elem' /> <sequential> <echo>Sure, the attribute is easy to debug: @{attr}</echo> <...

Why is my WAR file still referencing data from the old database server?

Possible Duplicate: How to change database settings for a deployed war file? OK I will outline the steps: I downloaded a perfectly functioning WAR fIle Uncompressed it Changed the database settings in the Database.properties file Made it a WAR file again Imported it in Eclipse IDE using File -> Import Ran a test client by r...

Generating XML Schema from JAXB class files in Ant

Is it possible to use the shemagen ant Task to generate an xsd schema from class files instead of from source? ...

Maven Ant Task: Replace property in pom.xml when executing Maven from Ant

In my Ant script, i'm executing Maven like this: <artifact:mvn pom="${basedir}/pom.xml"> <arg value="glassfish:deploy" /> </artifact:mvn> In my pom.xml, there is a property: <properties> <glassfish.home>${env.GLASSFISH}</glassfish.home> </properties> This value should be replaced by a value thats provided by the Ant Script. Is ...

Copy to restricted folder with Ant (using Eclipse in Ubuntu)

Using Eclipse in Ubuntu Linux. I'm creating an ant task to delete a directory in my apache localhost directory (/var/www) and then copy in files from my Eclipse project. I have: <project> <target name="deploy"> <delete dir="/var/www/gds"/> <copy todir="/var/www/gds/src"> <fileset dir="src"> </fileset> </copy> <copy tod...