ant

How to include directory structure in an ant jar file?

泪湿孤枕 提交于 2019-12-17 18:56:00
问题 I am a bit of an ant newbie, and I'm having trouble making a jar correctly. As an example, say I want to make a jar with my StringUtil class. Using the following ant directive, I can create the jar, but the problem is that the directory structure is lost. It simply puts StringUtil.class in the base directory of the jar. How can I correct this ant directive so that StringUtil.class is inside the com/test directory in the jar? <jar destfile="myjar.jar" > <fileset file="${build}/com/test

Phonegap/Cordova build android node_modules/q/q.js throw e;

喜夏-厌秋 提交于 2019-12-17 18:37:05
问题 cordova build android gives me the following err node_modules/q/q.js:126 throw e; (*error details) This question has been asked before, but the typical answer regarding PATH and ANDROID_HOME hasn't worked for me. I've put this into code snippet to avoid SO submission problems export HOME="/Users/rover" export ANDROID_SDK="$HOME/Documents/Dev/Android/adt-bundle-mac-x86_64-20140702/sdk" export ANDROID_HOME="$ANDROID_SDK/tools" export ANDROID_PLATFORM_TOOLS="$ANDROID_SDK/platform-tools" export

How can I ensure all output from Ant's exec task goes to stdout?

試著忘記壹切 提交于 2019-12-17 18:34:46
问题 The Ant exec task has an output property which can be used to tell Ant where the output goes. I've used it to redirect the output to a file. The thing is, if I don't do something with the output, the stuff that Ant prints isn't that much of a help - it's not complete. Is there someway of setting the output property to System.out ? 回答1: When executing a batch file with ant's apply or exec tasks on Windows, I found there are special cases where some of the stdout and stderr is not captured by

Ant error when trying to build file, can't find tools.jar?

不想你离开。 提交于 2019-12-17 18:12:08
问题 When I run ant it says: Unable to locate tools.jar. Expected to find it in C:\Program Files\Java\jre6\lib\tools.jar Buildfile: build.xml does not exist! Build failed What package can I use to download the file required > C:\Program Files\Java\jre6\lib\tools.jar I just downloaded this one: jre-6u19-windows-i586-s.exe but unfortunately it appears that it was not on it... 回答1: Java ships in 2 versions: JRE & SDK (used to be called JDK) The JRE in addition to not containing the compiler, also

Why am I getting a ClassCastException when generating javadocs?

半腔热情 提交于 2019-12-17 17:53:45
问题 I'm using ant to generate javadocs, but get this exception over and over - why? I'm using JDK version 1.6.0_06 . [javadoc] java.lang.ClassCastException: com.sun.tools.javadoc.ClassDocImpl cannot be cast to com.sun.javadoc.AnnotationTypeDoc [javadoc] at com.sun.tools.javadoc.AnnotationDescImpl.annotationType(AnnotationDescImpl.java:46) [javadoc] at com.sun.tools.doclets.formats.html.HtmlDocletWriter.getAnnotations(HtmlDocletWriter.java:1739) [javadoc] at com.sun.tools.doclets.formats.html

Why does ANT tell me that JAVA_HOME is wrong when it is not?

孤者浪人 提交于 2019-12-17 17:33:25
问题 I get the error: C:\dev\ws\springapp\build.xml:81: Unable to find a javac compiler; com.sun.tools.javac.Main is not on the classpath. Perhaps JAVA_HOME does not point to the JDK. It is currently set to "C:\Program Files\Java\jre6" But I have clearly set my JAVA_HOME to be C:\Program Files\Java\jdk1.6.0_14 Where is ANT getting this value? 回答1: When you say you have "clearly set" JAVA_HOME to "C:\Program Files\Java\jdk1.6.0_14" - is that what you see when you run "set" from the command line? I

XML configuration inheritance, avoid duplications

穿精又带淫゛_ 提交于 2019-12-17 16:54:08
问题 Imagine a situation when you have about 10+ big XML configuration files for multiple environments which are almost identical. Sometimes you have to add a new option, which leads to modification of all those 10..20..30+ files with the same data. You make mistakes. You get conflicts when merging with other branches. You got nervous and depressed. Are there any good tools that provide something like inheritance for plain XML files (not Spring.cgf or POM)? Or I have to write an ant or maven

Parse HTML using with an Ant Script

江枫思渺然 提交于 2019-12-17 16:40:37
问题 I need to retrieve some values from an HTML file. I need to use Ant so I can use these values in other parts of my script. Can this even be achieved in Ant? 回答1: As stated in the other answers you can't do this in "pure" XML. You need to embed a programming language. My personal favourite is Groovy, it's integration with ANT is excellent. Here's a sample which retrieves the logo URL, from the groovy homepage: parse: print: [echo] [echo] Logo URL: http://groovy.codehaus.org/images/groovy-logo

running junits and cobertura with maven

人盡茶涼 提交于 2019-12-17 16:16:37
问题 In our project, we run both junits and cobertura using maven. The problem I am facing is that, junit test cases are running twice, once before the jar creation process and then once again for generating cobertura coverage reports. When running cobertura and junits with ant, we run junits only once since, cobertura runs along with junits. Is there a way to configure the above case with maven. I know we can use "maven.test.skip" property to skip junits. But when I do this, I am not able to see

Proxy settings with ivy

牧云@^-^@ 提交于 2019-12-17 15:46:13
问题 I have an issue where in I have defined dependancies in ivy.xml on our internal corporate svn. I am able to access this svn site without any proxy task in ant. While my dependencies resides on ibiblio, that’s something outside our corporate, and needs proxy inorder to download something. I am facing problem using ivy here. I have following in build.xml <target name="proxy"> <property name="proxy.host" value="xyz.proxy.net"/> <property name="proxy.port" value="8443"/> <setproxy proxyhost="$