Все вопросы: [ant]

591 вопросов

60
голосов
24ответов
140589 просмотров

Why does ANT tell me that JAVA_HOME is wrong when it is not?

I get the error: C:\dev\ws\springapp\build.xml:81: Unable to find a javac compiler; com.sun.tools.javac.Main is not on the classpath. Perhaps JAVA_HOME does not point to the JDK. It is currently set to "C:\Program Files\Java\jre6" But I have clearly set my JAVA_HOME to be C:\Program Files\Java...

1
голосов
2ответов
179 просмотров

How to report TODOs and other tags with CruiseControl?

In one project the use of //TODO, //XXX and //FIXME tags is very common. The problem is that nobody has an overview of all TODO lines - only Eclipse shows all the tasks in one view. I would like to display all TODOs with filenames in our daily build report created by CruiseControl. How can thi...

1
голосов
3ответов
1137 просмотров

copying stored procedures each into its own file using ant

I want to be able to have an ant task which would connect to a remote oracle instance and copy the stored procedures each into its own file. I know I can have an ant sql task which will do SELECT object_type, object_name, dbms_metadata.get_ddl(object_type, object_name) object_...

1
голосов
2ответов
239 просмотров

What Toolchains Support Passing in a Nodeset to an XSLT Transformation as a Parameter?

This is a followup to an answer on a previous question I had about XSLT. To recap, I didn't realize that without EXSLT, XSLT wouldn't let you dynamically create an xpath expression with string values. One of the suggested workarounds was to query the input document's DOM before you execute...

0
голосов
1ответов
235 просмотров

How can I generate .war files using .java or .html?

I want to Generate .WAR file from .java / .html

1
голосов
2ответов
723 просмотров

How to turn directories to .jar files with Ant

How to turn a list of directories into a list of .jar files ? It seems that using Copy Task and Mappers is the right way to do this but I did not find any nested element creating a jar file from a directory. Of course, the list of directories would be computed and not hard coded in the ant scrip...

0
голосов
4ответов
2553 просмотров

How to call WSDL2JAVA from ant with whitespaces in my path

HI guys! I try to call Axis2 WSDL2JAVA in my ant file to create a WSDL client. But it's broken because I have whitespaces in my path (I'm on Windows...). This is my ant <property name="wsdl.file" location="C:\path with whitespaces\project\subdir\my.wsdl"/> ... <target name="generate.cl...

1
голосов
1ответов
2751 просмотров

Respond to shell prompts from Ant SSH task (SSHEXEC)

I'm using the SSHEXEC ant task to run an SSH script against a remote linux box. This has worked fine until I try and call a ksh script which prompts the user for input. The script changes the current user (like su). It prompts the user for a change_request_id, and a change_request_reason. So ...

6
голосов
3ответов
10606 просмотров

Is it possible to use a Dynamic xPath expression in a xslt style sheet?

I'd like to use the value of an xslt parameter in an xpath expression. Specifically, as part of a not() call in an <xsl:if expression. <xsl:transform version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <!-- my_param contains a string '/foo/bar', passed in from ant --...

0
голосов
1ответов
1152 просмотров

onerror parameter in ant <taskdef>/<typedef> in antlib descriptor</typedef></taskdef>

I am creating an antlib with custom tasks to be used in our build system. I have looked at antcontrib antlib declaration and noticed that the typedefs/taskdefs have onerror parameter set to ignore, e.g. &lt;taskdef name="for" classname="net.sf.antcontrib.logic.ForTask" onerror="igno...

32
голосов
5ответов
69385 просмотров

build.xml in Java project

What is the file build.xml? I was wondering if it is a possibility to import this project in Eclipse or Netbeans using this build.xml. I tried to import the project but I get some errors since one part is created using J2ME and the other J2SE and I guess this file should be the configuration.

0
голосов
2ответов
400 просмотров

Eclipse: how to run plugin test as part of local build

Due to incomplete understanding of eclipse infrastructure I have one problem. Historically we have one ugly thing in our build procedure. It looks like following: After eclipse builds entire workspace there is one incomplete thing in local build of plugins. It is some data file which is currently...

1
голосов
2ответов
1370 просмотров

compiling SQLJ with Ant

How to compile SQLJ with ant?

1
голосов
1ответов
841 просмотров

groovy ant task

I'm using the groovy ant task to compile my groovy files, but it seems like groovy locks the jar file so it can't be moved, deleted, signed, etc. Has anyone run into this bug before and have a workaround? Seems weird that if I run the groovy ant task and compile to a jar file that groovy doesn't ...

3
голосов
1ответов
469 просмотров

Documentation with Doxia + Ant

I would like to use Doxia to generate some documentation but invoke it with Ant (and no, Maven is not an option). I was looking for some pointers but nothing popped up after a few Google search. Did anyone already used Doxia in an Ant environment and how did it turned out?

1
голосов
3ответов
1003 просмотров

Running FlexUnit4 tests in Hudson with ant

I'm just starting to try figure out how to go about continuous integration and test driven development, specifically in Flex 4. I'd like to run FlexUnit4 tests from an ant script initiated in Hudson. I can get hudson to compile my app but how do I then go about running/seeing results of my tests?

0
голосов
1ответов
722 просмотров

per-file dependencies in ant

I have a set of input files, each of which is processed to generate an output file. In one case it's hibernate xml files as input, and java files as output, but that isn't the only case I have to deal with. In make, I would have set up a rule to tell it how to generate a .java file from an .hbm...

7
голосов
5ответов
2596 просмотров

How can I build PDF LaTeX documents with ANT (or some other build system if you prefer)?

The team I work for manages a large collection of technical documentation which is written in LaTeX. Currently all the documentation we have is manually built by the editors and then checked into a version control system. Sometimes people forget to compile their documents so we have a situation...

2
голосов
2ответов
5341 просмотров

Ant Property containing Macrodef Parameters

Is there a way to put a value in a property that contains a macrodef parameter string? For example, in the following macrodef I would like to add the ${build.dir}/widget/@{platform}/@{resolution}/${widget.name} to a property as it is used in several macrodefs. &lt;macrodef name="setBuildstamp...

0
голосов
1ответов
1621 просмотров

Ant Bulk Search and Replace

I have a properties file in which the keys represent strings in source code files that I would like to search for, and the values represent the replacement string that I would like to replace the strings with (see below for an example). I would like to perform these replacements over a set of fi...

1
голосов
3ответов
4873 просмотров

How to pass xml text as argument in exec ant task?

We need to call an executable from ant that takes xml as part of the argument. Using exec is easy enough, but one of the arguments includes an xml file. We tried loading the xml file using the loadfile target with striplinebreaks &lt;loadfile property="xmlStuff" srcFile="xmlFile.xml"&gt; &lt;...

3
голосов
2ответов
3382 просмотров

How can I stop a CruiseControl build or change the configuration to cause long running builds to time out?

Is there any way to stop an active CruiseControl build short of stopping and restarting CruiseControl? I'm running CruiseControl Dashboard version 2.7.2. If there is no way to stop an active build, or how can I cause long running builds to timeout? Is this something I should configure in CruiseC...

11
голосов
3ответов
13914 просмотров

How can I use the Ant tar task and preserve file permissions?

Of course it can be done using the exec task, but my question is: Is it possible to do it using the tar task?

9
голосов
5ответов
9676 просмотров

Best location for ant build.xml files?

For those of you that use Ant with multiple projects, where do you put the build.xml files? Do you put one in each project, or do you put them in a separate project that contains all your Ant-related files? The usual recommendation is to put a build.xml in each project. But this has a few drawba...

2
голосов
2ответов
1030 просмотров

How to suppress ant jar warnings for duplicates

I don't want ant's jar task to notify me every time it skips a file because the file has already been added. I get reams of this: [jar] xml/dir1/dir2.dtd already added, skipping Is there a way to turn this warning off?

6
голосов
3ответов
7708 просмотров

How to fail Ant build if errors are detected in either of two files?

I am using Ant to do a database build by basically using the exec task to run some SQL scripts. However, there might be errors generated during the script execution (e.g. could not properly drop a connected user, etc) so I check for this by looking through two output log files. Here's a sni...

8
голосов
2ответов
22344 просмотров

How to generate javadoc with ant, for an existing project?

I want to make a Javadoc from an ant build file, but I don't see where it is. In build.xml I have: &lt;description&gt; A sample build file for this project &lt;/description&gt; &lt;property name="source.dir" location="src"/&gt; &lt;property name="build.dir" location="bin"/&gt; &l...

1
голосов
2ответов
1578 просмотров

Simple Java Ant build problem

Completely new to Ant and I have just a simple problem. I'm running ant with a input file: ant -Dargs="input.txt" run but it says it cannot find input.txt (No such file or directory). I have the build.xml file and input.txt in the same directory, above src and bin. Here is my build.xml file, a...

5
голосов
5ответов
2775 просмотров

xmltask confused about dtd

I'm trying to use xmltask for ant to modify a file in a subdirectory: project/path/to/file.xml The file refers to a DTD like this: &lt;!DOCTYPE data SYSTEM "mydtd.dtd"&gt; I don't have the flexibility to change these documents. This DTD is stored in the same subdirectory, which has always ...

7
голосов
2ответов
7406 просмотров

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

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: &lt;version&gt;2.03.010&lt;/version&gt;