PROTECTED]
[EMAIL PROTECTED] cc: (bcc: David Bailey/Lawson)
Subject: RE: 'BUILD FAILED
Presumably, you have a 'clean' target in your build file for destroying
existing class files. If not, you should add one, as it is exactly the
thing you need in this situation.
Either way, if you delete all of your class files, then ANT will rebuild
all of the classes from scratch.
--dave
Howdy.
I've spent a fair amount of time poring over both the source code
and the docs, and I'm still a bit confused about how to use the
createXXX and addXXX methods for nested elements of a custom
task. I understand that the ProjectHelper/IntrospectionHandler
classes won't allow me to define
I agree, you probably don't want to use the ${user.dir} property unless
you want the build.xml in each directory to be able to reference the
directory it lives in.
We put our 'antproject.properties' file in the root-level directory (to
use
your terminology), and then define a property called
1) Put your properties in a file called 'antproject.properties' (or
something),
and then have all of your build files reference it using
property file=antproject.properties /
in each build file. Be careful, though, because if you write it like
I just did, ANT will
A request . . . .
I believe that the only two ways of defining the association between a
custom
ant task and the class which contains the logic for the task are to include
a
taskdef statement in every build.xml which uses the task, or to modify
the
When a jar file needs to contain a manifest with particular content,
we archive a copy of that manifest under source control, and then
use the manifest tag in the jar task to tell ANT to use that
particular manifest when creating the jar file.
Hope this helps.
--dave
As for (1), it seems to me that using an entity reference include doesn't
buy that much.
Won't I still have to put a string (like 'properties') in every build
file? Won't ANT
still parse the .properties file once for every build file it encounters,
and tell me
'Override ignored for property .
I would like to suggest two extensions to ant's use of .properties files
(maybe ant can already do these things, but between reading the doc
and experimenting I didn't see how):
1) Add a '-properties filename' to specify a properties file
which in effect globally for a single ant
I'm running ant 1.4.1 on W2000, and I have a gateway class which reads a
.properties file for classpath info (%CLASSPATH% is empty). The jar files
included for the classpath are exactly those required by ant 1.4.1. A
custom ClassLoader uses this info to load and launch ant. Thanks to
Vlad's
We use a solution which gets around most of the build problems we
encounter.
The javac and jar tasks support 'failonerror' and 'whenempty'
attributes,
respectively. Our build files make use of there attributes and set them to
the
values of the properties 'FAIL' and 'EMPTYJAR', respectively.
We have multiple development environments, each running a different release
level of the ANT engine.
I am trying to write a single gateway interface which will read info from
a .properties file, determine the correct ANT release level for the build,
and fire it off. I therefore need to launch
Absolutely. In fact, we already do something similar to that for
command-line and
batch-style builds. But now I'm working on integrating ANT into an IDE
(NetBeans,
specifically), and so I want/need a 100% java solution.
Of course, NetBeans already has ANT integration, but it uses whichever
Yep, I caught the 'defineClass' error as I was implementing your other fix.
I thought I was
checking that all the bytes had been read by checking entry.getSize(), but
clearly I
was confused.
Thanks a lot!
--dave
So I have gathered that a handful of tasks now have a 'failonerror' attribute,
so one can dictate whether certain types of errors should be considered fatal
--- but the ant task does not appear to be among them.
Could I nominate this as a feature request for a future release of ant? Our
|
| To: [EMAIL PROTECTED] |
| cc: (bcc: David Bailey/Lawson) |
| Subject: Using ant cross platform|
---
Not that I really expect a lot of help on this, but . . . .
We've got a fairly large (~500,000 lines) Java code base which we want to build
and deliver on multiple platforms ("build once, run everywhere" you say? Read
on). We've run into a problem on DEC.
For the record, we're using
I have discovered an annoying inconsistency .
I am using ANT 1.2 with jdk1.3 ("modern" compiler). In order to make sure I can
access all of the proper .jar files, I have put ant.jar, jaxp.jar and parser.jar
at the end of my $CLASSPATH in my shell. I have also modified the ant.sh script
Howdy.
I'm building my way down a directory tree using build.xml files in every
subdirectory and a chain of ant / tasks in each build.xml. I believe
I have to do it this way because certain subdirectories need special handling,
and I only want to make changes (when they are necessary) in a
19 matches
Mail list logo