Maybe you want, although it's not really the same...?
...
The other way would be to use ant-contrib's if. Which I think is ugly.
I'm trying to do with ANT anything like:
If exist a file (file.txt)
Exec file.bat
End if
> I am here again needing some help
> now I need to do a I script to compare two ".properties"..like
I'd just write a custom task for these kind of things. Then you're done within
an hour, taking Hofstadters law into account.
If you've never written a custom task, your objective sounds like a goo
Hey,
Hey,
I've written a task that repeatedly calls the 'Ant' task to execute another
target. (The number of times that target is called
Depends on the size of a given FileSet).
The problem is that I get an OutOfMemory error. Wanted to ask if the following
code looks suspicious to anyone. If n
> > Reason: /scratch2/nemer/test/build.xml:47: Problem: failed
> to create
> > task or type antlr
> > Cause: the class
> org.apache.tools.ant.taskdefs.optional.ANTLR was not
> > found.
Did you even look at this:
http://ant.apache.org/manual/OptionalTasks/antlr.html ?
Note that this refers to An
> > The 'help' output and the manual say:
> >"-lib specifies a path to search for jars and
> > classes"
> >
> > I had a look into the source code: the is a real path: it is
> > tokenized by File.pathSeparator and each token is added to Ants
> > classpath.
>
> I didn't have a l
> > So you mean it should work with ; (on Windows) separation
> and a single
> > -lib argument?
> yes, have you tried?
Yes I tried it, and once more right now. Doesn't work. Two possible sources of
confusion:
- Version issue, I use 1.7.0, but the one that's shipped with eclipse.
- The director
Hi Jan,
> Use multiple -lib options
> $ant -lib one.jar -lib another.jar
Great! Thanks. Guess that was the only thing I didn't try...
> I had a look into the source code: the is a real path:
> it is tokenized by File.pathSeparator and each token is added
> to Ants classpath.
So you mean it
Hey,
I tried several ways (space separated, semicolon-separated) to add more than
one directory to the -lib option, somehow I cannot get this working
(-diagnostics doesn't list my jars..). Thankful for any tips.
Felix
-
To uns
Hey,
> And I want to append some more text like reloadable="true" docBase="\YYYRoot"/>, so the content of
> tag would be
>
>
>
>
Did you consider to use a strylesheet transformation?
Felix
-
To unsubscribe, e-mail: user-
Hey Jan,
> list="${src}" delimiter="${line.separator}">
>
>
>
>
Yes this works too, apart from my natural dislikes against for. :-)
I'll include a filter and meditate into happiness..:
Thanks,
Felix
-
To unsubsc
Hey,
I'm trying to figure out a way how to read a text file line by line.
Then for each read line I'd like to invoke a macro with that line's contents as
an argument. I can't find a better whay than using ant-contribs math+var tasks
to count the number of lines read so far. With that I can use
This is why:
http://www.w3.org/TR/2004/REC-xml-20040204/#sec-line-ends
>
> What might be going on here?
-
To unsubscribe, e-mail: user-unsubscr...@ant.apache.org
For additional commands, e-mail: user-h...@ant.apache.org
Hey,
I have the following snippet in my ant file:
This is the first line A
This is the second line B
When I look at the build file, after the A, I see a CR LF.
When I look at the file that ant echoed to, I only see a LF.
What might be going on here?
Felix
---
Heya,
> You can check out the various macroforeach tasks
> around to get an idea of what you need to do.
This hint lead me to AntExtra, which provides a
task that accepts makro names.
Thanks,
Felix
-
To unsubscribe, e-mail:
Well I assume it would be easy to write a contributed task
similar to the one that I describe above. The only thing I'd
need to know is how to execute a macro with a given name from
within a Task implementation...
> I understand what you mean now. You want all possible values
> to be taken car
Hey David,
Thanks for your suggestions.
> Well the only reason I specified the method below is that you
> asked what could be done with ant-core.
> However, if you're able to use ant-contrib, then you can
> simplify it a little more using the ant-contrib task.
Of course this is a possibility,
This approach would make the macros obsolete. Instead I
would move the macro code into the targets you mention, and could do
This is actually how my build file currently looks like. But I
want to switch to macros as they are more lightweight and controllable.
Felix
> You'd probably be better
Hi Ant users,
I have three macros: a, b, c, and a property 'x'. Is there a way to execute the
macro ${x}, i.e. a if ${x}=a, b if ${x}=b, c if ${x}=c, (fail otherwise) with
ant core? Something like
Thanks,
Felix
-
To unsubscri
Whoops
> Maybe you look for something like this:
http://www.ibm.com/developerworks/websphere/library/techarticles/0502_gawor/0502_gawor.html
Felix
-
To unsubscribe, e-mail: user-unsubscr...@ant.apache.org
For additional comman
Maybe you look for something like this:
> -Mensaje original-
> De: David Nemer [mailto:davidne...@gmail.com]
> Enviado el: Monday, March 16, 2009 10:26 PM
> Para: user
> Asunto: Re: Developing in Java with ANT
>
> Hello David and Martin,
>
> Thank you for your answers. But, I was just
Hey,
In a target, I create a bunch of intermediary files which should *always* be
deleted right before the build completes, even if it completes abnormally. This
is quite similar to closing a stream in a java 'finally' block. Anything
similar for ant?
Thanks,
Felix
This is explained on the first page of the ant manual:
http://ant.apache.org/manual/running.html#libs
-
To unsubscribe, e-mail: user-unsubscr...@ant.apache.org
For additional commands, e-mail: user-h...@ant.apache.org
Heya,
I confirm that both alternatives work. However, I'm more confident
with "^\s*", and don't see why "\s*" works...
Felix
-
To unsubscribe, e-mail: user-unsubscr...@ant.apache.org
For additional commands, e-mail: user-h...@an
I found the solution my self in the ant manual:
It would be nice to do this on-the-fly, so that source and dest are the same.
Is this possible somehow?
---
Hey,
I prefer my xml files to look nice, so I indent multi-line-echoes (these go to
a file). Is there a simple ant way to remove all the spaces that were caused by
the indentation afterwards?
Felix
-
To unsubscribe, e-mail: us
> Use ;)
That brings me to ask: Does the new (?)
Hi,
> There is not task for that.
> But starting Ant with "-projecthelp" will show the targets.
That's perfectly fine.
> "ant -Da=someValue" will start target a but not target b.
Yes this works. I tried to find a way that lets me omit the "=someValue"
part, as the value doesn't matter..
Feli
Hey,
A) I couldn't find a task that shows all available targets (and their
descriptions). I didn't think through whether that's a computable
problem, but I guess it is :-)
B) I'd like to just 'define a symbol' on the command line. My target
would then conditionally do something different if
A gi
28 matches
Mail list logo