ant

The taskdef ant task cannot be found

不羁岁月 提交于 2019-12-10 02:42:01
问题 All - I'm following the most simplest instructions on this page: http://ant.apache.org/manual/develop.html However, when I try to execute the target "main" I get this error in netbeans: taskdef class dec102012.MyAntTask cannot be found using the classloader AntClassLoader[] But this error does not make sense because my new Java class that extends "Task" looks like this: package dec102012; import org.apache.tools.ant.BuildException; public class MyAntTask extends org.apache.tools.ant.Task{

what is org.eclipse.wst.common.component and how to use it for ant

北城以北 提交于 2019-12-10 02:19:01
问题 I have an eclipse workspace (for work) that has an ear project that I use to "export"/deploy an ear file to a JBoss server. However, they recently asked me to create an ant script that can build the workspace and create the ear, and I have done this successfully. The problem arises when I try to run my program with this ear that was built using the ant script; for deploying I'm simply copying the resulting ear file and pasting it into the JBoss/standalone/deployments folder and running the

System.out with Ant

六月ゝ 毕业季﹏ 提交于 2019-12-10 02:14:15
问题 I'm googling without success to figure out how to make ANT print System.out.println/System.out.print messages in the console. Messages simply don't appear. I haven't found any simple way of doing this. Is there any? Thanks 回答1: The junit task printsummary attribute has a special setting withOutAndErr that: is the same as on but also includes the output of the test as written to System.out and System.err. 回答2: Use the echo task <echo message="Hello, world"/> <echo message="Hello, file" file=

How do I use environment variables in an Eclipse .classpath file?

烂漫一生 提交于 2019-12-10 01:49:49
问题 In Windows I have an environment variable EXTERNAL_LIB_ROOT that points to C:\Program Files\MyExternalLibRoot. On another machine, it may point to C:\ExternalLibs. In an ant build.xml file I would use: <pathelement location="${env.EXTERNAL_LIB_ROOT}/path/to/jar.jar"/> How do I set up an Eclipse project .classpath file to use the EXTERNAL_LIB_ROOT environment variable? Is it possible to have Eclipse auto generate the build.xml file using the environment variable as above? 回答1: Not an

Maven:install jar file during build process

﹥>﹥吖頭↗ 提交于 2019-12-10 01:33:48
问题 I have got a requirement as follows. I need to run ant build file during maven build process. I need to invoke the build.xml from my pom.xml file. I have done that using maven-antrun-plugin. Now I need to install the ant build generated jar file automatically into my local repository before maven compiles my project source. I tried using build-helper-maven-plugin but it did not help. Either I am doing something wrong, or i am not doing right. Please help. Update Thank you. ant maven tasks

android-sdk/tools/ant/build.xml:698: null returned: 1

女生的网名这么多〃 提交于 2019-12-10 01:10:22
问题 I'm trying to test a Android release build to make sure nothing unexpected occurs. While trying to build with ant from the command line: /usr/local/bin/ant release ... BUILD FAILED .../android-sdk/tools/ant/build.xml:653: The following error occurred while executing this line: .../android-sdk/tools/ant/build.xml:698: null returned: 1 When I look at build.xml:698 , the issue is with the Proguard file below. <aapt executable="${aapt}" command="package" verbose="${verbose}" manifest="${out

what can Phing do that Ant can't?

大城市里の小女人 提交于 2019-12-10 01:10:01
问题 I'm doing PHP development and I'm thinking of using one of these. I have both PHP and Java installed on my machine. In theory I could use any of the two. What are the compelling arguments to pick Phing over Ant? 回答1: The greatest argument I have in favor of Phing is that it's fully developed in PHP ; which means, at least : You can debug it / submit patches if you want You can develop tasks in PHP including tasks which are specific to your project that can use stuff from your project (I've

ant jar's mainclass

孤街醉人 提交于 2019-12-10 01:02:36
问题 how do i set the Main-Class attribute of my jar in ant? 回答1: Create a manifest: <manifest file="build/MANIFEST.MF"> <attribute name="Main-Class" value="foo.FooMain" /> </manifest> <jar destfile="build/foo.jar" manifest="build/MANIFEST.MF"> <fileset dir="build/classes" /> </jar> 回答2: You can specify it in the manifest by using the Manifest nested element of the Jar task. Set Main-Class to the required class. 来源: https://stackoverflow.com/questions/2165311/ant-jars-mainclass

How do I test to see that a directory is empty in ANT?

萝らか妹 提交于 2019-12-10 00:53:27
问题 How can one test to see that a directory is empty in ant? 回答1: You can use the pathconvert task to do that, with the setonempty property. <pathconvert refid="myfileset" property="fileset.notempty" setonempty="false"/> will set the property fileset.notempty only if the fileset those refid is myfileset is not empty. You just have to define myfileset with your directory, and no excludes do get a directory empty test: <fileset dir="foo/bar" id="myfileset"/> See this example for a use case: use

Ant failed to build on Ubuntu

你离开我真会死。 提交于 2019-12-09 23:55:51
问题 I hope someone can help me out with this problem. I am using an Ant Build to compile my java code but I get the following errors: Buildfile: <PATH> BUILD FAILED <PATH>build.xml:55: sdk.dir is missing. Make sure to generate local.properties using 'android update project' or to inject it through the ANDROID_HOME environment variable. Total time: 345 milliseconds I am using eclipse. 回答1: There are two solutions to this problem, as described in the error message: Set the value of the sdk.dir