build.xml

How can I include a folder into the dist JAR as part of the build process using Netbeans?

冷暖自知 提交于 2019-12-01 18:43:01
I'm using Netbeans 6.9 , and I have looked into editing the build.xml file so that I can include directories and files in the jar file that results from building the project. So my question is How do I modify the build.xml file to put other folders in the jar? I have the following directory structure for my project ProjectDir/ /images/ /src/com/... /lib/ and so on.. And I want the jar file built by the ant build script to look like project.jar /com /lib --this should include the jar files inside the lib folder /images --this should include the jpg files /META-INF I need to do this because I

How to include external libraries in Ant build.xml file?

China☆狼群 提交于 2019-12-01 04:38:25
In my Java source-code I want to use different classes from java archives (.jar) stored in my application's "lib" directory. But if I do "ant run" then I always get a "java.lang.NoClassDefFoundError" message. I tried several things to fix it but nothing worked... Maybe someone here can help me? This is my build.properties file: app.name=MyApplication app.version=1.0 main.class=mypackage.MyMain build.dir=build classes.dir=${build.dir}/classes jar.dir=${build.dir}/jar dist.dir=dist src.dir=src test.dir=test lib.dir=lib This is my build.xml : <?xml version="1.0" encoding="UTF-8" ?> <project name=

How to include external libraries in Ant build.xml file?

ぃ、小莉子 提交于 2019-12-01 02:38:37
问题 In my Java source-code I want to use different classes from java archives (.jar) stored in my application's "lib" directory. But if I do "ant run" then I always get a "java.lang.NoClassDefFoundError" message. I tried several things to fix it but nothing worked... Maybe someone here can help me? This is my build.properties file: app.name=MyApplication app.version=1.0 main.class=mypackage.MyMain build.dir=build classes.dir=${build.dir}/classes jar.dir=${build.dir}/jar dist.dir=dist src.dir=src

Netbeans Export to Jar, include all library files

China☆狼群 提交于 2019-11-30 12:35:07
What I really need is an equivalent of this from Eclipse with Netbeans: I want to Extract required libraries into generated JAR so I can distribute it without the need of including the lib folder everywhere it goes. Here's the original question. I'm trying to build a jar out of Netbeans that will package all the library files inside it. I've heard it's possible with Eclipse by choosing Export. With Netbeans, if I "Clean and Build" it will create an executable jar in the dist folder, but all the libraries it depends on are in a folder called lib. I need it all to be in one jar file. I'm

Build error referencing build.xml and proguard file: “null returned: 1”

南笙酒味 提交于 2019-11-29 18:47:07
问题 While building my PhoneGap app (with the Facebook SDK plugin installed), I encountered this error: BUILD FAILED C:\adt-bundle-windows-x86_64-20130522\sdk\tools\ant\build.xml:653: The following error occured while executing this line: C:\adt-bundle-windows-x86_64-20130522\sdk\tools\ant\build.xml:698: null returned: 1 Line 653 is: <do-only-if-manifest-hasCode elseText="hasCode = false. Skipp aidl/renderscript/R.java"> Line 698 is: proguardFile="${out.absolute.dir}/proguard.txt" My solutions so

NoClassDefFoundError when running Instrumentation test with ant

醉酒当歌 提交于 2019-11-29 13:42:32
(This is an Android SDK tools v17 problem. Expect a fix in v18) I have a test target project A, and a tester project B. Project A has FlurryAgent.jar in its libs folder. Project B has robotium-solo-3.1.jar in its libs folder When I compile and run them, cd A android update project -p . cd .. cd B android update test-project -p . -m ../A ant all clean debug ant uninstall ant installt ant test ant test fails to execute tests: test: [echo] Running tests ... [exec] [exec] com.example.r17.test.TestOne: [exec] INSTRUMENTATION_RESULT: shortMsg=java.lang.NoClassDefFoundError [exec] INSTRUMENTATION

How can I specify the path of a JAR in an ant buildfile?

删除回忆录丶 提交于 2019-11-29 10:05:28
I am executing lot of scp and sshexec and other remote commands from an ant build script. These commands don't work if jsch.jar isn't in the ant lib directory. To make it work, I copied the JAR into the ant lib directory, but this is not a good solution, as anyone else wanting to run the script would have to do the same thing. To run the ant target from Teamcity, we will have to explicitly set the path of the lib file. Is there a way I can specify the path of the JAR in the ant build XML itself? Thanks all for your answers. I am managed to get it work with classloader task. This is what I did.

Where are classpath, path and pathelement documented in Ant version 1.8.0?

萝らか妹 提交于 2019-11-28 20:05:00
I'm looking over the documentation that comes with Apache Ant version 1.8.0 and can't find where classpath, path and pathelement are documented. I've found a page that describes path like structures but it doesn't list the valid attributes or nested elements for these. Another thing I can't find in the documentation is a description of the relationships between filelist, fileset, patternset and path and how to convert them back and forth. For instance there has to be an easier way to compile only those classes in one package while removing all class dependencies on the package classes and

NoClassDefFoundError when running Instrumentation test with ant

南楼画角 提交于 2019-11-28 08:01:43
问题 (This is an Android SDK tools v17 problem. Expect a fix in v18) I have a test target project A, and a tester project B. Project A has FlurryAgent.jar in its libs folder. Project B has robotium-solo-3.1.jar in its libs folder When I compile and run them, cd A android update project -p . cd .. cd B android update test-project -p . -m ../A ant all clean debug ant uninstall ant installt ant test ant test fails to execute tests: test: [echo] Running tests ... [exec] [exec] com.example.r17.test

How can I specify the path of a JAR in an ant buildfile?

非 Y 不嫁゛ 提交于 2019-11-28 03:26:39
问题 I am executing lot of scp and sshexec and other remote commands from an ant build script. These commands don't work if jsch.jar isn't in the ant lib directory. To make it work, I copied the JAR into the ant lib directory, but this is not a good solution, as anyone else wanting to run the script would have to do the same thing. To run the ant target from Teamcity, we will have to explicitly set the path of the lib file. Is there a way I can specify the path of the JAR in the ant build XML