ant

Emma code coverage for a lib on Android

老子叫甜甜 提交于 2019-12-07 09:41:19
问题 I currently have some unit tests for an Android app, which makes calls to a library jar file. I would like to see the code coverage for the jar, but when I run ant emma and look at the coverage.html, it only reports on the coverage of the app project. Is there a way to specify that I would like to view the coverage for the jar as well? 回答1: The ADT r20-preview solves this issue by giving access to the full classpath of tested projects and their Library Projects: http://tools.android.com

How do I flatten the top level folder of a zip file with ant?

匆匆过客 提交于 2019-12-07 09:41:12
问题 A lot of zip files have a root folder, how do I unpack the zip file and get rid of the root folder? I know there is the globmapper : <unzip dest="${dest.path}"> <fileset dir="${source.path}"> <include name="**/zipfile*.*.zip" /> </fileset> <mapper> <globmapper from="rootFolder/*" to="*" /> </mapper> </unzip> But what if I don't know the name of the root folder? Wildcards are not working e.g. <globmapper from="root*Folder/*" to="*" /> Is there a way to use wildcards or a mapper/function that

Using Apache Ant APIs in Java program to programmatically build source files

余生长醉 提交于 2019-12-07 09:34:55
问题 I am looking for good and practical resources that will help me use the Ant APIs effectively. The project website just gives the documentation of the API which is not useful at all. Very few websites seem to give very brief tutorials on the subject. Is there some resource I am missing out on? How can I use the Ant APIs for simple tasks, without spending hours browsing through them and looking at source code? Thanks. (Answers to previously asked questions not helpful - How can i use Apache ANT

Error when building a Cordova Android project

馋奶兔 提交于 2019-12-07 09:28:12
问题 Hi i'm trying to build a cordova project with android plugin in windows 7 with the following environment ANDROID_HOME=D:\DevTools\Android\Android_SDK_NDK\android-sdk JAVA_HOME=C:\Program Files\Java\jdk1.7.0_45 i generated a cordova project >cordova create CordovaProject io.xyz.hellocordova CordovaApp and added the android plugin >cordova platform add android now after doing that i tried to build the android project >cordova build android this trying to download gradle-2.2.1-all.zip which

How to force code style formatting as part of the build?

怎甘沉沦 提交于 2019-12-07 08:36:59
问题 Is there a way (using ANT), it is possible to automatically reformat code to follow certain conventions? I have several developers working on a program and would like to guarantee that code formatting becomes consistent across all classes at build time, prior to commit 回答1: The best way to do it pre-commit is to use a pre-commit hook on your source control server. This way you can enforce that no code makes it into the branch without conforming to code standards. http://checkstyle.sourceforge

Ant not loading salesforce task definitions?

拥有回忆 提交于 2019-12-07 08:21:58
问题 The Question I'm trying to use the Force.com Migration Tool (a custom ant library) on a linux box and can't for the life of me figure out how to get ant to see that library. What am I doing wrong? The Error Message BUILD FAILED /home/ec2-user/ant/ucp/build.xml:48: Problem: failed to create task or type antlib:com.salesforce:retrieve Cause: The name is undefined. The Background I installed ant using yum install ant and then I dropped the Force.com Migration Tool (ant-salesforce.jar) into /usr

Deploying war file into managed weblogic server to the given path location

跟風遠走 提交于 2019-12-07 08:12:37
问题 I am using the Ant wldeploy task to deploy a war file. It is working fine, but the war file path in the deployed server is set to something like servers/myadminservername/upload/mywarfilename/app Instead, I would like to set this path myself in the Ant buildfile. Can any one please help me with that? The task I am using for this is: <wldeploy action="deploy" verbose="false" debug="true" name="ClientProfileSyncPortTypeImplV8" source="${results.war.file.dir}/ClientProfileSyncPortTypeImplV8.war"

build.gradle changes for git submodule

*爱你&永不变心* 提交于 2019-12-07 08:11:28
问题 Source Tree is as follows: core // root .gitmodules // this has box-sdk as submodule box-sdk // git submodule BoxJavaLibraryV2 // Box related files I also created settings.gradle include 'box-sdk:BoxJavaLibraryV2' My build.gradle compile project(':box-sdk:BoxJavaLibraryV2') At this point I was able to compile and build root project with box as dependency. Problem started when I tried to checkin and checkout again the whole project. I did following: I was able to check in .gitmodules and box

Eclipse stops compiling RenderScript file

让人想犯罪 __ 提交于 2019-12-07 07:13:25
问题 I have a single RenderScript (.rs) file in my Android project: SomeScript.rs Which has been working fine as I've been developing it. But then I did a workspace clean inside Eclipse, and now it doesn't seem to be recognizing the file as a RenderScript file. Before, if I had a syntax error, it would notify me about the offending line. But now, no matter what I do to the file, it doesn't get upset. It also doesn't produce the CScript Java wrapper for the script inside /gen. It just errors out

How to invoke Ant in Jenkins pipeline job using groovy script?

邮差的信 提交于 2019-12-07 06:27:29
问题 I am changing my Freestyle Jenkins job configuration to Pipeline. I need to Invoke Ant to perform LogPublisherTask and ArtifactFilePublisherTask. How is it performed using Groovy scripting? 回答1: You invoke ant just like you do it with maven (take a look at examples https://jenkins.io/doc/pipeline/jenkinsfile/): node ('linux'){ stage 'Build and Test' env.PATH = "${tool 'Ant'}/bin:${env.PATH}" checkout scm sh 'ant build' } The tasks themselves should be configured in the build.xml . 来源: https:/