Yes that is what I want to do, but include is not possible to do inside target and I cannot to do that on top of build file since the file does not exists. A.
Bob Archer napsal(a): >> Bob Archer napsal(a): >> >>>> Hi all, >>>> I have another problem. >>>> I have nant build script which uses subwcrev, which take revision, >>>> >> last >> >>>> date change and so from svn and use this for replace some strings in >>>> file. >>>> I use this way. >>>> I have source file named rev.source like this : >>>> <?xml version="1.0"?> >>>> <project xmlns="http://nant.sf.net/release/0.85/nant.xsd" >>>> default="SetProp" name="MarkGetProp" > >>>> <target name="SetProp"> >>>> <property name="revisionXSLTemplates" value="$WCREV$" /> >>>> <property name="revisionXSLTemplatesDate" >>>> value="$WCDATE=%Y%m%d%H%M$" /> >>>> <property name="revisionXSLTemplatesDateString" value="$WCDATE$" >>>> >> /> >> >>>> </target> >>>> </project> >>>> Nant build use subwcrev on that file: >>>> <exec program="${subwcrev}" commandline="${SourceCodeDir} rev.source >>>> rev.build" /> >>>> So now I have build file which looks like : >>>> <?xml version="1.0"?> >>>> <project xmlns="http://nant.sf.net/release/0.85/nant.xsd" >>>> default="SetProp" name="MarkGetProp" > >>>> <target name="SetProp"> >>>> <property name="revision" value="35172" /> >>>> <property name="revisionDate" value="200908271759" /> >>>> <property name="revDateString" value="2009/08/27 17:59:32" /> >>>> </target> >>>> </project> >>>> I cannot include that file in my build beacause on build script >>>> >> statrs >> >>>> file rev.build does not exists yet. >>>> So I try to use >>>> <nant buildfile="rev.build" /> >>>> in my build task, but there is a problem, nant will ends with this >>>> error: >>>> Property 'revisionDate' has not been set. >>>> >>>> Can you help me with that? >>>> >>>> A. >>>> >>>> >>> Are you sure you have the namespace specified in all the build files? >>> >>> BOb >>> >> Yes I have >> >> xmlns="http://nant.sf.net/release/0.85/nant.xsd" >> in all files, but the projcet name is not same, anyway if I set same >> name of project id works same. >> I saw on Inet some sort of problems with namespaces in 0.86, but I have >> it in all files and It is same. >> May be the problem is that after nant task (<nant buildfile="rev.build" >> />) is that file unloaded,as you wrote before, but I cannot know how to >> make it another way. >> > > Ok, > > So, let me walk through what I would do and you tell me what you are doing > different. I am not quite understanding what you are saying... > > In your build file say main.build you have the following code: > > > <exec program="${subwcrev}" commandline="${SourceCodeDir} rev.source > rev.build" /> > > Then you should do: > > <include buildfile="rev.build" /> > > From that point on the three properties set in the rev.build file will be > available to main.build. > > BOb > > ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ NAnt-users mailing list NAnt-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nant-users