ant

How to encrypt a .jar file

大兔子大兔子 提交于 2019-12-28 06:26:05
问题 I'm working in a project where we need to encrypt the .jar file so no one can access to the .class files which inside the jar file.... is there any java coding which can help me to encrypt the .jar file ? 回答1: Even if you encrypt the jar file, it must be decrypted before the JVM is able to run it, so you'll need another jar file containing classes that decrypt and loads in the JVM. Since this second jar file cannot be itself encrypted, a malicious user wanting to see you class files, can

How to build an android app with external libraries using ant?

怎甘沉沦 提交于 2019-12-28 05:38:07
问题 I have an existing project that builds fine using my IDE. I'd like to use the "android update" command to generate an ant buildfile for this project. The buildfile is generated fine, but the build fails because it's not building with some jarfiles I have in my libs directory. I'd like to figure out the proper way to tell ant to build with some external jar files in my libs directory. How should I do this? Is it a property in build.properties? Do I need to modify build.xml somehow? Or is there

How to call a web service from Ant script or from within Jenkins?

家住魔仙堡 提交于 2019-12-28 04:20:10
问题 I am using Ant Script in Jenkins to handle the deployment of my files. What I want to do is to trigger a call to a URL that has the web service. My question is, how can I do that from Ant Script or from within Jenkins? Thanks in advance, Monte 回答1: Option 1: "get" task Ant's get task can be used to invoke web services, but it restricted to GET operations. Only works for very simple web services Option 2: curl Invoke the unix curl command to call the webservice (See this post for examples)

Repackage APK file to contain custom assets - what build tool to use?

a 夏天 提交于 2019-12-28 02:53:48
问题 Update : This is an old post, and references below to broken aapt versions will be out of date. Based on previous feedback, I am storing custom text fields in the assets directory of my app. I will write the app, using default user details in an asset file, and the client would like to rebuild the app for each user, including that user's details in the asset file. (I am aware this is method has some serious shortcomings, but the client is still keen to do it in this way - see Embed login

Android signing with Ant

纵饮孤独 提交于 2019-12-28 02:32:07
问题 Using Ant, I'm trying to build an Android application in release mode for distribution. My problem is at the signing process. I've created a keystore and alias via Eclipse using the Export Android Application wizard and the app is correctly signed if export it via Eclipse. When I try to complete the same process via Ant I reference my keystore and alias in my build.properties file: key.store=C:\\Users\\a512091\\.android\\release.keystore key.alias=application key.store.password=android key

Why do I get compilation error “org/codehaus/groovy/control/CompilationFailedException”?

独自空忆成欢 提交于 2019-12-28 01:53:36
问题 I am trying to compile my JasperReports template using an Ant script and Java. I am getting this error: jasper java.lang.NoClassDefFoundError: org/codehaus/groovy/control/CompilationFailedException There is nothing complex in the template, but I still can't compile. 回答1: You will have to set the language value in your template to Java. There are two ways you can do this: If you are using iReport, select the root object in your Report Inspector (the one with the same name as your report). Then

Maven (m2e) is not executing ant task

牧云@^-^@ 提交于 2019-12-25 18:21:48
问题 I have a POM file (to be executed by Eclipse) where I want to execute a ANT task during the generate-sources phase. Based on m2e documentation, in How to solve "Plugin execution not covered by lifecycle configuration" for Spring Data Maven Builds, Maven: execute antrun task during package and Where should be placed maven-compiler-plugin declaration: in <plugins> or <pluginManagement>?, I wrote my POM file in this way: <?xml version="1.0" encoding="UTF-8"?> <project> ... <build>

dont want to build again and again

耗尽温柔 提交于 2019-12-25 18:11:07
问题 I have a webapplication lets say at location C:\Test\MyWeb Every time I make some change I have to rebuild it via ant package command. Then I copy the MyWeb.war file into apache's webapp folder. I want to avoid this build and copy thing after every change. How to bypass it? 回答1: Try using an IDE like eclipse and start your application from within the IDE. The IDE should automatically recompile your files and in most case can do a hot replace of the code so you don't need to restart. 回答2: For

How to make JavaC copy existing class files to the target dir?

半城伤御伤魂 提交于 2019-12-25 17:19:09
问题 I hope somebody can give me an advice... Problem In source directory of my project some packages contain resources which are not ".java"-files. Now I need to put there compiled ".class"-files. The problem is that ANT filters them out when I am building the final JAR. ".dll" and ".png" files are not filtered out. How can I achieve that everything is copied to the target directory? I use following Ant task: <javac srcdir="${src}" destdir="${temp}" target="1.5" encoding="8859_1" debug="${compile

How to make JavaC copy existing class files to the target dir?

匆匆过客 提交于 2019-12-25 17:18:15
问题 I hope somebody can give me an advice... Problem In source directory of my project some packages contain resources which are not ".java"-files. Now I need to put there compiled ".class"-files. The problem is that ANT filters them out when I am building the final JAR. ".dll" and ".png" files are not filtered out. How can I achieve that everything is copied to the target directory? I use following Ant task: <javac srcdir="${src}" destdir="${temp}" target="1.5" encoding="8859_1" debug="${compile