ant

In proguard, what is the keyword to preserve package/default access variables and methods?

≡放荡痞女 提交于 2019-12-22 08:08:20
问题 You can say: -keepclassmembers class sun.** { public protected *; } But I am not excluding package/default access methods :( void myMethod { } 回答1: You can add another -keepclassmembers like that: -keepclassmembers class com.mycompany.MyClass { !public !protected !private *; } 来源: https://stackoverflow.com/questions/26183906/in-proguard-what-is-the-keyword-to-preserve-package-default-access-variables-an

How to store Apache Ant property value in file

南笙酒味 提交于 2019-12-22 08:05:06
问题 I need to modify a (xml-)file from Apache Ant. "loadfile" task allows to load the file's content in a property. But how to store the property's value back to a file after its (property) modification? Of course I could write custom task to perform this operation but I would like to know if there's some existing implementation. 回答1: You can use the echo task. <echo file="${fileName}" message="${xmlProperty}"/> The echoxml task might be of interest to you as well. 回答2: Use propertyfile task. An

Android include .jar in ant compilation

只愿长相守 提交于 2019-12-22 07:15:07
问题 I try to include in my application compilation a .jar compiled. I use ant to compile my Android application. When I add this task to build.xml : <javac srcdir="${src}" classpath="xyz.jar" /> compilation failed on android package importation : [javac] Compiling 1 source file [javac] C:\HelloWorld\src\com\example\hellowolrd\HelloWorld.java:3: package android.app does not exist [javac] import android.app.Activity; [javac] ^ Whereas when my task was not in build.xml, compilation succeeded. 回答1:

How to use Ant?

寵の児 提交于 2019-12-22 06:49:25
问题 I've been trying to understand what Ant is used for but i still don't get it. Can someone give me one use case for which Ant is used for, something I can try to see why Ant is useful and what kind of things I can use it for? I do Java development in Eclipse and I'm just getting started with servlets and Google Web Toolkit. 回答1: Ant is a build tool. Say for example you have several projects in your Eclipse workspace, all of which are pieces of a larger application. To build it all into a jar

How to split a string and use it inside a for loop in ant script?

吃可爱长大的小学妹 提交于 2019-12-22 06:49:23
问题 I am having a list of machine ips in a ant property. <property name="machines" ip="10.10.10.1;10.10.10.2;10.10.10.3"/> I have to copy one file to all the machines(all the machines are windows machines). So I want to split this string and to use it inside a for loop. Inside that forloop i will execute the copy command. <exec executable="cmd.exe"> <pre> </pre> <arg line="/C COPY /Y sample.txt \\${machine_ip}\Shared_folder\sample.txt"/> <pre> </pre> </exec> Now how to split and use it inside for

How to use ant to check for tags (TODO: etc) in java source

强颜欢笑 提交于 2019-12-22 06:48:40
问题 it's common to see something like this in code, hopefully only during development: //XXX: not in production! String password = "hello"; // getActualPassword(...); ... catch(Exception e) { /* TODO: Auto-generated catch block*/ } I would like ant to be able to a) warn (on TODO: / FIXME: tags) or fail (on XXX: or simmilar) The build server is linux, home grown and based on ant. Would need to work at least on linux if not on windows. We also use perforce if an alternative is to block file commits

How can I pull artifacts from TeamCity?

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-22 06:45:05
问题 I would like to pull artifacts from teamcity. I've been trying to use c# and the HtmlAgilityPack to goto the website and find the latest version and its artifacts. I'm currently stuck at the login, I think I just need to be sending Session Cookies out. Am I going in the right direction, has anyone else tried this? I realize that pushing files out with the build scripts is easy but I'd like to minimize changes to the Ant,NAnt files since I'm looking at scaling this to 100 apps. Edit: this

Ant Build AAPT Crunch is stripping draw9 information from Library resource images

自作多情 提交于 2019-12-22 05:57:09
问题 I have a project that is using a library project. The Library Project has draw9 (9.png) files and when building the apk via Ant it is stripping the draw9 info on scaleable and fillable areas. The result is that the app just stretches the images without using draw9 info. In Android's build.xml <target name="-package-resources" depends="-crunch"> this is calling crunch, which updates the pre-processed PNG cache (anyone know where this cache is held?). -crunch runs a task in aapt called crunch.

Ant javac task errs out: [javac] warning: [options] bootstrap class path not set in conjunction with -source 1.6

元气小坏坏 提交于 2019-12-22 05:53:37
问题 I'm trying to run an ant task that uses axis2-ant-plugin-1.6.0.jar\org\apache\axis2\tool\ant\AntCodegenTask to perform a WSDL2Java operation. At the top of the ant script, I define java6.boot.classpath : <property name="java6.boot.classpath" value="${env.JAVA6_BOOT_CLASSES}"/> And I have the JAVA6_BOOT_CLASSES environment variable set to C:\dev\java\64-bit\jdk-1.6.0_45\bin . The pertinent ant target is as follows: <!-- dist.jar target --> <target name="dist.jar" depends="generate" description

How to make javac compiler write the output to both file and console?

一世执手 提交于 2019-12-22 05:38:31
问题 I am running javac task using ant and I send the output to a log file using -Xstdout compiler argument for reporting purposes, but I would like the output also still being send to the console so hudson can capture it for on screen review. Is there a way for this to be done? 回答1: Just came across another alternative using the recorder task. Nearer as you don't have to introduce new targets. <compile > <record name="log.txt" action="start"/> <javac ... <record name="log.txt" action="stop"/>