ant-contrib

How can I iterate over properties from a file?

徘徊边缘 提交于 2019-11-29 11:35:44
问题 All my projects and their versions are defined in a properties file like this: ProjectNameA=0.0.1 ProjectNameB=1.4.2 I'd like to iterate over all the projects, and use their names and versions in an Ant script. At present I read the entire file using the property task, then iterate over a given list in a for loop like this: <for list="ProjectNameA,ProjectNameB" param="project"> <sequential> <echo message="@{project} has version ${@{project}}" /> </sequential> </for> How can I avoid the hard

ant-contrib - if/then/else task

我的未来我决定 提交于 2019-11-29 01:17:05
问题 I am using ant, and I have a problem with if/then/else task, (ant-contrib-1.0b3.jar). I am running something that can be simplified with build.xml below. I am expecting to obtain from 'ant -Dgiv=Luke' the message input name: Luke should be overwritten with John except for Mark: John but it seems property "giv" is not overwritten inside if/then/else.. input name: Luke should be overwritten with John except for Mark: Luke Is it depending from the fact I am using equals task with ${giv} ?

There isn't antlib.xml in my ant-contrib-0.3

六眼飞鱼酱① 提交于 2019-11-28 11:41:38
问题 I am trying to use task for . I tried with this task definition: <taskdef resource="net/sf/antcontrib/antlib.xml"> <classpath> <pathelement location="${infrastructure-base-dir}/apache-ant-1.9.6/lib/ant-contrib-0.3.jar"/> </classpath> </taskdef> But didn't work. This message appear: Problem: failed to create task or type for So I decider to unzip ant-contrib-0.3.jar to see what's inside. And there wasn't antlib.xml in this path: net/sf/antcontrib/ . So what would you advise me in order to make

execute Ant task if TWO conditions are met

旧时模样 提交于 2019-11-28 07:12:53
问题 The above ant script implements if dir_is_empty then git-clone else git-fetch using Ant-1.7.1 core statements: <target name="update" depends="git.clone, git.fetch" /> <target name="check.dir"> <fileset dir="${dir}" id="fileset"/> <pathconvert refid="fileset" property="dir.contains-files" setonempty="false"/> </target> <target name="git.clone" depends="check.dir" unless="dir.contains-files"> <exec executable="git"> <arg value="clone"/> <arg value="${repo}"/> <arg value="${dir}"/> </exec> <

Getting an error “Could not load definitions from resource net/sf/antcontrib/antcontrib.properties. It could not be found.”

南笙酒味 提交于 2019-11-27 23:11:54
问题 I am getting an error Could not load definitions from resource net/sf/antcontrib/antcontrib.properties. It could not be found. when I am trying to ant build on eclipse. So I downloaded ant-contrib-0.6.jar and kept it in my /lib location of apache ant, but it still does not resolve my issue. I have also tried by specifying the /lib location in my CLASSPATH system variable. How can I get around this error? 回答1: You can provide full path to the ant-contrib JAR explicitly using "classpath"

Using antcontrib <if> task via maven-antrun-plugin

℡╲_俬逩灬. 提交于 2019-11-27 15:29:48
My maven java project uses the maven-antrun-plugin to execute a deploy.xml ant script that deploys my app. The deploy.xml uses the <if> task and this seems to be causing the problem; [INFO] Executing tasks [taskdef] Could not load definitions from resource net/sf/antcontrib/antlib.xml. It could not be found. deploy: [INFO] ------------------------------------------------------------------------ [ERROR] BUILD ERROR [INFO] ------------------------------------------------------------------------ [INFO] An Ant BuildException has occured: The following error occurred while executing this line: E:

Using antcontrib <if> task via maven-antrun-plugin

空扰寡人 提交于 2019-11-26 17:11:49
问题 My maven java project uses the maven-antrun-plugin to execute a deploy.xml ant script that deploys my app. The deploy.xml uses the <if> task and this seems to be causing the problem; [INFO] Executing tasks [taskdef] Could not load definitions from resource net/sf/antcontrib/antlib.xml. It could not be found. deploy: [INFO] ------------------------------------------------------------------------ [ERROR] BUILD ERROR [INFO] ------------------------------------------------------------------------