ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ian Atkin <I...@Widelearning.com>
Subject RE: Newbie Ant questions
Date Tue, 26 Sep 2000 08:50:19 GMT
mathew,

don't know about probs b and c, but you could always use XML entities for
prob a.

- put a doctype tag at top of ant build script that contains an internal
subset, which contains the entity declaration
- make the SYSTEM identifier of that entity a path to your properties file
- put a reference to that entity after the <project ...> start-tag

when the xml parser does it's job it will expand any entity references it
finds with the specified replacement text, in this case an external file.

alternatively you could use the ant DTD and put the entity declaration in
there instead of the internal subset

may look like (the ... just mean usual content);-
============== build script ======================
<?xml version="1.0"encoding="utf-8"?>
<!DOCTYPE project [

<!ENTITY properties SYSTEM "URI_TO_ENTITY">

]>
<project ...>
	&properties;
	...
</project>
=========== properties file =====================
<?xml version="1.0"encoding="utf-8"?>
<property ...>
<property ...>
...
===========================================

hope it helps!

Ian Atkin
Code Monkey & Text File Editor
Wide Learning
ian.atkin@widelearning.com
020-7253-1211

> -----Original Message-----
> From:	Matthew Reynolds [SMTP:mreynolds@pdxinc.com]
> Sent:	25 September, 2000 5:08 PM
> To:	Ant-Dev List
> Subject:	Newbie Ant questions
> 
> Ok, I've finally started to sit down and write Ant scripts for the
> projects
> I work on, and I've run into some rough spots.
> 
> I've included the scripts I'm using for reference.  I'm using the latest
> build of Ant from here
>  http://jakarta.apache.org/builds/ant/release/v1.1/bin/ )
> 
> A)  FAQ
> It bombs out on me when I try to add things to create an account.  Whom
> should I talk to about this?
> 
> B)  Seperation of responsibilities
> I'm trying to keep Ant's build files seperated out into the data they
> need,
> so they're easier to generate (if I want to build them from an install
> script or hand edit them), etc.  It's easier for me if they're seperated.
> 
> So, I'm trying to seperate project properties into a seperate build file
> (properties.xml :) ), and I'd like to be able to just include another XML
> file into my project to define properties, etc, but the only thing I've
> found to do this works only on java.lang.Properties files, and I don't
> care
> for their structure.
> 
> A temporary solution seems to be to just use an Ant script with all
> properties in them (ex is in the files attached), although my tests this
> morning don't seem to work now...  Anyway, I'm trying to have a project
> properties file.  Any suggestions on how to do this?
> 
> I would like to be able to import XML files directly into my project (is
> someone working on this, or should I get off my ass and actually write
> code
> to import XML structures from other XML files?).
> 
> C)  Classpath
> The pathlike tags from the example don't seem to work when I include them
> in
> my build files.  Is this a known bug (maybe a known user error?)?
> 
> D)  Proxy username/password
> I've set the appropriate flags for using a proxy, but can't seem to figure
> out how to send my username/password for our web proxy.  Anyway, the flags
> I
> set are
> "-Dhttp.proxySet=true -Dhttp.proxyPort=8080
> -Dhttp.proxyHost=172.16.91.91".
> I pass them into the JVM, and it at least attempts to go grab the files.
> However, I know the proxy requires a password/username... where do I
> specify
> this?  Any suggestions?
> 
> Anyway, any help would be appreciated,
> Matt << File: build.xml >>  << File: jars.xml >>  << File:
properties.xml
> >> 

Mime
View raw message