ant

passing command line arguments to ant

懵懂的女人 提交于 2019-12-13 12:27:32
问题 I am relatively new in ant, at school I have an assignment to do a build file. One of my questions is to copy to "/foldercopy" the file whose name(or path) is taken as argument for ant. I need to do something like: ant cpfile file.txt So ant will copy the file.txt to /foldercopy. I searched a lot on google but all I could find was something with "-Darg", but my teacher said that it's not correct. Is there any way to do it? 回答1: Plain command line arguments to ant are considered to be target

Python: get the return code of ant sub-process in windows

落爺英雄遲暮 提交于 2019-12-13 11:08:27
问题 I use python to call ant, I want to get the return code of the ant for detect ant error. for example, in cmd.exe, C:\Documents and Settings\Administrator>ant sfsf Buildfile: build.xml does not exist! Build failed C:\Documents and Settings\Administrator>echo %ERRORLEVEL% 1 but in python: >>> a = subprocess.Popen("ant hahah",shell=True) >>> Buildfile: build.xml does not exist! Build failed >>> a.wait() 0 Because ant is a bat file, so I must use shell=True to call the Popen. So how can I get the

How to run a Junit Plugin Test using Ant from eclipse

非 Y 不嫁゛ 提交于 2019-12-13 10:54:01
问题 How can we run a junit plugin test using ant from eclipse, also from command prompt? I'm using Junit4.4. 回答1: The org.eclipse.test plugin provides a library.xml file that contains ant tasks for running plugin tests both in UI ( ui-test target) and headless ( core-test target) modes. Example of invoking the task below, you'll need to provide a few properties to suite your own environment and check the org.eclipse.test plugin version: <property name="library-file" value="${eclipse-home}/plugins

How do I code into my build file a target that prints a list of sourcefiles in ANT

有些话、适合烂在心里 提交于 2019-12-13 09:46:48
问题 How do I code into my build file a target that allows one view the names of my source files. I am new to ant. 回答1: Try <target name="print-src"> <apply executable="echo"> <fileset dir="src" includes="**/*.java"/> </apply> </target> 来源: https://stackoverflow.com/questions/30334813/how-do-i-code-into-my-build-file-a-target-that-prints-a-list-of-sourcefiles-in-a

build.xml ignoring <echo> tags and if options

我与影子孤独终老i 提交于 2019-12-13 07:25:55
问题 I have a sencha Ext.js project and I am trying to get user input and take action based on that user input in my build.xml file. Here's my build.xml : <?xml version="1.0" encoding="utf-8"?> <project xmlns:if="ant:if" xmlns:unless="ant:unless" name="PSOGN" default=".help"> <import file="${basedir}/.sencha/app/build-impl.xml"/> <target name="-after-build"> <echo>57 ...</echo> <property name="realperl" value="/usr/bin/perl"/> <echo>59 ...</echo> <exec executable="/bin/hostname" outputproperty=

Jenkins using System Ruby - use rvm ruby?

天大地大妈咪最大 提交于 2019-12-13 07:04:05
问题 Jenkins is kindly running an Ant build for us. The Ant build orchestrates CI for an Objective-C project - a library that is available on both iOS and OSX. This Ant build can be run both in or out of Jenkins, so devs can verify their work before checking in, and Jenkins will provide another layer of checks. (Therefore reducing the chance of a broken build impacting other contributors). I've created a task that does the following: <target name="--podspec.lint"> <exec executable="pod"

JNDI NameNotFoundException after Tomcat 8 upgrade

别说谁变了你拦得住时间么 提交于 2019-12-13 06:36:07
问题 I upgraded from Tomcat 8.0.18 to 8.0.23 and all of the sudden I have a JNDI issue. I looked at the changelogs, Tomcat 8 Changelogs, and I see three JNDI changes, though none strike me as something that would break a previously working configuration. JNDI related changes were made for bugs 49785, 57587, and an entry under 8.0.19 under "Other". I am receiving this exception when I start up Tomcat with 8.0.23: javax.naming.NameNotFoundException: Name [jdbc/MyCluster] is not bound in this Context

creating an executable jar file with ant which includes the build.xml file

对着背影说爱祢 提交于 2019-12-13 06:32:42
问题 I am trying to use ant to build an application, run the application's main() method, run junit tests, and package everything in a jar file (source+build+libraries+build.xml). The classes include a runner class with a main() method entry point. The objective however is to inlcude all libraries used, like junit.jar, and the ant build.xml itself. I was wondering if there is a way for the executable jar file, to run selected targets of the ant build file itslef, instead of just the main() method.

Preserve Original Filenames in Groovy Ant Task

人走茶凉 提交于 2019-12-13 06:27:25
问题 I have the following code: new AntBuilder().zip( destFile: "${file}.zip" ) { fileset( dir: srcDir ) { include( name:pattern ) } } In this example I'd like ant to create a zip with the same name as the original file, but with a .zip added to the end. Is there a way to do this without knowing the original file's name ahead of time in ant? I'd like to be able to do the same thing with other ant tasks as well. To put it another way, I'd like the filename to become whatever "pattern" resolves to

How to upload karma test report to sonar?

試著忘記壹切 提交于 2019-12-13 06:09:50
问题 I have karma configured which gives me coverage report perfectly fine. It gives me in lcov format. Referring to this http://docs.sonarqube.org/display/PLUG/JavaScript+Coverage+Results+Import lcov report can be uploaded to sonar. I have installed the plugin in sonar. My project builds through ant scripts so i have added <property name="sonar.javascript.lcov.reportPath" value="/lcov.info"/> I read on some blogs that lcov needs to be corrected so that sonar can understand it. I am done with it.