ant

Is it possible to replace text in properties in Ant's build.xml?

蓝咒 提交于 2019-12-19 04:14:30
问题 I have a property, app.version, which is set to 1.2.0 (and, of course, always changing) and need to create zip file with name "something-ver-1_2_0". Is this possible? 回答1: You can use the pathconvert task to replace "." with "_" and assign to a new property: <?xml version="1.0" encoding="UTF-8"?> <project> <property name="app.version" value="1.2.0"/> <pathconvert property="app.version.underscore" dirsep="" pathsep="" description="Replace '.' with '_' and assign value to new property"> <path

How to fork a background process in Jenkins? Setting BUILD_ID and using nohup seems to be non working

岁酱吖の 提交于 2019-12-19 04:08:11
问题 I have a maven job in Jenkins(version 1.578). The maven snippet (Ant script written in Groovy code) below starts a Fuse server, and I cannot make Jenkins to leave it running after the job finishes. <profile> <id>start-fuse</id> <build> <plugins> <plugin> <groupId>org.codehaus.gmaven</groupId> <artifactId>gmaven-plugin</artifactId> <executions> <execution> <id>start-fuse</id> <phase>integration-test</phase> <goals> <goal>execute</goal> </goals> <configuration> <source> <![CDATA[ def

Use Ant in netbeans to dynamically fetch latest versions of external libraries during build

馋奶兔 提交于 2019-12-19 04:00:47
问题 I am an Ant newbie really. Here is my problem : I have a project in netbeans which uses several external libraries which are currently present in /lib directory. I want my netbeans to dynamically fetch latest versions of those libraries when it tries to build the project. Is this doable or am I on the completely wrong path? I have URLs for each of the external libraries, where do I need to specify those in order for this experiment to work? Any help on this is appreciated, I am completely

Maven: access version of transitive dependency via property

大憨熊 提交于 2019-12-19 03:38:04
问题 In a Maven project, one of my direct dependency has an indirect dependency com.foo:bar. What I need, is a Maven property (e.g. ${bar-version} ) with the version number of this artifact. I need this mechanism for the version numbers of several indirect dependencies. I learned from that question that I can access the local path of the artifact's jar with ${maven.dependency.com.foo.bar.jar.path} within the antrun plugin. The workaround I am using now, is to parse its value (e.g. /path/to

Is there an easy way to generate an Ant build script from a Maven POM?

◇◆丶佛笑我妖孽 提交于 2019-12-19 03:24:14
问题 We have a project that uses Maven as its build/dependency management tool. But our code needs to be compiled at our client's site and our client demands that we deliver build scripts written for Ant. So, we would like to keep working with Maven and automatically generate the Ant scripts when we need to deliver the code to the client. Can we do that? 回答1: You can use the Maven Ant Plugin. 来源: https://stackoverflow.com/questions/2056729/is-there-an-easy-way-to-generate-an-ant-build-script-from

Delete duplicate files using ant?

荒凉一梦 提交于 2019-12-19 03:22:56
问题 Is there a way to delete duplicate files using ant? Specifically, if I have the same file name in two different output directories, I want to delete it from the second directory. 回答1: I think I came up with a solution. <target name="delete-duplicates"> <delete> <fileset dir="delete-here" includes="**/*"> <present targetdir="if-present-here" /> </fileset> </delete> </target> 来源: https://stackoverflow.com/questions/3088338/delete-duplicate-files-using-ant

How to build an android test app with a dependency on another app using ant?

走远了吗. 提交于 2019-12-19 03:19:15
问题 I have a module called MyApp, and another module called MyAppTests which has a dependency on MyApp. Both modules produce APKs, one named MyApp.apk and the other MyAppTests.apk. I normally build these in IntelliJ or Eclipse, but I'd like to create an ant buildfile for them for the purpose of continuous integration. I used "android update" to create a buildfile for MyApp, and thanks to commonsware's answer to my previous question I've been able to build it successfully using ant. I'd now like

How Apache Ant deploys .war file to Tomcat

巧了我就是萌 提交于 2019-12-19 02:57:29
问题 I'm using Apache Ant 1.8 to deploy a web application into a local Tomcat server, and the build.xml file (below) produces the desired effect when I run 'ant deploy' at the command line. My question is, I noticed that the .war file gets placed where I expect it to (deploy.dir is defined in my home directory's build.properties file), but it also unexpectedly unpacked the .war and extracted the context itself into that same directory. Where in the below build.xml file is that configured? <target

Ivy: Fetching Javadocs and Sources

拟墨画扇 提交于 2019-12-19 02:39:10
问题 I'm fairly new to Ivy, but have gotten it to work with jar dependencies. The problem is trying to set it up, so I can fetch javadocs and sources independently of jars. I have a simple test project, but no matter what I'm doing, I'm fetching the jar with the class files in it. I have the following ivy.xml file: <ivy-module version="1.0"> <info organisation="com.vegicorp" module="test" revision="1.0" status="release"/> <configurations> <conf name="default" visibility="public" extends="runtime

How can I include data text files in a jar using Ant?

夙愿已清 提交于 2019-12-19 02:31:19
问题 In my src folder there is another folder called data which contains files data1.txt and data2.txt. The application loads a graph from these files in the initialization, so I want to include these files in my final jar. I use Ant to produce the jar file. 回答1: Example from http://ant.apache.org/manual/Tasks/jar.html : <jar destfile="${dist}/lib/app.jar"> <fileset dir="${build}/classes"/> <fileset dir="${src}/resources"/> </jar> So basically you would want to include the data-files in the same