ant

Call logoff in Ant script

送分小仙女□ 提交于 2019-12-12 01:28:16
问题 I am trying to call the logoff command from my build.xml. I tried several combinations in my ant target such as : <target name="bat"> <echo>Executing batch script</echo> <exec dir="C:\WINDOWS\system32" executable="cmd"> <arg value="/c"/> <arg value="logoff"/> </exec> </target> But everytime, I get this error : "logoff is not recognized as an internal or external command, operable program or batch file" I don't know how to fix this issue. Thanks for helping. EDIT: logoff.xml <?xml version="1.0

How can Ant get the value from custom Java system property

故事扮演 提交于 2019-12-12 01:24:06
问题 In my java class I have System.setProperty("test", drinks); In my Ant build file I am able to execute the jave class. How can I use the name "test" to get the result ${drinks} in Ant ?? 回答1: The only way this is possible is if you use the attribute fork="false" (false being the default value) in the java Ant task. That is, if your Java program is executed in the same JVM as Ant. Otherwise, your Java program will be executed in a separate process and none of the system properties it sets will

Creating JUnit report programmatically

只谈情不闲聊 提交于 2019-12-12 01:15:05
问题 My current approach right now is from my application, just call the ant build and it will create the junit reports needed, but I want to have the flexibility to code junit reports programmatically. I tried this approach Ant:create JUnit report task programmatically FileSet fs = new FileSet(); fs.setDir(new File("..")); fs.createInclude().setName("TEST-*.xml"); XMLResultAggregator aggregator = new XMLResultAggregator(); aggregator.addFileSet(fs); AggregateTransformer transformer = aggregator

What's wrong with this Ant path?

╄→尐↘猪︶ㄣ 提交于 2019-12-12 01:06:57
问题 Note: even though this question involves GWT, it's really an Ant question. All I'm asking is: is the Ant PATH that I have below a "legal" path? I am getting ClassNotFoundExceptions on a type ( com.google.gwt.dev.Compiler ) that is packaged inside gwt-dev.jar (which as you can see is configured to be on the path below). Does the gwt.path look wrong to anyone: <path id="gwt.path"> <pathelement location="${gen.bin.main.dir}"/> <fileset dir="${gen.lib.main.dir}"> <filename name="gin-2.1.2.jar"/>

Using ant, check or compare all items listed in a file appear in another file or list

最后都变了- 提交于 2019-12-12 01:06:40
问题 I was wondering if you could help. I am new to ant scripting. I want to be able to compare two lists. File1.txt will contain a list of a lot of parameters and file2.txt will only contain a section of those parameters. File1.txt dbipAddress=192.168.175.130 QAGENT_QCF=AGENT_QCF QADJUST_INVENTORY_Q=ADJUST_INVENTORY_Q QCREATE_ORDER_Q=CREATE_ORDER_Q QLOAD_INVENTORY_Q=LOAD_INVENTORY_Q File2.txt AGENT_QCF ADJUST_INVENTORY_Q CREATE_ORDER_Q I want to know that all the Qs in file1.txt are contained in

Apache Ant exec error

做~自己de王妃 提交于 2019-12-12 00:53:46
问题 When I try to run "ant" in the CLI, I get the BUILD FAILED "Execute failed: java.in.IOException: Cannot run program "phploc": CreateProcess error=2" error (at the exec executable="phploc" line). My file structure: -- build/ -- src/ -- build.xml Build.xml file: <?xml version="1.0" encoding="UTF-8"?> <project name="..." default="build"> <target name="build" depends="prepare,phploc,pdepend,phpmd-ci,phpcs-ci,phpcpd,phpdox,phpunit,phpcb"/> <target name="build-parallel" depends="prepare,tools

fail bb-ant-tools build when jdp referenced file is missing

筅森魡賤 提交于 2019-12-12 00:31:45
问题 When I build my BlackBerry application with ant, I don't get any error messages, even though three files defined in the jdp file don't exist. How can I configure the build to fail if source files defined in a jdp file don't exist? 回答1: It is not build configuration issue. BB Ant Tools won't raise an error, if one or more of jdp properties point to a wrong resource location. If you want check the presence of a particular resource and raise error if it is not available, use another ant task

Creating a Java reporting project — would like to use JUnit and Ant but not sure how

你。 提交于 2019-12-12 00:27:50
问题 I'm interested in generating reports for a certain group of (non-software) engineers in my company using JUnit. Unlike typical JUnit testing where you are ensuring objects, methods, etc are bug free, I want to use JUnit to confirm if results in large log files are within range and give reports on it. My background: Experienced with Java. I am familiar with JUnit 4, I have spent the last hour or 2 looking through ANT documentation and I think I have a strong idea how it works (I just don't

Is there a way to automate Jmeter to run a number of testplans

主宰稳场 提交于 2019-12-11 23:56:01
问题 Is there a way to automate Jmeter to run a number of test-plans? Suppose I want to perform an experiment and run same test with single varying field one after the another, and reports saves for every test individually. For example: perform a number of tests by varying the ramp-up time so that I start it once and leave its for hours and comeback to see the whole experiment is performed. I read somewhere that ANT can be used. 回答1: I'd extract relevant variables to .properties files and execute

Android: Release and testing mode?

雨燕双飞 提交于 2019-12-11 23:18:19
问题 I'm working on android project and I want to set some variable on running time, how to do it ? to be more specific I want to have two running configuration: pre production configuration: where I use an url for testing (exemple String url = staging.domain.net) production configuration: where I use an other url (exemple url = api.domain.net) I though about using ant but I have no idea how ! Edit 1: My application accesses remote servers and services, using a test URL, sometime I want to use the