ant

android-datepicker: UNEXPECTED TOP-LEVEL EXCEPTION: classes.jar not found

只愿长相守 提交于 2019-12-20 03:19:47
问题 I'm trying to include Simon's DatePicker lib project (https://github.com/SimonVT/android-datepicker) in my own project. The README file says it depends on both his NumberPicker and CalendarView lib projects. So I placed all three projects in my project dir, ran android update lib-project on them (I'm using ant), added the NumberPicker and CalendarView libs as dependencies of the DatePicker lib and the DatePicker lib as a dependency of my own project. Up until now all is well. It also compiles

Problem running a Jar file

浪尽此生 提交于 2019-12-20 03:13:33
问题 I've compiled a java project into a Jar file, and am having issues running it. When I run: java -jar myJar.jar I get the following error Could not find the main class: myClass The class file is not in the root directory of the jar so I've tried changing the path of the main class to match the path to the class file and I get the same issue. Should I be flattening the file structure? if so how do I do this. I'm using Ant to build the Jar file if thats of any use. UPDATE Here is the contents of

How to set a property in java code using build.xml

萝らか妹 提交于 2019-12-20 03:06:30
问题 I am new to Ant and any help will be appreciated. What I want to do is: When I am invoking an Ant target, I am doing : ant -DSIMV3.1=true run-tenantManagement Now Inside build.xml, I have: <target name="run-tenantManagement" depends="jar"> <property name="SIMV3.1" value="${SIMV3.1}" /> ... </target> Now I want the value of the property SIMV3.1 to be visible inside my java code. Because in my java code, I want to set a condition that: if(SIMV3.1==true){ //do something }else{ //do something

How to replace value of an XML field using Ant?

女生的网名这么多〃 提交于 2019-12-20 03:06:06
问题 In an Ant script, I need to replace the value of javax.persistence.jdbc.url property in the following persistence.xml file. <?xml version="1.0" encoding="UTF-8"?> <persistence version="2.0" xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd"> <persistence-unit name="testPU" transaction-type="RESOURCE_LOCAL"> <provider>org

Iterate over for loop with fixed amount of iterations

雨燕双飞 提交于 2019-12-20 02:27:08
问题 I am using ant-contrib library in my ant scripts, but I do not get how can I make a fixed amount of loops using foreach tag? By fixed amount of iterations I do not mean some hardcoded value, but the ant property, supplied from command line. 回答1: The following code creates a loop with a fixed number of 5 iterations: <target name="example"> <foreach param="calleeparam" list="0,1,2,3,4" target="callee"/> </target> <target name="callee"> <echo message="${calleeparam}"/> </target> It prints

Error with Ant build copying files, “Access is denied”

杀马特。学长 韩版系。学妹 提交于 2019-12-20 02:16:41
问题 I have a weird bug that is popping up in my Ant build. The build works as such: build.xml calls a new buildTargets.xml file, and in that file most of the work is being done. buildTargets.xml creates a bunch of new files in gwt-out/htdocs/** and another directory staging/htdocs/**. Basically, files are being created in gwt-out/htdocs and then copied into staging/htdocs. The error is that only one file is not being copied, and I am getting a java.IO.FileNotFoundException (Access is denied)

subant failonerror subtleties

 ̄綄美尐妖づ 提交于 2019-12-20 01:14:22
问题 I have ant code that kicks off a release build in all subdirectories: <target name="all-release" > <subant target="sub-release" failonerror="true"> <fileset dir="." includes="*/build.xml" /> </subant> </target> As written, if any individual build fails, all-release will fail fast (none of the later builds will succeed. If I switch failonerror="false", the all-release will succeed all the time. It turns out that all the sub-builds are independent, so what I really want is: run all sub-release

subant failonerror subtleties

半腔热情 提交于 2019-12-20 01:14:07
问题 I have ant code that kicks off a release build in all subdirectories: <target name="all-release" > <subant target="sub-release" failonerror="true"> <fileset dir="." includes="*/build.xml" /> </subant> </target> As written, if any individual build fails, all-release will fail fast (none of the later builds will succeed. If I switch failonerror="false", the all-release will succeed all the time. It turns out that all the sub-builds are independent, so what I really want is: run all sub-release

Netbeans - adding resource files to jar file with Ant

老子叫甜甜 提交于 2019-12-19 21:44:12
问题 I want add some resource files (non-code text-based files) to the jar file in a Java project using Netbeans 6.9, I'd expect using Ant. I had thought that this would be reasonably simple...but after quite a bit of searching I can't find how to do it..! Any pointers in the right direction? 回答1: The answer I think I was looking for is as follows: In the build.xml file (as per trashgod's answer) you can use the hooks already in the ant build script to add the following: <target name="-post-jar">

ANT: How to modify java.library.path in a buildfile

旧街凉风 提交于 2019-12-19 18:53:59
问题 The java.library.path property appears to be read-only. For example when you run ant on the following buildfile <project name="MyProject" default="showprops" basedir="."> <property name="java.library.path" value="test"/> <property name="some.other.property" value="test1"/> <target name="showprops"> <echo>java.library.path=${java.library.path}</echo> <echo>some.other.property=${some.other.property}</echo> </target> </project> you get > ant -version Apache Ant version 1.6.5 compiled on June 2