ant

How to run a .jar file, which contains OpenCV code and was created using ant, from command line?

ε祈祈猫儿з 提交于 2019-12-08 06:40:29
问题 I am trying to run a small java class from Ubuntu console, which contains OpenCV code like this : import org.opencv.core.Core; import org.opencv.core.Mat; import org.opencv.core.CvType; import org.opencv.core.Scalar; class SimpleSample { static{ System.loadLibrary(Core.NATIVE_LIBRARY_NAME); } public static void main(String[] args) { System.out.println("Welcome to OpenCV " + Core.VERSION); Mat m = new Mat(5, 10, CvType.CV_8UC1, new Scalar(0)); System.out.println("OpenCV Mat: " + m); Mat mr1 =

How to run ant apt task on java 1.8

 ̄綄美尐妖づ 提交于 2019-12-08 05:34:13
问题 On Ant Apt webiste there is information that trying to run ant apt task on java 1.8 will crash. But in application that i have to change i must use this task because it is built in ant build and is too hard to migrate to using instead of ant apt use javac and javax.annotations api. Anyone have any idea how to avoid this crash and run Ant apt task on java 1.8. 回答1: You have no choice, you must migrate. The apt tool and its associated com.sun APIs have been deprecated since the release of Java

Can i save result of a sql query in a property directly in ant

时间秒杀一切 提交于 2019-12-08 04:57:08
问题 I want to save the sql query result into a property in ant. I know i can do it through a file. But can i assign it to a property by directly declaring a property. eg: select count(colname) from tablename . So i want to assign count value to a property. 回答1: Can't do this using the standard ant sql task. Use a groovy script to set the property as follows: <target name="query"> <taskdef name="groovy" classname="org.codehaus.groovy.ant.Groovy" classpathref="build.path"/> <groovy> import groovy

JUnit tests failed executed as an ant target

痴心易碎 提交于 2019-12-08 04:53:03
问题 I am trying to get code coverage using Cobertura plugin for Jenkins so I instrument, run tests and then coverage report in my build.xml as follow <?xml version="1.0" encoding="UTF-8"?> <project name="CoberturaAndJenkins" default="default" basedir="."> <description>Builds, tests, and runs the project CoberturaAndJenkins.</description> <import file="nbproject/build-impl.xml"/> <property name="lib.dir" value="lib/" /> <property name="junit.file" value="junit-4.11.jar" /> <property name=

gwt-maven-plugin: Plugin requires Maven version 2.1

给你一囗甜甜゛ 提交于 2019-12-08 04:41:10
问题 I am trying to use gwt-maven-plugin to compile my project. I have Maven 3.0.3 installed in my spring tool suite eclipse 4.2. However, the plugin croaks that it wants to use maven 2.1. I am sure it should have no problems using maven 3.x, right?? [artifact:mvn] [INFO] Error resolving version for 'org.codehaus.mojo:gwt-maven-plugin': Plugin requires Maven version 2.1 My plugin defn: <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>gwt-maven-plugin</artifactId> <version>2.4.0</version>

Ant Builder Build Failed eINSTANCE

自闭症网瘾萝莉.ら 提交于 2019-12-08 04:03:37
问题 Trying to use AcceleoCompiler with an Ant Builder. When i build with ant i get the following error: compile: [acceleoCompiler] eINSTANCE BUILD FAILED C:\Users\random\workspace\foo\bar\Framework\buildstandalone.xml:52: eINSTANCE Here is how i have my target defined and some other information that could be important. I am very new to ant and acceleo. Let me know if there is any other information you need. I am not sure that any of the below is correct, let me know if there is anything i need to

Ant gets stuck while building runnable jar

天涯浪子 提交于 2019-12-08 03:15:28
it's me again. I've been trying to create java project into a runnable jar using ant script. This is my build.xml <project name="simple-app" basedir="." default="main"> <property name="src.dir" value="src" /> <property name="build.dir" value="build" /> <property name="classes.dir" value="${build.dir}/classes" /> <property name="jar.dir" value="${build.dir}/jar" /> <property name="lib.dir" value="lib" /> <property name="main-class" value="app.App" /> <path id="classpath"> <fileset dir="${lib.dir}"> <include name="*.jar" /> </fileset> <dirset dir="${build.dir}"> <include name="classes"/> <

Native2Ascii task not working

冷暖自知 提交于 2019-12-08 03:15:16
问题 I'm trying to use the native2ascii ant task but it seems that is not doing anything. Here's my ant task: <target name="-pre-init"> <native2ascii src="src/com/bluecubs/xinco/messages" dest="src/com/bluecubs/xinco/messages/test" includes="**/_*.properties"/> <copy todir="src/com/bluecubs/xinco/messages"> <fileset dir="src/com/bluecubs/xinco/messages/test"/> </copy> <delete dir="src/com/bluecubs/xinco/messages/test" /> </target> I did the copy part to see if it was an overwriting issue but the

Trying to use Fuse to mount HDFS. Can't compile libhdfs

醉酒当歌 提交于 2019-12-08 03:13:26
I'm attempting to compile libhdfs (a native shared library that allows external apps to interface with hdfs). It's one of the few steps I have to take to mount Hadoop's hdfs using Fuse. The compilation seems to go well for a while but finishes with "BUILD FAILED" and the following problems summary - commons-logging#commons-logging;1.0.4: configuration not found in commons-logging#commons-logging;1.0.4: 'master'. It was required from org.apache.hadoop#Hadoop;working@btsotbal800 commons-logging log4j#log4j;1.2.15: configuration not found in log4j#log4j;1.2.15: 'master'. It was required from org

How do I use properties in ants replace task?

北城余情 提交于 2019-12-08 02:53:45
问题 I need to replace a token with a property. That property has a path location set. I am not getting it as it is just replacing it with the $ <replace file="${APACHE_HOME}/conf/wc_server1.conf" > <replacetoken>@Install_Base_Directory@</replacetoken> <replacevalue>$InstallerBase</replacevalue> 回答1: You basically have two options: <replace file="${APACHE_HOME}/conf/wc_server1.conf" > <replacetoken><![CDATA[@Install_Base_Directory@]]></replacetoken> <replacevalue><![CDATA[$InstallerBase]]><