ant

Running qtp tests automatically from a hudson instance

纵然是瞬间 提交于 2020-01-03 01:47:07
问题 We have at work a Hudson machine that acts as a build server for a Java Swing Project. The build process is based on Ant scripts (and not Maven). Has anyone integrated tests from QuickTest Professional is such configuration? In other words: Is it possible to execute qtp tests automatically via Ant? 回答1: Not sure about your particular setup, but QTP has an automation API which can be used to drive QTP itself. Below is an example VBScript snippet you could drop into a .vbs file and call from

Minimum set of files needed from Jetty to serve static content?

为君一笑 提交于 2020-01-02 17:32:33
问题 Background Disclaimer: I have very little experience with Java. We previously used a wrapped version of Jetty 6 for on-demand static content (JS, CSS, images, HTML) during our Ant build so we can run unit tests with PhantomJS against an HTTP-hosted environment. However, Jetty is now on version 8.1.3 and we no longer need that wrapping (which solves a different problem which is now moot), so I wanted to update to just using Jetty 8.1.3 directly. First I downloaded the whole Jetty distribution,

ant iterate over files

有些话、适合烂在心里 提交于 2020-01-02 15:18:18
问题 I want to iterate over a list of jars (undefined number) and add them all to the jar file. To add them I plan to use something like this: <jar id="files" jarfile="all.jar"> <zipfileset src="first.jar" includes="**/*.java **/*.class"/> <zipfileset src="second.jar" includes="**/*.java **/*.class"/> </jar> but how do I iterate over them? I don't have ant-contrib Thanks! 回答1: Just use zipgroupfileset with the Ant Zip task <zip destfile="out.jar"> <zipgroupfileset dir="lib" includes="*.jar"/> <

Using Ant scriptfilter to count lines

落花浮王杯 提交于 2020-01-02 12:17:27
问题 I am trying to write an Ant <scriptfilter...> to change occurrences of the string "__LINE__" to the correct line number in Java source files. Does anyone have an example of using JavaScript (or some other embedded scripting language) to do this? In particular, how do I create a "global" variable that is initialized to 1 when the script starts and is incremented with each new line? Thanks. UPDATE: Just tried the solution offered by Martin Clayton (thanks!), replacing the JavaScript with

How to set an env variable in Ant build.xml

本秂侑毒 提交于 2020-01-02 09:31:21
问题 I want to set an env variable inside my build.xml target <target name="run-tenantManagement" depends="jar"> <property name="SIMV3.1" value="${SIMV3.1}" /> //now here i want to do something like setenv SIMV3.1 true </target> and Inside my java code, I want to access it using : if("true".equals(System.getenv("SIMV3.1")){ //do something } Kindly suggest. I have tried many things but none of them worked.Also, there is no main() method as the framework is testng based and test cases are invoked

How to assign value to variable and reuse it Ant

白昼怎懂夜的黑 提交于 2020-01-02 07:36:56
问题 I am new to Ant, I have a scenario to assign a current time which I have got[1], while creating a folder[2] and down the file I add some file to the folder[3]. So there I need to get the value of time which I have got in [2]. I am basically a java guy, if it was in java it was few seconds job to have one global variable and re-using it. But here I am not sure how to reuse the value globally in different target tags. Kindly share your thought on this. [1] <macrodef name="set.timestamp">

How to assign value to variable and reuse it Ant

别等时光非礼了梦想. 提交于 2020-01-02 07:36:31
问题 I am new to Ant, I have a scenario to assign a current time which I have got[1], while creating a folder[2] and down the file I add some file to the folder[3]. So there I need to get the value of time which I have got in [2]. I am basically a java guy, if it was in java it was few seconds job to have one global variable and re-using it. But here I am not sure how to reuse the value globally in different target tags. Kindly share your thought on this. [1] <macrodef name="set.timestamp">

ant junit task — where to download ant-junit.jar and where to put it?

旧时模样 提交于 2020-01-02 07:30:13
问题 I literally wasted 2 hours trying to get ant junit task working. First, I had trouble finding ant-junit.jar file but I managed to find it in a maven page. After that I put it several places( ~/.ant/lib , /usr/share/ant/lib ) but no luck.. I'm still getting this error: Cause: the class org.apache.tools.ant.taskdefs.optional.junit.JUnitTask was not found. This looks like one of Ant's optional components. So I'm looking for: Official web page to download ant junit task files Correct place to put

Packaging a native library into an APK

好久不见. 提交于 2020-01-02 07:03:53
问题 How do I do this from Eclipse? I can't find any way. I tried creating a build.xml with the following and adding it as the final builder: <?xml version="1.0" encoding="UTF-8"?> <project name="MobileRecovery" default="mergelibs"> <loadproperties srcFile="local.properties" /> <property file="ant.properties" /> <loadproperties srcFile="project.properties" /> <fail unless="sdk.dir" message="sdk.dir is missing. Make sure to generate local.properties using 'android update project'" /> <!-- version

Packaging a native library into an APK

回眸只為那壹抹淺笑 提交于 2020-01-02 07:03:43
问题 How do I do this from Eclipse? I can't find any way. I tried creating a build.xml with the following and adding it as the final builder: <?xml version="1.0" encoding="UTF-8"?> <project name="MobileRecovery" default="mergelibs"> <loadproperties srcFile="local.properties" /> <property file="ant.properties" /> <loadproperties srcFile="project.properties" /> <fail unless="sdk.dir" message="sdk.dir is missing. Make sure to generate local.properties using 'android update project'" /> <!-- version