I jsut re-checked, and I am unable to find any type of bug.
 
Basically, when I plug the content of the include file into the main build file, it does work.
 
If I move it out into it's own separate file (and include it), I get errors.
 
This is the error:
 
C:\Work\ThonaConsulting\EntityBroker\02.1>nant
NAnt 0.85 (Build 0.85.1932.0; rc3; 16.04.2005)
Copyright (C) 2001-2005 Gerry Shaw
http://nant.sourceforge.net
 
Buildfile: file:///C:/Work/ThonaConsulting/EntityBroker/02.1/default.build
Target framework: Microsoft .NET Framework 1.1
Target(s) specified: build
 

BUILD FAILED
 
C:\Work\ThonaConsulting\EntityBroker\02.1\default.build(5,3):
Could not include build file 'N:\.dev\deployed\.buildscripts\default.build'.
    There are multiple root elements. Line 3, position 3.
 
Total time: 0 seconds.
 
This is the main build file started:
 
<?xml version="1.0"?>
 
<project default="build" >
 
 <include buildfile="N:\.dev\deployed\.buildscripts\default.build" />
 
</project>
 
And this is the start and end of the included file:
 
start:
 
 
 <property name="configuration" value="release" overwrite="false" />
 
 <property name="control.version" value="0.0" overwrite="false" />
 <property name="control.release" value="0" overwrite="false" />
 <property name="control.build" value="0" overwrite="false" />
 <property name="control.smallversion" value="0.0.0" overwrite="false" />
 
end:
 
 <!--
  This target is publishing the build. Publication is the act of making the build available externally. Publication is performed through the
  "publish.build" script of the product.
 -->
 <target name="publish" depends="deploy">
  <if test="${file::exists(nant.project.basedir+'\publish.build')}">
   <echo message="External build file found, executing" />
   <nant buildfile="${nant.project.basedir+'\publish.build'}" />
  </if>
 </target>
 
(naturally the start and end parts are not working on their own).
 
The interesting thing is that if I basically copy/paste the include file into the main build file, replacing the <include element, then suddenly all things are working.
 
Thomas
 
 


From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Ryan Davis
Sent: Mittwoch, 11. Mai 2005 16:43
To: nant-users@lists.sourceforge.net
Subject: RE: [Nant-users] <include element - help...

Looks like it might be a bug in your included build file.

 

This is exactly what I do, except I have the project's build files setting a lot of properties, and the master build file makes all its decisions based on those properties. 

 

I'm not sure how overriding targets would even work.

 

Thanks,
Ryan


From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Thomas Tomiczek
Sent: Wednesday, May 11, 2005 10:36 AM
To: nant-users@lists.sourceforge.net
Subject: [Nant-users] <include element - help...

 

Hello,

I am trying to get into orgainizing my nant files more.

I have a central nant file that all our projects should share.

Is it viable to use an empty shell file (possibly with do-nothing targets that the projects fill out) and have it include the core targets?

How is the syntax?

I just took the whole XML content to the external file, and did remove project tag.

The new build file tries to include this:

<?xml version="1.0"?>

<project default="build" >

<include buildfile="n:\.dev\deployed\.buildscripts\default.build" />

</project>

Sadly I get an exception?

C:\Work\ThonaConsulting\EntityBroker\02.1>nant
NAnt 0.85 (Build 0.85.1932.0; rc3; 16.04.2005)
Copyright (C) 2001-2005 Gerry Shaw
http://nant.sourceforge.net

[loadtasks] Failure scanning \"C:\Program Files\Thona.Nant\NAnt.NUnit1Tasks.dll\
" for extensions. One or more of the types in the assembly unable to load.
Buildfile: file:///C:/Work/ThonaConsulting/EntityBroker/02.1/default.build
Target framework: Microsoft .NET Framework 1.1
Target(s) specified: build

 

BUILD FAILED

C:\Work\ThonaConsulting\EntityBroker\02.1\default.build(5,2):
Could not include build file 'n:\.dev\deployed\.buildscripts\default.build'.
    There are multiple root elements. Line 3, position 3.

Total time: 0 seconds.

The documentation for the Nant <include> task is - well - not really helpfull.

Thoms

Reply via email to