ant

Unable to properly install binary edition of Apache Ant

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-13 16:09:45
问题 I'm following this tutorial to install the binary edition of Apache Ant. Unfortunately, when I get to the "optional" step 5, I'm unable to get some resources. That is, an error occurs while processing the Maven artifact tasks. When I try to navigate to the servers, it appears that they are either down, or non-existent. Anyone else encounter this problem? And I just found this piece of information regarding the HTTP 403 response code, This response is returned by the Apache web server when

Bad class file failed the ant build

你离开我真会死。 提交于 2019-12-13 16:06:48
问题 I just changed jdk from 1.6 to 1.8 and when making an new ant build, it gives such error messages: [javac] /usr/workspace/test/src/JsonString.java:7: cannot access java.lang.Object [javac] bad class file: java/lang/Object.class(java/lang:Object.class) [javac] class file has wrong version 52.0, should be 50.0 [javac] Please remove or make sure it appears in the correct subdirectory of the classpath. [javac] public class JsonString { [javac] This is weird. the Object class should be in java1.8

check all files in fileset contain a string in ant

半腔热情 提交于 2019-12-13 15:43:04
问题 Can anyone provide an example of an ant build which checks if all files found by a fileset contain some token and do not contain some other token? (google has not been very useful with this, so here I am...) 回答1: I think this can be done using ant's resourcecontains condition, but I'm not sure it accept multiple resources (see the docs for details). However, it can be done using resourcecount contition: <project name="Test" default="main" basedir="."> <patternset id="filestotest"> <include

Jar Can't Find Main Method - Connected to main class, but can't access method

和自甴很熟 提交于 2019-12-13 15:37:58
问题 I've been working on a project in Eclipse and everything's been going smooth except for some Ant issues along the way. My code compiles perfectly and does exactly what I want it to do, but, when it's in a jar, I get the error: Exception in thread "main" java.lang.NoSuchMethodError: main Main definitely exists in the file, so my guess is that it has to do with the way the file is constructed. I've been using SuperCSV to read some excel sheets I have and have constructed my main class around

Java Out Of Heap Space Error

寵の児 提交于 2019-12-13 15:26:35
问题 I'm running a very long process via an Ant script, I allowed the following heap but it still give me the error. set ANT_OPTS=-Xms1024M -Xmx2024M -XX:MaxPermSize=512M 回答1: It seems strange to me that you are using more 2G to perform a build (although it's clearly possible) so I'll make some silly questions just to help you thinking on your problem: Are you really sure that the ANT_OPTS is correctly set? Are you launching the script from command line or from an IDE? Which OS are you using? How

ant - input password for sshexec

牧云@^-^@ 提交于 2019-12-13 15:25:28
问题 I have an ant script on a public server available to multiple users. I want to input a password into a script securely and use it for multiple targets. The following code gets a password with input, but the variable is not being passed to the sshexec task. Will this work or is there a better way to do it? <target name="get_password"> <input message="Enter Your Password:>" addproperty="password"> <handler classname="org.apache.tools.ant.input.SecureInputHandler" /> </input> </target> <target

Maven Security Concerns

本小妞迷上赌 提交于 2019-12-13 14:18:41
问题 Are there security concerns with using Maven? I use Ant today for my main project, but I do use Maven for my "samples" project where I write program spikes. I do like some parts of Maven, but have a concern with downloading my jars through the tool. Is this an unfounded concern? How secure is "http://repo1.maven.org/maven2/"? Is there a more secure way of using the tool? Thanks. 回答1: It's pretty secure and standard. If ever the security of http://repo1.maven.org/maven2/ is compromised, there

Reusing ant-snippets in multi-module maven build

♀尐吖头ヾ 提交于 2019-12-13 14:06:50
问题 How can I reuse an ant snippet in multiple projects? Lets say I have the following in my root pom.xml : <plugin> <artifactId>maven-antrun-plugin</artifactId> <version>1.7</version> <executions> <execution> <id>gen-index</id> <phase>package</phase> <configuration> <target> ... some non-trivial ant stuff here ... </target> </configuration> <goals> <goal>run</goal> </goals> <execution> </executions> </plugin> How can I have this ant snippet executed for selected sub-projects? I've tried adding

How can I zip multiple folders individually with ant?

杀马特。学长 韩版系。学妹 提交于 2019-12-13 14:04:16
问题 If I have a folder with multiple subfolders (e.g. foo, bar, baz), how can I use ant to zip them individually into foo.zip, bar.zip and baz.zip, without doing them one by one? Ideally there should also be a way to specify which files/subfolders to zip rather than "every single one". 回答1: You don't want to use ant-contrib. ant-contrib sucks, every time you use it, you're incurring technical debt. The number one thing to keep in mind when using ant: let ant be ant. ant is what it is. it's

Cordova add platform error in Ubuntu

别来无恙 提交于 2019-12-13 12:50:32
问题 I have the android latest sdk tools in my Ubuntu 13.10 x64 Documents folder.The eclipse and sdk are working fine,also created one virtual device. cd Documents cd adt-bundle-linux-x86_64-20130514/ cd sdk/ ls -l It gives me these, add-ons build-tools docs extras platforms platform-tools samples sources system-images temp tools Now installed ant using sudo apt-get install ant Then edited path, gedit ~/.bashrc And added this code at end, #AndroidDev PATH export PATH=${PATH}:~/Documents/adt-bundle