At home, I use CTRL+SHIFT+B or F7 or whatever key sequence initiates the build for my build tool. At work, this doesn't quite cut it.
At my first job (an internship) we used a product called Visual Build, which I have come to like very much. It's the best build tool I've ever worked with. The down side here is that it's not free.
At...
In Eclipse I can set all kinds of preferences for coding style. I'd like to be able to enforce these as an ant task to make the build break.
Can anyone give me an example of how to enforce eclipse coding styles in an Ant task?
(I KNOW about PMD, checkstyle etc - none of these EXACTLY match the eclipse preferences for coding style. I w...
I'm using Junit 4.4 and Ant 1.7. If a test case fails with an error (for example because a method threw an unexpected exception) I don't get any details about what the error was.
My build.xml looks like this:
<target name="test" depends="compile">
<junit printsummary="withOutAndErr" filtertrace="no" fork="yes" haltonfailure="yes" show...
What are the best practices for naming ant targets?
For exmaple, what would you expect the target "test" to run? All unit tests? All functional tests? Both?
What are the standard names used for running different types of tests (unit/functional/all)? Are there standards for target names to deploy software in J2SE? in J2EE?
My proje...
Hi,
I need to read the value of a property from a file in an Ant script and strip off the first few characters. The property in question is
path=file:C:/tmp/templates
This property is store in a file that I can access within the ant script via
<property file="${web.inf.dir}/config.properties"/>
I have two questions:
How do I rea...
I'm looking for a way to automatically get the Java Wireless Toolkit storage root (the directory where the JWT stores the file system of a mobile device simulator) in an Ant build file.
Is there a property file or an environment variable that the JWT stores that path?
Thank you.
...
Following on from this question, I now want to know how to stop an ANT script from executing if the preceding build failed. I can't see a way in the Build setup in Eclipse of chaining builds together based on their success.
I think I am lookikng for either a way to pass the previous build status into my ANT script so I can terminate ...
Hello Fellow Programmers,
I am having problems running my Junit tests via Ant. I can't seem to get Ant to see the properties file it needs to load a dll my project needs. All my tests work using the Junit GUI in Elcipse, so I'm pretty sure it's not a problem with the tests themselves. I think my problem is something classpath-related...
I'd like to run JSLint4Java as part of my build process. I have about 1000 JS files in a library, and don't really want to add a
/*globals foo, bar, baz */
header to each of them -- especially since many of them are from an external library (Dojo). If I don't add the header, though, JSLint complains about the same five globals on ne...
I'm completely at loss how the ant task ivy:publish is supposed to work.
I would expect that I do my normal build, which creates a bunch of jar files, then I would push those jars to the (local) repository.
How can I specify from where to retrieve the built jars, and how would those end up in the repository?
Update:
<target name="pub...
I've been hitting a java.lang.OutOfMemoryError: PermGen error when compiling a project with ant under Linux with jdk 1.5.0_11. the same project compiles under windows without problem.
Usually this relates to the MaxPermSize allocated to the JVM. Irakli Nadareishvili has one of the best explanations of PermGen errors and guide to setting...
I'm using Eclipse Ganymede. Everything works fine, but I have an anal-retentive yearning for a warning-free Problems tab. Right now it (correctly) complains about my ant scripts: "No grammar constraints (DTD or XML schema) detected for the document." Any way to turn that off for just those files? Ideally I'd like it to still warn me ...
I am a bit of an ant newbie, and I'm having trouble making a jar correctly. As an example, say I want to make a jar with my StringUtil class. Using the following ant directive, I can create the jar, but the problem is that the directory structure is lost. It simply puts StringUtil.class in the base directory of the jar. How can I correct...
Is there a way to run a specific Ant task via the keyboard? I have a rsync to dev task that I run a lot and running to the mouse to double-click is a pain.
...
The build.xml has a test and a build target. The test target obviously depends on the build target.
How can I run the test target only, temporarily skipping the compilation, without modifying the build.xml file ?
I'm asking because the compilation is too long, and kept up-to-date by a continuous integration server ; and I'm chasing a...
I've downloaded the svntask for ant from tigris.org, so it is the "official" one.
I have a simple task to update my entire project
<target name="prepare">
<svn username="user" password="pass">
<update>
<fileset dir="."/>
</update>
</svn>
</target>
Running this task took about 2 hours.
Running a svn update on the comm...
I am a NetBeans user and I wanted to reduce the number of steps required to build the project.
I used to have two scripts: "build.xml"(created by NetBeans) and "build-module.xml"(my script), and I tried to merge them both into a single step. I renamed "build.xml" to "xbuild.xml" and renamed "build-module.xml" to "build.xml"(so NetBeans w...
Whenever I notice that something in my workflow is a repeating task, I try to automate it.
For example the steps necessary to deploy something on a server. It's often a build, followed by a scp and finally some remote setup scripts:
mvn package
scp target/foobar.jar server:
ssh server install-foobar
ssh server './bin/foobar restart'
...
I've created a new J2SE project in NetBeans, and I can run it from the IDE, but when I try to run it using Ant on the command line, I get the following problem:
<snip>
run:
[java] Exception in thread "main" java.lang.NoClassDefFoundError: IndexBuilder
[java] Java Result: 1
<snip>
Based on the snippet from project.propertie...
I have inherited a Java application (servlets) that runs under Tomcat. For historical reasons, the code has different "look and feel" options based on where the application will be deployed (essentially a matter of branding).
There are several constants that control this branding process, which have different functions and should not be...