build.xml

CodenameOne :“Path to javac not found” error

心不动则不痛 提交于 2021-01-29 10:38:51
问题 I start working with CodenameOne tool for multiplatform mobile dev. When I created "hello world" app and tried to build an .apk android file, I received [echo] Error! Path to Javac not found! [echo] Make sure the JAVA_HOME enviroment variable is pointing to the JDK [echo] or define javac path in build.xml manually! I added JRE reference to the project, but this didn't solve the issue. How can I solve it? 回答1: Codename One needs to use the actual javac compiler and not ADT since some of our

Target overriding in Ant

孤人 提交于 2020-01-22 13:24:13
问题 Is there a possibility to literally override a target or emulate this somehow? So, when I call <target perform-after="release"> <do-something /> </target> It will act like this: <target name="release"> <antcall target="release" /> <!-- call previous version, not recursion --> <do-something /> </target> I think it has a meaning, I'll describe on Android example: We have an .xml templates for every build.xml in SDK folder ( {$SDK}/tools/ant/*.xml ), these files are included in every generated

Java application reads UTF-8 encoded text files but after ant build the characters are not as expected

孤人 提交于 2020-01-14 10:27:08
问题 I have a Java project that reads UTF-8 encoded .txt files in order to construct strings that are displayed. Running in Eclipse the files are read and displayed as expected but after my ant build the characters are not coming out as they should. Here is my build.xml file <?xml version="1.0"?> <project name="Rutherford" default="jar"> <property name="libsSrc" value="libs"/> <property name="build" value="build"/> <property name="classes" value="build/classes"/> <property name="jar" value="build

How to encode Java files in UTF-8 using Apache Ant?

不羁岁月 提交于 2020-01-03 10:56:12
问题 In my build.xml file I fetch some Java files by cxf. Some of these Java files need to be encoded in UTF-8. How can I use Ant to change the encoding to UTF-8? PS: I found instructions for how to set the encoding for javac to UTF-8, but prior to javac I need Java files to be in UTF-8. Otherwise I get an error: warning: unmappable character for encoding utf-8 Here is my code: <macrodef name="lpwservice"> <attribute name="name"/> <attribute name="package"/> <sequential> <property name="wsdlfile"

using ant read the build.xml ,according to the order written in <include >tag

走远了吗. 提交于 2019-12-24 23:25:05
问题 Here i want to compile/run first ExceuteLeadTest.class and then ExceuteContactTest.class by the ant ..But while exceuting it first it comipling/running ExcecuteContactTest.java/ExceuteContactTest.class <project> <target name="run" depends="compile"> <include name="testScript/ExceuteLeadTest.class" /> <include name="testScript/ExceuteContactTest.class" /> </target> <project> 回答1: In Ant you can use the sequential tag to run tasks in order. Normally Ant processes dependencies and runs each only

NoClassDefFoundError at runtime with ant

怎甘沉沦 提交于 2019-12-24 16:13:03
问题 well I'm trying to configure the project with Ant and this is what I get: D:\Dropbox\EclipseWorkspace\PIRS_Arturas_Masaitis\src\lib>dir Volume in drive D is WinMedia Volume Serial Number is 8ED9-B662 Directory of D:\Dropbox\EclipseWorkspace\PIRS_Arturas_Masaitis\src\lib 2012.11.20 16:11 <DIR> . 2012.11.20 16:11 <DIR> .. 2012.10.16 22:03 315.805 commons-lang3-3.1.jar 2012.10.23 23:08 176.897 commons-validator-1.4.0.jar 2012.11.20 15:30 <DIR> hibernate 2012.11.16 04:48 253.160 junit-4.10.jar

Build.xml is failing to send email, gives “java.lang.ClassNotFoundException: javax.mail.internet.MimeMessage” error

此生再无相见时 提交于 2019-12-24 12:05:07
问题 Below is one of the targets that runs after the completion of tests, buil.xml(pass or fail). This target is failing and giving error "java.lang.ClassNotFoundException: javax.mail.internet.MimeMessage". So I expanded the mail.1.4.jar file and saw this class was there. So next I checked that this jar was there in my setclasspath target or not, and it was there. Third thing I checked that mail.1.4.jar was included in ant's path or not and it was there. Now I am not able to understand why I am

JAR File NoClassDefFoundError

喜夏-厌秋 提交于 2019-12-24 07:27:04
问题 I am trying to build a runnable JAR file of a project by using build.xml file and the prompt code cd <the directory of you application> ant -f bin/build.xml jar But I have exceptions when I run the JAR because I cannot add the external JAR. the build.xml is as follows: <?xml version="1.0" encoding="ISO-8859-1" ?> <!-- This file was generated by Jason 1.3.9-alpha http://jason.sf.net Ocak 11, 2014 - 01:09:12 --> <project name ="virtualClassroom" basedir=".." default="run"> <property name="mas2j

How can I use an Ant foreach iteration with values from a file?

回眸只為那壹抹淺笑 提交于 2019-12-23 13:26:10
问题 In our Ant build environment, I have to do the same task for a number of items. The AntContrib foreach task is useful for that. However, the list is in a parameter, where I actually have the list in a file. How can I iterate over items in a file in an foreach-like way in Ant? Something like (pseudo-code): <foreach target="compile-module" listFromFile="$fileWithModules"/> I'm happy to write a custom Task, and welcome any suggestion on possible solutions. 回答1: I tried to load the file into a

run a jar file (generated by ant) in command line

喜欢而已 提交于 2019-12-23 02:41:50
问题 I have a build.xml file that works fine. The problem is that the generated jar file, and I need to run it without 'ant run' How can I run the jar file? running with java -jar Main.jar main.Main gives me: Exception in thread "main" java.lang.NoClassDefFoundError: org/neo4j/graphdb/GraphDatabaseService This is how I'm creating the jar file (build.xml): <target name="jar" depends="compile"> <mkdir dir="${jar.dir}"/> <jar destfile= "${jar.dir}/${ant.project.name}.jar" basedir="${build.dir}">