ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steve.Derid...@Level3.com
Subject RE: How do I include common targets from an external file?
Date Thu, 10 May 2001 19:50:55 GMT
You would put it after all of your property settings and before your
target(s). 

regards

-----Original Message-----
From: Jarzynka, Mark [mailto:mjarzynka@fnni.com]
Sent: Thursday, May 10, 2001 12:33 PM
To: 'ant-user@jakarta.apache.org'
Subject: RE: How do I include common targets from an external file?


Being new to Ant & XML in general I'm not sure where to put the
&commonTargets; part.  Do I put it on the depends clause of the target?

As in:
	<target name="set" depends="&commonTargets;">   
	   ...
	</target>

When I do I get:
	 Illegal reference to external entity "&commonTargets;" in
attribute.

Thanks for the help

> -----Original Message-----
> From:	Steve.Deridder@Level3.com [SMTP:Steve.Deridder@Level3.com]
> Sent:	Thursday, May 10, 2001 12:08 PM
> To:	ant-user@jakarta.apache.org
> Subject:	RE: How do I include common targets from an external file?
> 
> You also need:
> &commonTargets;
> 
> 
> 
> -----Original Message-----
> From: Jarzynka, Mark [mailto:mjarzynka@fnni.com]
> Sent: Thursday, May 10, 2001 10:17 AM
> To: 'ant-user@jakarta.apache.org'
> Subject: How do I include common targets from an external file?
> 
> 
> I've seen in a previous post the following way of "including" targets from
> an external file:
> 
> <?xml version="1.0" encoding="UTF-8"?>
> <!DOCTYPE project [
>     <!ENTITY commonTargets SYSTEM "../build-calls.xml">
> ]>
> 
> I put an "init" target in the build-calls.xml and put the above in a
> build.xml file.  My default target (set) depends on the "init" target but
> when I execute ant I get 
> BUILD FAILED
> 
> Target 'init' does not exist in this project.  It is used from target
> 'set'.
> 
> Is there a way to get this to work?
> 
> Thanks
> 
> 
> > -----Original Message-----
> > From:	Mark Hewitt [SMTP:MHewitt@Armature.com]
> > Sent:	Wednesday, May 09, 2001 6:57 AM
> > To:	'ant-user@jakarta.apache.org'
> > Subject:	RE: How do I include common targets from an external file?
> > 
> > That means your XML editor is trying to verify the ant
> > file against a dtd, and can't find one.  Since there is no
> > dtd for ant build files in general, you have to turn off 
> > dtd verification in your XML editor.
> > 
> > Or just use a text editor, of course!
> > 
> > #!/mjh
> > 
> > -----Original Message-----
> > From: Liu, Kenneth Albert (Kenneth)** CTR ** [mailto:kenliu@lucent.com]
> > Sent: 11 April 2001 21:50
> > To: ant-user@jakarta.apache.org
> > Subject: RE: How do I include common targets from an external file?
> > 
> > 
> > I saw the original posting and I tried this, but my XML editor complains
> > that "This file is not valid: No content model available for validation
> > (possible empty DTD/Schema)."
> > 
> > Am I doing something wrong?
> > 
> > I have this in the beginning of my build.xml:
> > <?xml version="1.0" encoding="UTF-8"?>
> > <!DOCTYPE project [
> >     <!ENTITY commonTargets SYSTEM "../build-calls.xml">
> > ]>
> > 
> > 
> > > -----Original Message-----
> > > From: Eric Rosengren [mailto:eric.rosengren@rtswireless.com]
> > > Sent: Wednesday, April 11, 2001 4:26 PM
> > > To: 'ant-user@jakarta.apache.org'
> > > Subject: RE: How do I include common targets from an external file?
> > > 
> > > 
> > > Here's an example from Mark Hewitt that works.
> > > It uses relative pathing to get to the common XMl files though.
> > > I've been searching for a way to use an environment variable 
> > > to specify
> > > the path. Some how get the parser to dereference 
> > > %COMMON_FILES%/common.xml.
> > > No luck so far.
> > > 

Mime
View raw message