ant

ANT script to compile all (css) LESS files in a dir and subdirs with RHINO

淺唱寂寞╮ 提交于 2019-12-17 15:44:59
问题 I want do compile all *.less scripts in a specific folder and it subdirs with less-rhino-1.1.3.js . There is an example on github for doing this for a specific file, which works perfect. But I want to do the same for a complete folder. I tried a lot, here is my last try. It doesn't work, propertyregex seems not to be standard ANT, I don't want to use such things. I am not even sure if this code would work. <project name="test" default="main" basedir="../../"> <property name="css.dir" location

Android - use ant to create build configurations that change configuration values

佐手、 提交于 2019-12-17 15:35:51
问题 What I want is a way to have settings that are dependent on build configuration. To give a specific example, my android application connects to a web service. In development, I want the service url to be pulled in from a configurable value. In Test, I want a different value pulled in. In production, yet another value. So, in code I have something like this: public class HttpRequestHelper { private static String GetServiceUrl(ServiceAction action) { return serviceUrl + action.toString(); } }

How to change JAVA.HOME for Eclipse/ANT

試著忘記壹切 提交于 2019-12-17 15:29:32
问题 I am trying to sign a jar file using an ANT script. I know this has to be pointed at the JDK directory for jarsigner.exe to run, but when I echo java.home it returns the JRE directory. This isn't a problem for javac, because I can set the executable path. But, that does not exist for signjar. How do I change the java.home path? When I right-click on MyComputer and go to: Properties > Advanced > Environment Variables The "PATH" variable is correctly pointed to the JDK ( C:\program files\java

Server certificate verification failed: issuer is not trusted

时间秒杀一切 提交于 2019-12-17 15:15:55
问题 I am getting below error when running a target of ANT script. Error message saying that "server certificate verification is failed". Please help how to remove this problem. I am working in Windows XP. C:\apache-ant-1.8.1>ant checkout Buildfile: C:\Program Files\Java\apache-ant-1.8.1\build.xml checkout: [svn] Using command line interface Svn : Checking out a working copy from a repository : co -r HEAD https://col.../trunk C:\ant-1.8.1\Test_Checkout --username 69 --password *******--non

ant warning: “'includeantruntime' was not set”

爱⌒轻易说出口 提交于 2019-12-17 14:59:31
问题 I receive the following warning: [javac] build.xml:9: warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds What does this mean? 回答1: Ant Runtime Simply set includeantruntime="false" : <javac includeantruntime="false" ...>...</javac> If you have to use the javac -task multiple times you might want to consider using PreSetDef to define your own javac -task that always sets includeantruntime="false" . Additional Details From http:/

What are the implications of having duplicate classes in java jar?

天大地大妈咪最大 提交于 2019-12-17 10:59:46
问题 I am building java jar file using ant. I need to include additional jars using "zipfileset src="xxx.jar" "zipfileset src="yyy.jar" and both xxx.jar and yyy.jar have the classes with the SAME fully-qualified class names. So the resulting jar file has duplicate class names. What are the possible implications of having duplicates? Thank you. 回答1: If they're duplicate implementations, nothing–it wouldn't matter which is loaded. If not, you're at the mercy of class load order, and may get a

Linux removing folders older than 1 year and more than 3 files

▼魔方 西西 提交于 2019-12-17 10:00:50
问题 I'm writing an ant script to clean up an archive folder Here's how I need to clean it up: I need to delete folders old than a certain amount of days AND has more than 3 files in it. So for example if a folder is 300 days old but only has 3 files than it will NOT be deleted. I know I can ssh into the archive and do find -mtime +365 -exec rm -rf {} ;\ to delete files older than 1 year but I don't know how to account for the minimum of 3 files I also know that find -type f | wc -l will list the

regular expression to match everything until the last occurrence of /

烂漫一生 提交于 2019-12-17 09:54:54
问题 Using a regular expression (replaceregexp in Ant) how can I match (and then replace) everything from the start of a line, up to and including the last occurrence of a slash? What I need is to start with any of these: ../../replace_this/keep_this ../replace_this/replace_this/Keep_this /../../replace_this/replace_this/Keep_this and turn them into this: what_I_addedKeep_this It seems like it should be simple but I'm not getting it. I've made regular expressions that will identify the last slash

Using ant to detect os and set property

无人久伴 提交于 2019-12-17 09:39:35
问题 I want to set a property in an ant task differently by os type. The property is a directory, in windows i want it to be "c:\flag" in unix/linux "/opt/flag". My current script only works when i run it with the default target, but why ? <target name="checksw_path" depends="if_windows, if_unix"/> <target name="checkos"> <condition property="isWindows"> <os family="windows" /> </condition> <condition property="isLinux"> <os family="unix" /> </condition> </target> <target name="if_windows" depends

How to run all JUnit tests in a category/suite with Ant?

[亡魂溺海] 提交于 2019-12-17 09:33:03
问题 I'm using JUnit Categories and ClassPathSuite in a setup similar to that described in this answer. To recap: public interface FastTests { } @RunWith(Categories.class) @Categories.IncludeCategory(FastTests.class) @Suite.SuiteClasses(AllTests.class) public class FastTestSuite { } @RunWith(ClasspathSuite.class) public class AllTests { } ...where AllTests makes use of the ClasspathSuite library. A test class that's part of the FastTests category would look like this: @Category(FastTests.class)