ant

Copying files from source directory to destination directory using ant

淺唱寂寞╮ 提交于 2019-12-13 21:56:12
问题 I want to copy some specific files from source directory to destination directory on below condition using ANT. Source folder contains the following files 35001_abc.sql 38001_abc.sql 38002_abc.sql 39001_abc.sql I want to copy the files with filenames starting with 36000 and above. The Output directory should contain the following files 38001_abc.sql 38002_abc.sql 39001_abc.sql 回答1: One idea is to use a regular expression on the filename to restrict ranges of digits. Example ├── build.xml ├──

Ant-javac doesn't see dependencies from Gradle

£可爱£侵袭症+ 提交于 2019-12-13 21:55:34
问题 I'm trying to migrate from ant to gradle. First phase of this is to move all dependecies to gradle.build and still build war via ant. In ant building task looks like that: <fileset id="project-libraries" dir="${project.libs.path}"> <include name="*jar"/> </fileset> <path id="master-classpath"> <fileset refid="project-libraries"/> <fileset refid="tomcat"/> <fileset refid="hibernate-tools"/> <fileset refid="findbug"/> <pathelement path="${build.dir}"/> </path> <target name="build" description=

CVS Checkout using MAVEN ANT plugin

▼魔方 西西 提交于 2019-12-13 21:37:31
问题 I am looking for following things. How to checkout code from CVS using MAVEN ANT plugin My CVS server name:cecvs02dv which can be accessed using user name and password (and cannot be accessed over HTTP) CVS folder: c:\cvs\dev Module name: IRM I can connect to CVS using below CVS command from Windows command prompt. />cvs -z3 -f -d :pserver:user:password@cecvs02dv:2401:c:\cvs\dev -q checkout -d checkout IRM Using above command I am able to checkout the code from CVS server. pom.xml:: ANT Maven

用jacoco统计代码覆盖率:不依赖ant的解决方案

断了今生、忘了曾经 提交于 2019-12-13 21:09:32
参考网上的教程,用jacoco统计代码覆盖率,需要用到jacoco和ant,我原来的计划也是jacoco和ant的方案,后来研究发现其实不用ant也可以实现,省去了ant的安装和配置,更加灵活方便。 相关软件下载: Sudo Wget http://mirrors.tuna.tsinghua.edu.cn/apache/maven/maven-3/3.6.3/binaries/apache-maven-3.6.3-bin.tar.gz sudo wget http://search.maven.org/remotecontent?filepath=org/jacoco/jacoco/0.8.5/jacoco-0.8.5.zip -O jacoco-0.8.5.zip Sudo wget https://mirrors.tuna.tsinghua.edu.cn/apache//ant/binaries/apache-ant-1.9.14-bin.tar.gz 关于jacoco和ant的具体安装和环境变量配置过程这里就不多说了,自行百度 jacoco统计代码覆盖率过程: 以springboot工程为例主要步骤为: 启动jar包时,指定jacocoagent.jar做为javaagent(output模式有 file/tcpserver/tcpclient ) dump出统计数据

Ant emma test with android “Could not find file coverage.em to delete.”

不羁的心 提交于 2019-12-13 21:08:34
问题 I'm trying to get code coverage set up for my android project with Ant and Emma, and I have the project successfully building, the tests successfully running, and the coverage.ec file generating, but the coverage reports aren't being generated. When I ran ant -verbose emma test I got the following clues: [report] nothing to do: no metadata found in any of the data files ... [delete] Could not find file /path/to/my/testProject/bin/coverage.em to delete. I'm using the default build.xml file

Bulding an multi-platform SWT application using Ant

允我心安 提交于 2019-12-13 20:24:24
问题 I'm writing an SWT application which can be used on Windows (32/64 bit) and Mac OSX (32/64 bit). Apart from the JRE I rely on the SWT library found here. I can find four versions of the SWT library depending upon my target platforms (as mentioned above). When building my application, how can I compile using the correct SWT Jar? If possible, I'd like to try and avoid hard-coding the Jar version, platform and architecture. The SWT Jars are named like this: swt-win32-x86_64.jar swt-win32-x86_32

ANT task - multiple files - loop through

三世轮回 提交于 2019-12-13 19:28:02
问题 I have quite complicated ant task to write. I had to make separate builds files and 1 left. There are 4 files: buildpackage.bat, buildpackage.xml, buildpackage.txt, structure.xml buildpackage.bat is just an ant file that calls buildpackage.xml "ant -f buildpackage.xml" . That is fine. buildpackage.txt is simple and has got comma-separated lines: server1,client1 server2,client2 genericserver,client[x] server[x],client[x] There is always server name and client name: Server name can be letters

How to update database by ant (versioning)?

会有一股神秘感。 提交于 2019-12-13 19:22:14
问题 I have a web application on java, which is working with database. I need an ant’s script that will deploy or update my application to latest version. There is no problem with application part, but I don't know how to do database update. I have an idea to build-in some meta-information (number of version) to the names of sql scripts. For example: DB_1.0.0.sql DB_1.0.1.sql DB_1.2.0.sql DB_2.0.0.sql DB_2.1.0.sql My script detected, that current version was 1.0.1, so I need to execute DB_1.2.0

Using ANT to generate a .jar in a very large project

╄→гoц情女王★ 提交于 2019-12-13 18:06:39
问题 I have a large project I'm working on (using Eclipse) that uses the 1.5 update 18 JDK, various external JARs, and the like. It's all been setup properly in Eclipse. Is it possible to create an Ant file that generates a JAR from a particular source file in my project? (A number of the source files are compilable into Java Applications. All of those share a lot of the same resources, thus the huge project workspace). So far, I've only been able to figure out how to create an Ant build file for

Ant: how to write optional nested elements

别来无恙 提交于 2019-12-13 16:24:01
问题 Say that I need to do something like: <copy todir="${DEPLOYMENT_DIR}" overwrite="true"> <fileset dir="dir1" /> <fileset dir="dir2" /> <fileset dir="dir3" /> ... <if> <equals arg1="${SPECIAL_BUILD}" arg2="true"/> <then> <fileset dir="dir7" /> <fileset dir="dir8" /> ... </then> </if> </copy> (The real task is not copy, I'm just using it to illustrate the point.) Ant will complain that my task doesn't support nested <if> which is fair enough. I've been thinking along these lines: I could add a