ant

Executable JAR & Ant

自作多情 提交于 2019-12-11 06:45:25
问题 I'm writing an Ant build.xml file for an executable JAR for the first time, and am stumped as to what I need to include in the JAR. The project can be thought of being composed of the following: The source code A handful of dependency JARs A Spring configuration file (XML) for IoC via ClassPathXmlApplicationContext Here's my question: since this is an executable JAR, should I be JARring up all the dependency JARs as well, or should I keep them separate? I suspect I need to include them in the

Add ant plugins dynamically at buildtime?

筅森魡賤 提交于 2019-12-11 06:43:18
问题 I'd like to set up an Ant build that pulls down its plugins at buildtime. So for instance, if my build used findbugs and checkstyle JARs and called their tasks from inside build.xml, then ideally I could: Run an ivy-resolve and ivy-retrieve task to pull findbugs and checkstyle JARs down into, say, gen/lib/buildtime . Add gen/lib/buildtime to Ant's classpath Define <taskdefs> that define the various findbugs and checkstyle tasks Execute the findbugs and checkstyle tasks in a downstream target

How do I build an applet which needs an external jar, using ant?

不羁的心 提交于 2019-12-11 06:41:58
问题 I have wrote a java applet which is pretty simple. It connects to a oracle database upon clicking a button. It works fine, it connects when I run it using Eclipse. However, when I use ant to create the jar file I don't know how to include the ojdbc6.jar as a classpath. How would I do this? Here is my ant build file. My external 3rd party Jar files that I need are in C:\JarFiles. <project default="jar"> <property name="build" value="build"/> <property name="java.home" value="C:\Program Files

Ant equivalent of nant.onsuccess / nant.onfailure

孤街醉人 提交于 2019-12-11 06:28:41
问题 NAnt has two built-in properties, nant.onsuccess and nant.onfailure , for specifying tasks to run on success and failure respectively. Is there an equivalent in Ant? 回答1: I don't think there's an ant equivalent but you could use trycatch (part of ant-contrib) <trycatch> <try> <!-- Your code here --> <!-- Success message --> </try> <catch> <!-- Fail message --> </catch> </trycatch> Hope this helps 回答2: Kev Jackson, gave a neat example of an exec-listener in his presentation, = http://people

Generate multiple APK's with same code base using ANT

六月ゝ 毕业季﹏ 提交于 2019-12-11 06:26:08
问题 I am trying to generate multiple apk with same code using ANT and have followed many posts to get it done. But i am unable to build the project successfully. Let me start with my first problem. I have a main project which has two library projects, something like Main Project ---> Library Project(isLibrary) ---> Google Play Services (isLibrary) When i am trying to update those projects, each and every time getting a message like It seems that there are sub-projects. If you want to update them

Weblogic + Change deployment order via command

元气小坏坏 提交于 2019-12-11 06:24:57
问题 I am using ant script to undeploy and deploy the application to weblogic server. For a particular application I want to setup the "Deployment Order" a different value. Is there any way I can mention the deployment order via ANT. Please assist. 回答1: The weblogic.Deployer utility and its ANT version wldeploy do not provide a feature to set the Deployment Order while deploying the Application. The order can only be updated after the deployment. You can still automate it with WLST if that's what

How to change Ant script with EMMA code-coverage so it can find runtime coverage data?

谁说胖子不能爱 提交于 2019-12-11 06:14:27
问题 I have following script: <?xml version="1.0" encoding="UTF-8"?> <taskdef resource="emma_ant.properties"> <classpath> <pathelement location="lib/emma.jar" /> <pathelement location="lib/emma_ant.jar" /> </classpath> </taskdef> <target name="compile"> <mkdir dir="build"/> <!-- vytvori adresar build --> <mkdir dir="build/classes"/> <mkdir dir="build/test"/> <javac destdir="build/classes" srcdir="src" debug="true" /> <!-- prelozi zdrojove kody --> <javac destdir="build/test" srcdir="test"> <!--

Maven: Can I package only dependencies(without app) in a jar?

非 Y 不嫁゛ 提交于 2019-12-11 06:04:44
问题 I have a legacy JAVA project which uses ant for builds. Since jar dependency management in this project is really tedious, I am planning to integrate maven. I am trying to use maven only for dependency management and keep using ant for builds. I am contemplating to produce a single jar using maven which will contain all the dependencies and then I will include this single jar in classpath of my app. I know this might not be the best approach but is it possible to do this? What might be a

Is it possible to turn off ivy's cache altogether?

大兔子大兔子 提交于 2019-12-11 05:57:19
问题 I'm talking about ivy 2, not some newer version. 回答1: Switching off the cache affects performance. Switching it off loses one of the big benefits of dependency management, because you'd force each build to download everything.... Having said that, over time the cache sometimes become stale, especially in situations where the remote modules might have changing dependencies (Can occur during development). To counter this problem I always include an extra build target that purges my ivy cache:

project dependency tree by using ant

人盡茶涼 提交于 2019-12-11 05:51:35
问题 I am trying to compile a j2ee project, and the solution file includes many source projects, libraries. some of source projects have dependency with other source projects. And this compile task will be done by using ant task. is there third party library allows me to do this task quickly? next step after compiling will be export to ear file. Thanks for helping. 回答1: You can do it using Grand, Ant2dot or VizAnt 来源: https://stackoverflow.com/questions/2623858/project-dependency-tree-by-using-ant