ant

How can I connect to an Oracle database from Ant using the tnsname?

橙三吉。 提交于 2019-12-21 15:25:13
问题 I am looking for something similar to the Ant sql task but that will accept a JDBC url of the format: jdbc:oracle:thin:@TNS_NAME One possible approach seems to be to write my own Ant task that uses an OracleDataSource to create the Connection, but is there a way to do this straight in Ant? EDIT: Thanks for the responses so far guys. I hope it helps if I elaborate a bit more on the error I'm getting. My Ant task looks as follows: <target name="MyTarget" > <property name="oracle.net.tns_admin"

How can I connect to an Oracle database from Ant using the tnsname?

核能气质少年 提交于 2019-12-21 15:25:11
问题 I am looking for something similar to the Ant sql task but that will accept a JDBC url of the format: jdbc:oracle:thin:@TNS_NAME One possible approach seems to be to write my own Ant task that uses an OracleDataSource to create the Connection, but is there a way to do this straight in Ant? EDIT: Thanks for the responses so far guys. I hope it helps if I elaborate a bit more on the error I'm getting. My Ant task looks as follows: <target name="MyTarget" > <property name="oracle.net.tns_admin"

When using ANT, how can I define a task only if I have some specific java version?

旧街凉风 提交于 2019-12-21 14:39:12
问题 I have the problem that an specific step in Ant can only be executed when we have Java 1.5 installed in the build computer. The task definition uses uses a jar file that was compiled using 1.5, so running with a 1.4 virtual machine will throw an IncompatibleClassVersion exception. I have to find a solution meanwhile to have this task working for this specific project that requires 1.4, but a question came to me. How can I avoid defining this task and executing this optional step if I don't

How to speedup jar signer?

拥有回忆 提交于 2019-12-21 12:54:26
问题 I use ant for sign my jars for web-start deployment. Ant.signjar is very slow when web-start signing. How to speedup signing process ? 回答1: I found one possible solution. Earlier in build script ant.signjar called sequentially for all jars (We use gradle for build, more than 20 MB dependecies). Now i use groovy library GPars methods: withPool(4) and eachParallel { ant.signjar }. It is cool for 2 cores in my pc and 4 cores in build server. (for 3 times faster) Second trick is cache: we use

Adding referenced jars to android build.xml

妖精的绣舞 提交于 2019-12-21 12:49:18
问题 I have an android eclipse project and have generated the corresponding build.xml ant file by doing: android update test-project -p . -m ..\main_project This compiles fine. However, in eclipse I have then added three referenced external jars (easymock, objenesis and cglib). In eclipse everything builds fine but then when I run the above command again it doesn't add these jars to the classpath. So my question is how to tell the build.xml to include these jars? I have done some research first

How to get project version from Mavens's pom in Ant

安稳与你 提交于 2019-12-21 12:29:21
问题 I have maven project and ant task for it. In ant task i want to get version property from pom.xml. How to get it? In pom.xml: <version>2.03.010</version> 回答1: The Maven Ant tasks provide some goals for POM processing To access the version from a POM, you can use the following: <artifact:pom id="mypom" file="pom.xml" /> <echo>The version is ${mypom.version}</echo> Update: To use the tasks. You will need to install them. Install instructions You can either: Place the JAR in your Ant lib

ant junit batchtest from a jar

…衆ロ難τιáo~ 提交于 2019-12-21 10:17:05
问题 I'd like to use ant (post 1.7) to run all tests in classes named *Test.class in a certain jar. Something like the following (although it doesn't actually run any tests): <junit fork="yes" printsummary="on" haltonfailure="on"> <formatter type="xml"/> <batchtest fork="yes" todir="${junit.output.dir}"> <resources> <zipentry zipfile="tests-only.jar" name="**/*Test.class"/> </resources> </batchtest> <classpath refid="testsplus.classpath"/> </junit> What is the correct syntax for the resources

Why is Ant returning a 403 on deploy?

丶灬走出姿态 提交于 2019-12-21 09:24:13
问题 I'm attempting to deploy to a war file in Tomcat 7. It's giving me the following error. deploy: [echo] Deploying on Tomcat. BUILD FAILED C:\Users\coder\workspace\projectName\build.xml:84: java.io.IOException: Server returned HTTP response code: 403 for URL: http://localhost:8090/manager/deploy?path=%2FprojectName Here's my build file <project name="ProjectName" default="main" basedir="."> <!-- Tell ant to use my environment variables --> <property environment="env"/> <property file="./build

Android: ANT build fails with google-play-services-lib: “resolve to a path with no project.properties file for project”

北城余情 提交于 2019-12-21 06:58:43
问题 I'm trying to build my apps using ANT and I'm failing miserably after I included the google-play-services-lib library project. Step 1 I set up a reference to the library project in my project.properties file: android.library.reference.1=/path/to/google-play-services_lib Step 2 I ran these commands inside the google-play-services_lib folder: android update lib-project --path . ant clean ant release BUILD SUCCESS! Step 3 Back to my project folder ant clean ant release ERROR BUILD FAILED