No. There might be a task that does this but it would still need to perform
an extract-modify-update behind the scenes.
On Tue, Sep 16, 2008 at 8:10 AM, jaki <[EMAIL PROTECTED]> wrote:
>
> Is it possible to modify a txt/xml file within a jar (or any archive for
> that
> matter) in ant without h
Environment variables available to Ant must be set in the caller's
environment *before* launching the Ant Java process. So the answer is no,
you cannot set an environment variable within an Ant script the way you
might set one in a shell script. If you are ing another command you
can set variable
Carlos,
That message is coming from the element, which apparently does
not support a nested . The Ant documentation matches the error
message you are seeing and says that only supports single
element resource collections (
http://ant.apache.org/manual/CoreTasks/sql.html).
Try removing so that
Shivani,
Are you saying that the inserts are successful when using but
unsuccessful when using your Java class?
If both of the above methods are unsuccessful, have you tried inserting
without Java or Ant? Another factor could be database configuration.
-Andrew
On Fri, May 2, 2008 at 12:40 AM,
If you are running Ant 1.7.0 try expandproperties="false" on . I'm not
sure this works when running a separate sql file but it is worth a try.
Otherwise I would try escaping the [EMAIL PROTECTED] with double $s and maybe
double @s as well:
$${@@colindex.0}
I haven't tested either of these but t
Prateek,
The behavior you are seeing is probably more indicative of how
handles the output of , rather than returning different
things in different contexts. While I don't know for sure, my guess is that
is always returning the directories but its caller might be doing
other things to filter t
Ilango,
>From command line you just pass in the target name as an argument:
ant generate-Metro-jaxws
http://ant.apache.org/manual/running.html
For Eclipse you can either launch the target by right-clicking the target on
the right side of the Ant editor, or you can create a launch configuration
t
What are the attributes and values you are providing to the Ant task?
What are the arguments you are passing to native2ascii on the command line?
For troubleshooting purposes, also make sure that the JAVA_HOME containing
the native2ascii that you are running from the command line is the same
JAVA
The symlink task (http://ant.apache.org/manual/OptionalTasks/symlink.html)
can be used to create symbolic links with relative paths on a per-file
basis:
The value given for the resource attribute is relative to the location of
the link you are creating (same behavior as command-line usage of ln)
Try escaping the & character xml-style with & instead of \&
pattern="<"
-Andrew
On 8/22/07, Chun Ji <[EMAIL PROTECTED]> wrote:
>
>
> Hi,
>
> Does someone know how to replace a string such as "<" to be "<" in a
> html file by ANT.
> The target that I have created in my build.xml is :
> "
> ...
Running your program from within an Ant script:
If you need to run Ant itself in 64-bit Java set ANT_OPTS="-d64"
-Andrew
On 8/22/07, cactuar <[EMAIL PROTECTED]> wrote:
>
>
> I am running Java on HP platforms (PA-RISC and Itanium). The HP Support
> suggested me to add "-d64" option to the
I posted bug 43092 for this issue:
http://issues.apache.org/bugzilla/show_bug.cgi?id=43092
-Andrew
On 7/10/07, Kevin Jackson <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> Has anyone posted a bug on BZ for this?
>
> If we have an open bug report and a patch & test for it, we can
> perform the fix and ge
You could probably define "if" and "unless" custom attributes in your macro
and then use with ant-contrib's to check them inside of your
macro.
Something like this (untested!):
... other attributes...
... do stuff
Have you tried writing the entire message body to a file and then using the
messagefile attribute of ? If you do this then the contents of the
listing file don't need to go through .
-Andrew
On 7/11/07, Dwayne Walker <[EMAIL PROTECTED]> wrote:
I have a file that I wanted to load into the body
Regarding my earlier post, the upgrade from JSch 0.1.31 to 0.1.33 did not
make any difference. It sounds like that Ant patch will help though.
-Andrew
On 7/10/07, ruel loehr <[EMAIL PROTECTED]> wrote:
I am facing this problem also. Has a bug been opened up for this? I'm
unable to find it in
Same problem for me too. We have been experiencing this intermittently for
the past few months. It started happening for me again yesterday, and I am
sure that the remote script is exiting with 0 status. This seems like a JSch
bug to me. I have been running JSch 0.1.31 but I just upgraded to the n
I have seen this before with global taskdefs during antcalls between targets
in the same build file. You probably have something defined globally that is
being loaded multiple times. If you have an init target that gets run at the
beginning and then never again during the same execution, you could
I have done this by using the sqlplus task from Incanto (
http://incanto.sourceforge.net/usage-sqlplus.html) with failonerror=true and
the statement WHENEVER SQLERROR EXIT FAILURE ROLLBACK at the top of the SQL
scripts being run. This will cause any ORA error to halt sqlplus, thus
failing the Ant
If you are running Ant 1.6.3 or later, you can use the
condition:
The skip.replacement property will be set if the file already contains the
replacement text. You can then run conditionally on this property.
You could also use ant-contrib with to combine t
In your Ant output, I don't see any calls to the targets you provided. It
looks like your error is occuring in some other target (maybe scanlogs).
Go to line 94 in your script to see if you're looking at the right target.
-Andrew
On 12/15/06, Dharmesh Vyas <[EMAIL PROTECTED]> wrote:
Hello Gro
on my hard drive.
Below is are the relevant bits of the script.
Thanks again for your help.
Angus
Andrew Goktepe wrote:
>
> Are you using the ANT_HOME that is bundled with OC4J, or a different
one?
>
> Make sure you have oc4jclient.ja
Are you using the ANT_HOME that is bundled with OC4J, or a different one?
Make sure you have oc4jclient.jar in your classpath.
Can you post the section of your script where this call is being made?
-Andrew
On 7/31/06, Angus Rose <[EMAIL PROTECTED]> wrote:
Hi All,
I am creating a scrip
se case
while reusing as much of the script as practical?
Thanks again,
Jamie
On 7/28/06, Andrew Goktepe <[EMAIL PROTECTED]> wrote:
>
> Oops. s/
> On 7/28/06, Andrew Goktepe <[EMAIL PROTECTED]> wrote:
> >
> > We use a separate properties file for each environment, a
Oops. s/ wrote:
We use a separate properties file for each environment, and have common
property names. Instead of integ.transfertype, stage.transfertype, etc, I
would just have 'transfertype' and it would have different values in the
different files. Then the Ant script has targets based on th
We use a separate properties file for each environment, and have common
property names. Instead of integ.transfertype, stage.transfertype, etc, I
would just have 'transfertype' and it would have different values in the
different files. Then the Ant script has targets based on the possible
values o
hem, ANT refuses compilation.
Best,
Andreas
-Ursprüngliche Nachricht-----
Von: Andrew Goktepe [mailto:[EMAIL PROTECTED]
Gesendet: Donnerstag, 27. Juli 2006 16:13
An: Ant Users List
Betreff: Re: How to use white spaces in a build script
Where is the path being set (property tag, command lin
Where is the path being set (property tag, command line, property file,
etc)? Can you post the relevant parts of your script, and the error that you
get?
-Andrew
On 7/27/06, Andreas Holtmann <[EMAIL PROTECTED]> wrote:
Hi,
I have an ANT task which makes use of a DLL that should be copied fr
You can also do this:
See http://ant.apache.org/manual/CoreTypes/selectors.html
-Andrew
On 7/26/06, Dominique Devienne <[EMAIL PROTECTED]> wrote:
Use but with a nested filter, so the
property will be empty when the string is not found, which avoid
storing the whole file in the pr
This is not a bug. Properties that are set during an antcall are not passed
back to the calling target, but properties do go the other direction as the
called target inherits them from its parent. Therefore, when target2 calls
dependency1, run_once_target.done is set, but is lost when control retu
If you want this behavior globally, you can use the -keep-going option (
http://ant.apache.org/manual/running.html). Beware of dependencies though;
continuing on error is rarely a good idea.
-Andrew
On 7/24/06, John Davis <[EMAIL PROTECTED]> wrote:
Hello
I have a setup where the top-level bu
You could force to compile only that package using the 'includes'
attribute. However, depending on how your project is set up, it's probably
better to make the separation when you create the jar files. Use
'includes'/'excludes' with the task to get the right classes into the
right jars.
http://a
http://ant.apache.org/manual/CoreTasks/conditions.html
See the "os" condition. This allows you to determine the OS in your Ant
script and configure your web application accordingly.
-Andrew
On 7/3/06, Raghuveer <[EMAIL PROTECTED]> wrote:
Is it possiable to identify OS and make my web applicat
You installed the JRE, not the JDK. Ant needs the JDK.
On 5/6/06, aaron smith <[EMAIL PROTECTED]> wrote:
I just installed the latest ant build with the latest Java jdk/jre. when
I try and run ant it says this:
"Unable to locate tools.jar. Expected to find it in C:\Program
Files\Java\jre1.5.0_0
You could also try the task available from Incanto:
http://incanto.sourceforge.net/usage-sqlplus.html
-Andrew
On 3/17/06, Anderson, Rob (Global Trade) <[EMAIL PROTECTED]> wrote:
>
> Those statements...
> @ggov_applications.spc
> @ggov_applications.bdy
>
> are not standard sql, they are specific
You might be able to generate a file and use the 'input' attribute of
, with each command on a separate line in the input file. This does
not allow you to parse any output or wait for results, but if the program
isn't reading from STDIN each time until its next prompt, this should work.
-Andrew
O
Is the new file in a directory that is also new? The cvs add command is not
recursive; you will need to add any new directories first.
Try doing the add and commit of the same file manually on the command line
and see if you get an error that way too. If so, then this is not a problem
with Ant.
-
This has nothing to do with the sql task, so I updated the message subject.
You also need to provide more details. Which version of WebSphere? If it is
5.1.x or later, then this should get you started:
http://publib.boulder.ibm.com/infocenter/ws51help/topic/com.ibm.websphere.base.doc/info/aes/java
Yes, the problem is related to classes12.jar.
You need to specify the driver class name in the task, and you also
need the class to be found on your classpath. For example, in your Ant
script you might want to use
wrote:
>
>
> Hello fellow users,
> I have been stuck in a
ct the properties via gui
> have a look @ AntForms.
>
> give it a shot =
>
> http://antforms.sourceforge.net/
>
>
> Gilbert
>
> -Original Message-
> From: Andrew Goktepe [mailto:[EMAIL PROTECTED]
> Sent: Thursday, February 02, 2006 2:03 PM
> To: Ant Use
l application servers, but I want a
GUI front-end to collect all of the settings from the user before running
the script.
-Andrew
On 2/2/06, Steve Loughran <[EMAIL PROTECTED]> wrote:
>
> Andrew Goktepe wrote:
> > I am looking for an ant-based GUI installer to configure and deploy ou
using any others besides these two? Although I can't use anything that is
licensed under the GPL, I'd still like to know about any other choices that
are out there.
Thanks,
Andrew Goktepe
[EMAIL PROTECTED]
Look at the input and inputstring attributes of :
http://ant.apache.org/manual/CoreTasks/exec.html
-Andrew
On 2/1/06, Punnoose, Roshan <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
>
>
> Is there anyway at all to be able to read input on the exec task? I am
> running ClearTool and it is asking for inpu
Then have the script act according to whether or not running.on.windows is
set.
You can also use the os attribute of exec, but there are multiple OS values
for multiple versions of Windows.
-Andrew
On 1/23/06, Marc Collin <[EMAIL PROTECTED]> wrote:
>
> hi
>
> i search a way to do:
>
> ex
Remove the tags, and then your script will only replace the
first occurrence.
-Andrew
On 1/12/06, Rebhan, Gilbert <[EMAIL PROTECTED]> wrote:
>
>
> Hi,
>
> i have problem with replaceregex.
>
> my script uses a xmlpropertyfile which is generated by
> another pro
This is a WebSphere problem, not an ANT problem.
I do have a suggestion, though. Expand the war file and take a look at the
ibm-web-bnd.xmi deployment descriptor. The tag
should have a 'virtualHostName' attribute, which should probably have a
value of 'default_host'.
If this does not help you wi
Please send the error message from the output of ANT.
-Andrew
On 12/30/05, panji <[EMAIL PROTECTED]> wrote:
>
> i can't compile my java programs using ant's build.xml like this :
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
Use the 'duplicate' attribute of the task to prevent this.
http://ant.apache.org/manual/CoreTasks/war.html
If you set duplicate="fail" then the task will fail if it finds duplicates.
You can use this to fix any unnecessary redundancy in the source paths. If
the duplicates in the source paths are
Remove the leading forward slash character in your pattern:
-Andrew
On 11/8/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
>
> I tried using the pattern something like this;
>
>
> byline="true">
>
>
>
>
> But I am seeing no changes in my log.txt file altough now I am not getting
> any
Yeah, looks much better. I knew of but hadn't come
across yet.
On 11/7/05, Dick, Brian E. <[EMAIL PROTECTED]> wrote:
>
> ?
>
> -Original Message-
> From: Dan Finkelstein [mailto:[EMAIL PROTECTED]
> Sent: Sunday, November 06, 2005 2:06 AM
> To: user@ant.apache.org
> Subject: How to pars
You could use the task from ant-contrib
http://ant-contrib.sourceforge.net/tasks/tasks/propertyregex.html
Example (untested):
At this point the dir.example property has the value "fr".
-Andrew
On 11/6/05, Dan Finkelstein <[EMAIL PROTECTED]> wrote:
>
> Hi --
>
> I have a number of directorie
try
http://host.name>"/>
AFAIK, this should work on both UNIX and Windows.
-Andrew
On 10/26/05, Mikael Petterson (KI/EAB) <[EMAIL PROTECTED]>
wrote:
>
> possible to get hostname in ant?
>
> cheers,
>
> //mikael
>
>
> -
> To u
oving these patterns, replacing them with a "" .John.
Andrew Goktepe wrote:
Are you replacing the same string for all 4 patterns?
-Andrew
On 9/26/05, João Augusto Charnet <[EMAIL PROTECTED]
> wrote:
Hello,I'm need to do 4 replaces in more than 100 files, using repl
Are you replacing the same string for all 4 patterns?
-Andrew
On 9/26/05, João Augusto Charnet <[EMAIL PROTECTED]> wrote:
Hello,I'm need to do 4 replaces in more than 100 files, using replaceregexp task.
My problem is that I'm doing 4 times the replaceregexp task, and it's beeing to costly.Is th
Look at the line preceding that one in the output. That should tell you the
directory CVS was in when it encountered that error. Then take a look at its
subdirectories. Look for local versions (created manually, not checked out)
of a subdirectory which also exists in the CVS repository. That cou
Remember that all that matters is that the property is set to something.
When you pass , you are
setting that parameter for the target you are calling. This means that if
file.exists has not been defined previously, you have just set it to the
value "${file.exists}", and from that point forward
Put the 3 parameters on 3 separate lines in the input file, matching the order of the prompts.
-Andrew
On 9/14/05, João Augusto Charnet <[EMAIL PROTECTED]> wrote:
Hello, I'm using exec task to run some sql scripts (calling sqlplus and passing an sql script to it). This script prompts the user 3
Please send the section of the script where you set the property.
On 9/14/05, Greg Akins <[EMAIL PROTECTED]> wrote:
>
> I have two targets. One has a "if", the other has an "unless" that both
> evaluate the same property.
>
> I conditionally set the property based on the length of a file.
>
>
Start with these:
- all calls within the build files
- any batch files that are used to setup environment variables and call Ant
will have to be converted to shell scripts with the appropriate syntax
- watch for backslashes anywhere and change them
- remember that files and directories in UNIX a
It looks like the problem occurs within a single build script. The bug
mentioned applies only when you make a call to another script using .
On 9/13/05, Antoine Levy-Lambert <[EMAIL PROTECTED]> wrote:
>
> Hello Aliaksandr,
>
> this sounds like bug 25777, which was fixed in Ant 1.6.3,
> Which v
That looks like the correct behavior to me. This is analogous to properties,
which are set once and cannot be changed again.
On 9/13/05, Aliaksandr Voitau <[EMAIL PROTECTED]> wrote:
>
> Hi,
> here is a piece of my buildfile.
>
>
>
>
>
>
> classname="my.pkg.Sample">
>
>
>
>
> While t
The task is from the ant-contrib project.
Manual:
http://ant-contrib.sourceforge.net/ant-contrib/manual/tasks/
Download:
http://sourceforge.net/project/showfiles.php?group_id=36177
-Andrew
On 9/11/05, Mark McKay <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> I was reading the bug report on the apt
You could use the task to determine whether or not the file
already exists.
http://ant.apache.org/manual/CoreTasks/available.html
-Andrew
On 9/8/05, Jason Novotny <[EMAIL PROTECTED]> wrote:
>
>
> Hi,
>
> I want to copy a file from source to dest ONLY if the dest file does
> not exist. It s
Something like this should work:
This loads the contents of the file into the file.txt.contents property,
then parses the revision number out and sets it in the Revision.Numberproperty.
is an Ant core task, and is part of ant-contrib.
I haven't tested this, so you may have to play arou
Click on the parent folder or any folder above that and then press the F5
key to refresh. Any new folders or files should show up after that.
-Andrew
On 9/7/05, Ana Gaspar Martínez <[EMAIL PROTECTED]> wrote:
>
> Nicolas Vervelle wrote:
>
> >
> >
> > Ana Gaspar Martínez wrote:
> >
> >> Is ther
> First of all, Thanks!
>
> But can you tell WHY Ant touched my jar?
>
> Regarding your second comment, if I'll omit the update flag, the jar will
> be recreated every time the task is executed?
>
> Thanks,
>
> Barak.
>
> -Original Message---
You can use the task to compare timestamps between a set of files
and a target file. In your case, the set of files are your class files, and
the target file is your jar file.
(your current contents of compile_cli here)
Also, are you sure you want update="true" on the jar task? T
Have you looked at the cvspass task? This still uses the .cvspass file, but
it allows you to provide the password so that you can log in for the first
time from the Ant script.
http://ant.apache.org/manual/CoreTasks/cvspass.html
If you're running on Windows, though, there's a known bug that is
nts are it gives the same
> error when all I had is 1 line:
> java proj.client.Client
>
> I know I could run the above command in a Java task, it is trivial
> because I was trying to eliminate the contents of the bat file as the
> troublemaker.
>
> -Jon
>
> -Original Me
The external program that you called from your Ant script returned a value
of 1. If you're interested in what that error means you'll have to examine
that program. Ant is just relaying it back to you. You could also provide
the calling task and more of the output if you want to dig further.
-
Assuming that having double backslashes in the basedir would solve your
problem, you could use the propertyregex task from ant-contrib to use a
second property with that substitution:
...
Yes, there are 8 backslashes in the 'replace' attribute value. That is how
many I needed to end up with
On second glance, it looks like that only applies to the fixlastline
attribute.
If you can't find any other solution, you could try the ugly way - put
at the end of each line. I haven't tested this either.
On 8/22/05, Andrew Goktepe <[EMAIL PROTECTED]> wrote:
>
>
Try setting eol="crlf":
http://ant.apache.org/manual/CoreTasks/concat.html
-Andrew
On 8/22/05, Karunakar Chatla <[EMAIL PROTECTED]> wrote:
>
>
> Hi,
>
> I have following script where I am writing some text to file.
> I wanted each of the lines in seperate line in the file. It is writing to
For the '<' char you can use '<'
Ant should take whatever you give for the 'command' value and use it for
the CVS command line. For rlog you could do the following:
-Andrew
On 8/3/05, KrustyDerClown <[EMAIL PROTECTED]> wrote:
>
> Hello,
>
> how can i pass the argument "-d 2005-10-10<2005-
The 'ant' task might be what you're looking for - it works like antcall, but
on a separate build file.
http://ant.apache.org/manual/CoreTasks/ant.html
Example:
-Andrew
On 7/30/05, Frank W. Zammetti <[EMAIL PROTECTED]> wrote:
>
> Well, I'm not sure how one calls another whole script, perh
Try it without the trailing slash in the dir attribute
(dir="/home/thufir/java").
On 7/30/05, THUFIR HAWAT <[EMAIL PROTECTED]> wrote:
>
>
> Heh, thanks. Here's what I have:
>
>
> dir ="/home/thufir/java/"
> files ="foo.txt"
> />
>
>
> I want "/home/thufir/java/foo.txt" to be appended to
75 matches
Mail list logo