ant

ant basedir and eclipse .project file generation

独自空忆成欢 提交于 2019-12-22 05:31:33
问题 I have an ant target that echo's the content of an eclipse .project file, the idea here is to ensure that the project is easily importable into eclipse. The project name should match the directory in which its checkout. I have this so far <target name="eclipse" description="creates an eclipse .project file"> <echo file=".project"> <![CDATA[<?xml version="1.0" encoding="UTF-8"?> <projectDescription> <name>${basedir}</name> <comment></comment> <projects> </projects> <buildSpec> <buildCommand>

Ant/Maven: “javadoc: warning - Error fetching URL”

不羁的心 提交于 2019-12-22 04:44:11
问题 I recently set up my build server (Jenkins) to generate Javadocs for Ant builds. However, no matter what I do, I can't get it to include links to external libraries. When I attempt to use an online link, Ant returns: [javadoc] javadoc: warning - Error fetching URL: http://docs.oracle.com/javase/6/docs/api/package-list When I use an offline link and reference a local copy of a package list, it gives no warnings, but doesn't generate links either. This occurs for every library I attempt to link

How to use JarJar with Android to change package names of external jars?

让人想犯罪 __ 提交于 2019-12-22 04:42:39
问题 I can't seem to find any clear instructions on how to use JarJar with an Android project. I've got a scenario where my application project relies on two separate libraries, which both happen to use the same external .jar files. If I try to compile the application I get "Conversion to Dalvik format failed with error 1". Can someone show me how to user JarJar on Android, using the build.xml file, in order to change the package name of a thirdparty .jar folder? 回答1: Try it by following these

Ant macrodef: Is there a way to get the contents of an element parameter?

倾然丶 夕夏残阳落幕 提交于 2019-12-22 04:34:28
问题 I'm trying to debug a macrodef in Ant. I cannot seem to find a way to display the contents of a parameter sent as an element. <project name='debug.macrodef'> <macrodef name='def.to.debug'> <attribute name='attr' /> <element name='elem' /> <sequential> <echo>Sure, the attribute is easy to debug: @{attr}</echo> <echo>The element works only in restricted cases: <elem /> </echo> <!-- This works only if <elem /> doesn't contain anything but a textnode, if there were any elements in there echo

How to add dependency to Ant project

China☆狼群 提交于 2019-12-22 04:31:12
问题 I would like to add dependency to my Ant project; for example I want to add hibernate dependency to my project. I'm new to Ant. Before I used maven tool to build project. in maven it is very easy to add dependency to pom.xml file. My build.xml file <?xml version="1.0" encoding="UTF-8"?> <project name="Demo ANT Project-1" default="run"> <target name="run" depends="compile"> <java classname="com.company.product.RoundTest"> <classpath path="staging"/> </java> </target> <target name="compile">

How to add dependency to Ant project

跟風遠走 提交于 2019-12-22 04:31:07
问题 I would like to add dependency to my Ant project; for example I want to add hibernate dependency to my project. I'm new to Ant. Before I used maven tool to build project. in maven it is very easy to add dependency to pom.xml file. My build.xml file <?xml version="1.0" encoding="UTF-8"?> <project name="Demo ANT Project-1" default="run"> <target name="run" depends="compile"> <java classname="com.company.product.RoundTest"> <classpath path="staging"/> </java> </target> <target name="compile">

help with ant file - classpath for Java task

你离开我真会死。 提交于 2019-12-22 04:28:19
问题 I have the below build file for Ant and trying to use the target 'run' for executing the program. <property name="springjar" location="E:/Tools/spring-30/dist/" /> <property name="logjar" location="E:/Tools/commons-logging-1.1.1/" /> <patternset id="jar.files"><include name="**/*.jar"/></patternset> <path id="springlearn.classpath"> <fileset dir="${springjar}"><patternset refid="jar.files"/></fileset> <fileset dir="${logjar}"><patternset refid="jar.files"/></fileset> </path> <target name="run

Failed to build Android app (refer to both ActionBarSherlock & ViewPagerTabs) with Ant

北战南征 提交于 2019-12-22 04:17:14
问题 I have one Android app which uses ActionBarSherlock & ViewPagerTabs. I use Eclipse to write and build it, and it just works well until I try to build it with Ant. Here's what I did: go to ActionBarSherlock folder, run "android update lib-project --path ." go to ViewPagerTabs folder, run "android update lib-project --path ." too go to app folder, run "android update project --path ." run "and debug" under app folder, and I got following errors: : [javac] C:\Android\TestApp\src\com\test\App

Is it possible to single out and run a specific goal bound to a maven phase?

允我心安 提交于 2019-12-22 04:16:19
问题 Updated to (hopefully) clarify : If a goal is defined to run during a given phase, is it possible to run the individual goal without running thru all phases. In other words would it be possible to run the antrun:run goal (which is defined as part of the install phase below) without getting dependencies, generate-resources, compiling, testing, package, etc? I'm using the antrun plugin to create a zip file during the package phase and to delete and copy some files during the install phase. I

The prefix “sonar” for element “sonar:sonar” is not bound

ⅰ亾dé卋堺 提交于 2019-12-22 03:23:38
问题 I have a build.xml-file that looks something like this: <taskdef uri="antlib:org.sonar.ant" resource="org/sonar/ant/antlib.xml" classpath="/path/sonar-ant-task.jar"/> <target name="sonar"> <sonar:sonar/> </target> And when I run the file I get: The prefix "sonar" for element "sonar:sonar" is not bound. Any obvious things I'm missing? 回答1: You're missing the namespace declaration in the top project element of your Ant script. xmlns:sonar="antlib:org.sonar.ant" ought to do it. 回答2: In ant you