First I must say that Ant is not a process language it is a rules
language so tasks like and do not belong in Ant.
Now, is this more like what you want...
X is True!
X is False!
Yadda...
Yadda...
Yadda...
Fully testing this snippet is left as an exerc
Hi
I use ant as a process control tool but have tried to keep my targets
close to the ant model. I do use some looping over a set of files but
only where it is truly needed. I try hard to use the depends and
if/unless constructs to control the execution of targets. I have avoided
using antcal
You might want to look at PDFCreator
(http://www.pdfforge.org/products/pdfcreator). It is a printer driver
that installs just like a printer so that you can print a document to
PDF from any application. I have been using it on Windows for several
years. It has some minor annoyances on Windows V
Hi James.
Take a look at the Ant task or the antContrib task either
of which could be useful to you for this particular case.
HTH Bill
James Griggs wrote:
I am looking for way to iterate through a property that contains a
semicolon delimited list of libraries (jars). The property could
co
You might try setting the ANT_HOME env variable and adding the /bin dir
of ANT_HOME to your PATH var. I have both of those set on my machine
from the installation of ANT.
HTH Bill
贾昊林/Albert Jia wrote:
Hi,David
Thanks for your reply. But sometimes, I have to code between different
workstatio
Create a target named init which will define/set props.someprop to any
value.
HTH Bill
warhero wrote:
##how use some logic based on a
property from
the props file that will either execute the "exec" or just pass it?
Properties are immutable. Run the build file with -verbose and you will
probably see that count is not being updated because it is already set.
Once set a property will not be set a different value.
That said, I think there is a way to use ant-contrib to do this. Look at
the math property task
Hello Erica,
Have you tried to use the task? It might help here to
your task to each file in a list.
If that does not work and you are not opposed to adding antcontrib to
your process, the following example may help using the task from
antcontrib.
|
|
|
||
|
|
In the ex
I don't have any problems with your file on my Windows XP system (and it
surprises me).
This is what I get when I run it:
C:\TEMP>ant -p
Buildfile: build.xml
OMAP_19.12M4 Build script
Main targets:
All--> Builds an integrated Symbian S60 image
Baseport --> Builds the Symbian S60 Basepo
A little while ago Jan Materne suggested the following for another
question about files in a directory.
Can you use something similar, maybe with a * or **/*, and check if the
length of the file list is 0?
HTH Bill
Anderson, Rob (Global Trade) wrote:
I have a build.xml that
IMHO, procedural tasks do not belong in Ant. Ant is a rules driven system.
Yes, I have used the procedural tasks from Ant Contrib and yes, I think they
are useful. But, they don't belong in Ant core. I always try to implement
the Ant file in pure Ant first, and, only as a last resort do I use the
Only a guess, but it looks like the class files for each of the compile
targets go in the same directory. Javac will use that directory to resolve
class files it needs as well as the classpath.
HTH Bill
-Original Message-
From: Barak Yaish [mailto:[EMAIL PROTECTED]
Sent: Thursday, Decem
Here is the debug output from a test run on XP Pro 2002 for the sample build
file you sent.
C:\TEMP>ant -d clean
Apache Ant version 1.6.5 compiled on June 2 2005
Buildfile: build.xml
Adding reference: ant.PropertyHelper
Detected Java version: 1.4 in: C:\j2sdk1.4.1_05\jre
Detected OS: Windows XP
Ad
Have you tried the verbose (-v) or debug (-d) command line options? Be
warned, they put a lot of stuff on the console. When I use them I redirect
the console to a file then browse it with an editor.
HTH Bill
-Original Message-
From: Brown, Carlton [mailto:[EMAIL PROTECTED]
Sent: Monday
Ahh, but is even better to take advantage of the fact that properties are
immutable.
For example, I have a file called user.properties that contains some default
property settings. If the user does not want to use them then she just
specifies a user name on the command line and the user.properties
mm [mailto:[EMAIL PROTECTED]
Sent: Tuesday, October 18, 2005 11:59 PM
To: Ant Users List
Subject: Re: Size of zip file
Bill Rich wrote:
> Many years ago (when floppies and sneaker net were the tranport method
> of
> choice) there were two Unix utilities available to split a zip file
>
Many years ago (when floppies and sneaker net were the tranport method of
choice) there were two Unix utilities available to split a zip file into
parts and merge the parts back to a single zip file. I don't remember who
supplied them or if they are even still available. Perhaps google will
reveal
If you set the environment var using MyComputer, did you restart the command
window before using it? This is a common issue with windows in that the env
vars do not affect the open command windows.
HTH Bill
-Original Message-
From: Jason [mailto:[EMAIL PROTECTED]
Sent: Wednesday, Septem
Gayan, you can redirect the console output to a file using something like
this:
ant ... -v >log.txt
In the log.txt file will be the console output from running the command.
Open it with a text editor and you will see the whole command as requested.
HTH Bill
-Original Message-
From: Stev
It could also stand for Problem Report ...
-Original Message-
From: Ramnish Kalsi [mailto:[EMAIL PROTECTED]
Sent: Thursday, September 15, 2005 1:54 AM
To: Ant Users List
Subject: RE: ant log
Previously Reported ?
just a guess ...
:)
-Original Message-
From: Giuliano Dessì [ma
I have an xsl file that will format the build file for you and display it in
a browser. It works on both IE and Firefox. I have had some problems with it
on Opera. I don't have it with me at the moment but if you want it please
send me an email offline and I will send it to you. HTH Bill
IMHO you are being "helped" by the windows command processor. I think it
treats whitespace as meaningless. What you would end up with is ...-cacheDir
-dt... which the command processor will reduce to ...-cacheDir -dt...
Try typing the command on the command line exactly like it would be
presented
I sometimes have this problem when I post from an email account that is not
the one I used to register on the listserv. Many times it takes a day or so
to get my post back. HTH Bill
-Original Message-
From: Petar Tahchiev [mailto:[EMAIL PROTECTED]
Sent: Thursday, August 25, 2005 7:43 AM
I think part of the answer to this question is another question - why do you
need to change the value of the property?
In Ant properties are immutable. The targets are rule based which implies
that all rules have an equal chance of firing based on the conditions at the
time of evaluation.
Can you
You need something like the following to define the classpath:
Then when you use it use something like this in the task:
Setting the value of the file name in a property won't do it for you.
HTH Bill
-Original Message-
From: Arti Singh [mailto:[EMAIL
/selectors/ContainsRegexpSelector.java?content-type=text%2Fplain
>-Ursprüngliche Nachricht-----
>Von: Bill Rich [mailto:[EMAIL PROTECTED]
>Gesendet: Freitag, 5. August 2005 07:11
>An: user@ant.apache.org
>Betreff: RE: containsregexp selector Ant 1.6.5
>
>Thanks Jan, you raise a good point about
ublic class LRB01 extends java.util.ListResourceBundle {...}
Jan
>-Ursprüngliche Nachricht-
>Von: Bill Rich [mailto:[EMAIL PROTECTED]
>Gesendet: Donnerstag, 4. August 2005 20:13
>An: 'Ant Users List'
>Betreff: containsregexp selector Ant 1.6.5
>
>Hi All,
>I
Hi All,
I am trying to use a fileset to find all the Java ListResourceBundle files in a
product. I am trying to use the following:
Works great if "class", "extends", and "ListResourceBundle" are on the same
line in a file. If there is a line break in there a
This is not expected behavior, at least by me. I do this kind of thing by
setting my properties in an init target then using them in my other targets.
Don't seem to have a problem with it. I assume these two targets are in the
same build file, right.
Bill
-Original Message-
From: [EMAIL
This is untested --
You can use to generate a list of your *.jj files, then use
to place the list in a property, then use the ant-contrib
to iterate over the property passing each file in the list to javacc.
HTH Bill
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
If you have not tried it and gotten a specific error, how are we going to
help you. RTFM. exec is pretty well documented.
Bill
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Tuesday, July 19, 2005 8:13 PM
To: user@ant.apache.org
Cc: [EMAIL PROTECTED]
Subjec
No, the difference is between mailto:[EMAIL PROTECTED]
Sent: Tuesday, July 19, 2005 7:07 PM
To: Ant Users List
Subject: Re: using arguments after the java command
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Bill Rich wrote:
> See if this will help as a model --
>
> f
See if this will help as a model --
The element passes the arg to the JVM while the element
passes the arg to the target class.
HTH Bill
-Original Message-
From: James Black [mailto:[EMAIL PROTECTED]
Sent:
If you have a classpath set, remove it. Let Ant set the classpath for you.
Be sure JAVA_HOME is set properly. The only tools.jar file I have is
C:\j2sdk1.4.1_05\lib\tools.jar, I don't have a classpath env var set and it
works just fine for me.
HTH Bill
-Original Message-
From: Rich Harri
Here is a target that does the entire tree beginning at ${src.dir}. It
includes all the files in the directories that begin with the
${pkg.base.dir} directory. The classpath.javadoc property is set in the init
target and is shown following the javadoc target.
If you fiddle around with this you can
Maybe try a . Try fiddling around with this to see if you can
make it work.
HTH Bill
-Original Message-
From: Kjersti Berg [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 07, 2005 1:37 AM
To: Ant Users List
Subject: Re: Javadoc on all subdirectories
Here is a sample for handling JavaCC that I use. It is similar to what you
want for IDL.
HTH Bill
-Original Message-
From: Jeffrey E Care [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 28, 2005 8:31 PM
To: Ant Users List
Subject: Re: IDL always re-compi
Try using < for the < character. Ant is in an XML file so you should use
the element names for XML reserved characters.
HTH Bill
-Original Message-
From: Karr, David [mailto:[EMAIL PROTECTED]
Sent: Friday, June 24, 2005 8:47 AM
To: Ant Users List
Subject: RE: Ant 1.5.4: How to do genera
You may have to play around with it to make sure the whitespaces are in the
right places, especially the end of the line. I assumed that a name was on a
single line terminated by whitespace. You are also assuming that a person
can have only two parts to their name. If the last name can have Jr.,
Because of the space in the path (/php httpd/)? There has been much
discussion on this forum about spaces in path names.
HTH Bill
-Original Message-
From: blackwater dev [mailto:[EMAIL PROTECTED]
Sent: Wednesday, June 22, 2005 8:11 AM
To: Ant Users List
Subject: exec task failing
I have
The attached macro snippet does something like what you want. It takes
filetypelist as a parameter. filetypelist is a semi-colon separated list of
items from a control file.
HTH Bill
-Original Message-
From: [EMAIL PROTECTED] [mailto:[E
A property file is a PropertyResourceBundle. You could look that up in the
Java docs. Bill
-Original Message-
From: Young Matthew [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 09, 2005 6:08 AM
To: Ant Users List
Subject: RE: Alternative to PropertyTask from Ant delivery
Wonder if there
Since properties are immutable I don't think you need to check to see if a
property is set or not. Make sure you set the default after any other
possible setting of the property. If the property gets set then setting the
default will do nothing.
HTH Bill
-Original Message-
From: Peter Re
Since properties are immutable I don't think you need to check to see if a
property is set or not. Make sure you set the default after any other
possible setting of the property. If the property gets set then setting the
default will do nothing.
HTH Bill
-Original Message-
From: Peter Re
Since properties are immutable I don't think you need to check to see if a
property is set or not. Make sure you set the default after any other
possible setting of the property. If the property gets set then setting the
default will do nothing.
HTH Bill
-Original Message-
From: Peter R
en be processed by other tasks to extract what you want from it and set
properties.
AntContrib has a task.
HTH
Bill Rich
Wilandra Consulting LLC
1325 Addiewell Place
San Jose, CA 95120-3905
phone: +1 408 268-2452
mobile: +1 408 410-9713
Santa Cruz: +1 831 464-9007
fax:+1 413 669-9716
[
can be used to remove the unwanted parts.
HTH Bill
-Original Message-
From: Andre Charbonneau [mailto:[EMAIL PROTECTED]
Sent: Friday, April 29, 2005 8:19 AM
To: user@ant.apache.org
Subject: extracting project revision number
Hi,
I would like to extract the Subversion build number of my
If you can get the list of directories into a file you could use loadfile to
load the file into a property. You can then transform the property into a
delimited list then use the antcontrib for to process the list.
You can use filterchain with loadfile to help make the delimited list. There
is a r
HTH
Bill Rich
Wilandra Consulting LLC
1325 Addiewell Place
San Jose, CA 95120-3905
phone: +1 408 268-2452
mobile: +1 408 410-9713
Santa Cruz: +1 831 464-9007
fax:+1 413 669-9716
[EMAIL PROTECTED]
http://www.wilandra.com
-Original Message-
From: Oski Wee [mailto:[
To avoid the procedural logic you could have done the following:
This is more within the philosophy/architecture of Ant.
Bill
-Original Message-
From: Rich Harris [mailto:[EMAIL PROTECTED]
Sent: Tuesday, March 22, 2005 11:10 AM
To: Ant Users List
Subject: RE: Conditions
Th
I think it worked the way it should have. I believe what you told it was to
include the C:/Program Files/IBM/SQLLIB/java and the db2java.zip,
db2jcc.jar, and db2jcc_license_cu.jar files from the "base path".
Therefore, when you give it a specific path for the 3 files it finds them.
HTH
Bill
This looks like a source code file problem not an Ant problem. Try running
native2ascii on your source code file to encode all the Japanese characters.
I don't think the source code file can have anything other than ascii
characters in it.
HTH
Bill
-Original Message-
From: Lylesh V Menez
Hello Alvaro,
Since you have two targets named tar1 Ant will execute just the first one.
The second one does not make any sense. Try this:
HTH
Bill
-Original Message-
From: Alvaro Andrés Montañez [mailto:[EMAIL PROTECTED]
Sent: Saturday, January 29, 2005 8:01 AM
To
The following path seems to work for me to find all the class files,
dependent jar, and zip files for a compile step:
I use it like this:
HTH
Bill Rich
Wilandra Consulting LLC
1325 Addiewell Place
San Jose, CA 95120-3905
phone: +1 408
Check the Ant manual for the XSLT Core Task. It will apply an XSLT file to a
single XML file or a list of files.
HTH
Bill Rich
Wilandra Consulting LLC
1325 Addiewell Place
San Jose, CA 95120-3905
phone: +1 408 268-2452
mobile: +1 408 410-9713
Santa Cruz: +1 831 464-9007
fax:+1
I think "depends" determines when the target will be fired, "if/unless"
determines whether the target will be fired or not. Therefore, my
understanding is that when the target can be fired the if/unless will be
evaluated to see if it should or not.
HTH
Bill
-Original Message-
From: Gili [
In 8_sub use @{file} to access the parameter. HTH
Bill
-Original Message-
From: Robert Soesemann [mailto:[EMAIL PROTECTED]
Sent: Friday, November 26, 2004 7:46 AM
To: Ant Users List
Subject: foreach parameter does not change
Hello,
In my ant pipeline I have the following 2 targets whi
>From the output shown it looks to me like CopyBRBuildArtifacts ran before
prepare. Try making CopyBRBuildArtifacts depend on prepare.
HTH
Bill Rich
Wilandra Consulting LLC
1325 Addiewell Place
San Jose, CA 95120-3905
phone: +1 408 268-2452
mobile: +1 408 410-9713
Santa Cruz: +1
nd the example.
Thanks. Bill
Bill Rich
Wilandra Consulting LLC
1325 Addiewell Place
San Jose, CA 95120-3905
phone: +1 408 268-2452
mobile: +1 408 410-9713
Santa Cruz: +1 831 464-9007
fax:+1 413 669-9716
[EMAIL PROTECTED]
http://www.wilandra.com
-Original Message-
Fr
argets are independent by definition.
Thanks. Bill
Bill Rich
Wilandra Consulting LLC
1325 Addiewell Place
San Jose, CA 95120-3905
phone: +1 408 268-2452
mobile: +1 408 410-9713
Santa Cruz: +1 831 464-9007
fax:+1 413 669-9716
[EMAIL PROTECTED]
http://www.wilandra.com
-Original M
directory as the
Ant build file and add the following line to the Ant build file right after
the
Thanks. Bill
Bill Rich
Wilandra Consulting LLC
1325 Addiewell Place
San Jose, CA 95120-3905
phone: +1 408 268-2452
mobile: +1 408 410-9713
Santa Cruz: +1 831 464-9007
fax:+1 413
as
to satisfy a more general requirement.
Thanks. Bill
Bill Rich
Wilandra Consulting LLC
1325 Addiewell Place
San Jose, CA 95120-3905
phone: +1 408 268-2452
mobile: +1 408 410-9713
Santa Cruz: +1 831 464-9007
fax:+1 413 669-9716
[EMAIL PROTECTED]
http://www.wilandra.com
-Ori
directory
name.
Thanks. Bill
Bill Rich
Wilandra Consulting LLC
1325 Addiewell Place
San Jose, CA 95120-3905
phone: +1 408 268-2452
mobile: +1 408 410-9713
Santa Cruz: +1 831 464-9007
fax:+1 413 669-9716
[EMAIL PROTECTED]
http://www.wilandra.com
-Original Message-
From
three tier approach --
1. Set from the command line
2. Set from a .properties file loaded by the ant file (before any other
target gets control)
3. Set default value in the ant file
Bill Rich
Wilandra Consulting LLC
1325 Addiewell Place
San Jose, CA 95120-3905
phone: +1 408 268-2452
mobile:
s anything that may do
what you want to do.
I have been using Ant for about 2 months and _all_ my questions have been answered by
reading the manual and trying it out.
Thanks. Bill
Bill Rich
Wilandra Consulting LLC
1325 Addiewell Place
San Jose, CA 95120-3905
phone: +1 408 268-2452
mobile:
65 matches
Mail list logo