ant

using ant ivy in netbeans

空扰寡人 提交于 2019-12-06 19:42:30
Since I am new to Ant+Ivy this might sound very naive question but please bear with me. I recently installed Ivy plugin to work with netbeans. But I don't know what to do next? Do I have to create ivy.xml file myself ? do I have to add its reference to nbbuild.xml somewhere? if yes where? and finally how to write ivy.xml to fetch latest versions of the libraries I am using. e.g. I am using jgraph.jar, commons-codec-1.6.jar etc, Can somebody demonstrate how to write code in ivy.xml file to fetch the latest versions of these? These are available in the maven central repository , Can I connect to

How can I use a zipfileset src attribute without having to specify it manually for all my jars?

自古美人都是妖i 提交于 2019-12-06 19:21:10
问题 I currently have this: <jarjar destfile="a.jar" manifest="Manifest.mf"> <zipfileset src="first.jar"/> <zipfileset src="second.jar"/> </jarjar> The problem is I have to manually specify each jar, because I need the src parameter to be taken in consideration. I would want something like this: <zipfileset> <include name="*.jar"/> <zipfileset> And have their contents extracted and included in my resulting archive. Is this possible? 回答1: Maybe you could merge the jars first with: <zip destfile=

package org.apache.commons.io does not exist error

大憨熊 提交于 2019-12-06 19:16:24
问题 I am compiling a .java file using ant compiler. I am getting the following errror "package org.apache.commons.io does not exist error" I downloaded the apache Commons IO binaries and pasted the .jar files in "C:\Program Files\Java\jdk1.7.0_51\lib\missioncontrol\plugins " Any help. Do I need to modify the classpath of my build xml file? <target name="compile" description="Compile source code"> <mkdir dir="${build.dir}/classes"/> <javac includeantruntime="false" srcdir="src" destdir="${build

Problems with setting the classpath in ant

孤人 提交于 2019-12-06 18:58:23
问题 I'm having problems getting my Java program to run (it uses some third party JARs). I can compile it fine but when I call my run target in ant it says it can't find the class that I told it run in the classpath. Here's what my build.xml looks like: <project basedir="." default="build"> <property name="build" value="build" /> <property name="src" value="." /> <property name="lib" value="lib" /> <path id="classpath"> <fileset dir="${lib}"> <include name="**/*.jar" /> </fileset> <fileset dir="$

ant file that depends on another ant file

坚强是说给别人听的谎言 提交于 2019-12-06 18:55:30
问题 I have two projects, each with its own ant build file. What should I do so that, when I build project B, it will first build project A using project A's antfile? 回答1: You can achieve this by using the ant task, which runs ant on an external buildfile. Example: <ant antfile="../otherproject/build.xml" target="compile"/> Properties By default all current properties are passed to the invoked ant build, this can be disabled by setting inheritAll="false" , if you want the other build to behave

library resolve to a path with no project.properties file

六眼飞鱼酱① 提交于 2019-12-06 18:51:53
问题 I'm having trouble building my project with Jenkins and referencing the Sherlock project library. I can build the project with ant on my local system. The problem seems to be referencing the Sherlock library on the build server. I pass an environment variable to ant with the relative path to the Sherlock library project: android.library.reference.1=../../buildlibraries/androidlibraries/sherlock/library I'm getting this error. **BUILD FAILED** /SDK/android-sdk-macosx/tools/ant/build.xml:595:

Is it possible to call ant task from a javascript scriptdef task?

本小妞迷上赌 提交于 2019-12-06 18:50:11
问题 Is it possible to call an ant task that is in the same ant script from a javascript scripdef task? 回答1: Yes. In case you meant target, rather than a task, here are examples of both: <target name="test"> <echo message="In test target" /> </target> <scriptdef name="demo" language="javascript"> <![CDATA[ self.project.executeTarget( "test" ); var task = project.createTask( "echo" ); task.setMessage( "In demo task" ); task.perform( ); ]]> </scriptdef> <demo /> When run, yields: test: [echo] In

Set ant bootclasspath: JDK 1.7 has a new javac warning for setting an older source without bootclasspath

删除回忆录丶 提交于 2019-12-06 18:36:41
问题 How do I set the ant bootclasspath in conjunction with -source 1.5 -target 1.5? How can this not be a hardcoded path to the 1.5 JDK? Can I set an environment variable to bootclasspath similar to how JAVA_HOME can be used from ant? Ideally I would like to do something like set an environment variable or pass an argument to ant. 回答1: Here's an illustration of how you might fetch the Java 5 boot classes location from an environment variable, then use it. First, set the environment variable - say

Can Ant properties resolve other properties?

为君一笑 提交于 2019-12-06 18:27:56
问题 Can Ant properties set via properties file, resolve other properties from properties files? For example, I can do this: <property name="prop1" value="in_test_xml1" /> <property name="prop2" value="${prop1}" /> and prop2 becomes "in_test_xml1". That's good. But in this case, when using an input properties file: prop1=sample_prop prop2=${prop1} prop2 is not set to "sample_prop" So resolving properties from other properties only seems to work when the property doing the resolving is in the ant