ant

Trying to run ANT JUnit target in debug mode in Eclipse

巧了我就是萌 提交于 2019-12-20 10:58:23
问题 Here is my ANT JUnit target <target name="test" depends="compile" > <junit failureProperty="test.failure" > <jvmarg value="-Xdebug" /> <jvmarg value="-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5432" /> <classpath> <pathelement path="${basedir}\..\Core\lib\junit-4.10.jar"/> <pathelement path="${basedir}\..\Suggestion\lib\ssce.jar"/> <pathelement path="C:\Java\javamail-1.4.1\mail.jar"/> <pathelement path="C:\Java\commons-net-2.0\commons-net-ftp-2.0.jar"/> <pathelement path="$

adding comment in .properties files

戏子无情 提交于 2019-12-20 10:30:16
问题 By using following block of code in build.xml file <propertyfile file="default.properties" comment="Default properties"> <entry key="source.dir" value="1" /> <entry key="dir.publish" value="1" /> <entry key="dir.publish.html" value="1" /> </propertyfile> I am able to generate default.properties file with following file contents source.dir=1 dir.publish=1 dir.publish.html=1 I want to know how can I add my comments in the generated file? E.g. the generated properties should have the following

What are some good java make utilities?

陌路散爱 提交于 2019-12-20 09:59:40
问题 I'm looking for a make utility for building large java programs. I'm aware of ANT already, but want to see what else is available. Ideally, it should be able to handle the .java->.class package directory weirdness that fouls up GNU Make. Win32, but cross platform is a plus. EDIT: I see some cons to using ANT, which is why I wanted to see other options, though I'll probably end up using it anyway, just because it works. requires nontrivial XML makefiles, "HelloWorld" is already 25 lines, and

How to check if directory exists before deleting it, using ANT?

巧了我就是萌 提交于 2019-12-20 09:44:47
问题 Using ANT , how can i make sure that directory exists before attempting to remove it? As part of my current clean task, i <target name="clean" description="clean"> <delete dir="${build}" /> <delete dir="${bin}" /> <delete dir="${dist}/myrunner.${version}.jar" /> <delete dir="${doc}" /> <delete dir="${report}" /> </target> This works well, however (obviously) remove happens when there is something to remove. Using ANT , how can i check if directory exist? 回答1: For this specific case, I'm not

What is build automation software (for example, Ant)?

旧街凉风 提交于 2019-12-20 08:59:36
问题 I see reference of ant a lot but I don't get exactly what its meant to do? from what i've heard its supposed to compile your projects but can't i just do that by clicking Run->Run in eclipse? Edit : I guess I should rephrase my question. I already know that ant is a 'build automation software', my question is, what exactly is build automation? I thought that you're supposed to test your app, and when it is running you click the 'build' button in eclipse or through command-line java, and it

Ant needs tools.jar and unable to find it

六眼飞鱼酱① 提交于 2019-12-20 08:29:19
问题 I am putting together a dev environment for a Java program and after the first try of my Ant build scripts I got this error: Unable to locate tools.jar. Expected to find it in /usr/lib/jvm/java-6-openjdk/lib/tools.jar While the path to the jdk is correct, the tools.jar really wasn't there. Is it actually supposed to be there or did I get some config/installation thing wrong? 回答1: It's there on my machine. I'm running Sun JDK 1.6.0_21 on Windows XP SP3. Are you sure you have the JDK? Is it

Showing alert message in logs while doing copy in Ant

混江龙づ霸主 提交于 2019-12-20 07:37:27
问题 I have fromfolder=xxx it has one.txt and tofolder=yyy same file is there one.txt While performing copy operation by using ant if it found same name of file is present then it will show alert message like files already present one.txt in log and should not overwrite the file. <target name="copyPublicHtml" description="Copy Public_html to output directory" > <touch> <fileset dir="../html"/> </touch> <copy todir="../html" failonerror="on" verbose="on" overwrite="false"> <fileset dir="../src"> <

Ant : Process the files in the subfolder using tasks

空扰寡人 提交于 2019-12-20 07:18:40
问题 I have a folder structure as follows + [BASE] +++ [DIR 1] ++++++ File.zip +++ [DIR 2] ++++++ File.zip .... I have a build.xml in BASE. I need to have a task where I can unzip the File.zip in each DIR* . I needed it to be such that a new DIR added also should be handled. I tried the following, in order to get the dir names but don't know how to proceed further <dirset id="contents" dir="." /> <property name="prop.contents" refid="contents"/> 回答1: You could try an embedded groovy script.

Running benchmark methods in a JUnit test class

帅比萌擦擦* 提交于 2019-12-20 07:00:42
问题 I have a test class MyTestClass with several typical test methods that do assertions or check for exceptions and are annotated with @Test . They run when I call the following directive in an Ant task: <test name="MyTestClass"/> However, in the same class I would like to situate several benchmark performance methods that are not included in the tests that must be passed. I would like to have an altogether separate Ant task that runs these benchmarking tests. Is there an annotated way to

Running benchmark methods in a JUnit test class

血红的双手。 提交于 2019-12-20 07:00:12
问题 I have a test class MyTestClass with several typical test methods that do assertions or check for exceptions and are annotated with @Test . They run when I call the following directive in an Ant task: <test name="MyTestClass"/> However, in the same class I would like to situate several benchmark performance methods that are not included in the tests that must be passed. I would like to have an altogether separate Ant task that runs these benchmarking tests. Is there an annotated way to