jstrachan    2002/11/06 07:02:54

  Modified:    .        build-bootstrap.xml
  Log:
  Patch to fix the bootstrap process so that it actually works on a windows machine 
which has cygwin installed.
  
  I'm not sure if the bootstrap ever worked with cygwin installed; I couldn't get it 
to work. For a start sh.exe isn't aways installed as part of cygwin so this mechanism 
does seem a little brittle.
  Also why bother using cygwin and sh just to invoke maven when maven.bat works 
perfectly well on windows?
  
  So it might be worth just descoping the cygwin mechanism on Windows as it makes the 
code veyr confusing.
  
  However for now I've just patched the code so that by default cygwin is not used 
even if it is installed.
  If you want to use cygwin on windows, then define the 'maven.use.cygwin' property in 
your build.properties in your home directory and the bootstrap should behave as before.
  
  Revision  Changes    Path
  1.169     +19 -7     jakarta-turbine-maven/build-bootstrap.xml
  
  Index: build-bootstrap.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine-maven/build-bootstrap.xml,v
  retrieving revision 1.168
  retrieving revision 1.169
  diff -u -r1.168 -r1.169
  --- build-bootstrap.xml       28 Oct 2002 13:30:25 -0000      1.168
  +++ build-bootstrap.xml       6 Nov 2002 15:02:54 -0000       1.169
  @@ -190,24 +190,31 @@
         <and>
           <os family="windows" />
           <equals arg1="${maven.script}" arg2="$${maven.script}" />
  -        <not>
  -          <isset property="cygwin.home" />
  -        </not>
         </and>
       </condition>
       <condition property="maven.script" value="maven">
  -      <equals arg1="${maven.script}" arg2="$${maven.script}" />
  +      <and>
  +        <equals arg1="${maven.script}" arg2="$${maven.script}" />
  +         <isset property="cygwin.home" />
  +        <isset property="maven.use.cygwin" />
  +      </and>
       </condition>
   
       <condition property="maven.script.processor" value="${cygwin.home}\bin\sh">
  -      <isset property="cygwin.home" />
  +      <and>
  +        <isset property="cygwin.home" />
  +        <isset property="maven.use.cygwin" />
  +      </and>
       </condition>
       <condition property="maven.script.processor" 
value="${maven.home}/bin/${maven.script}">
         <equals arg1="${maven.script.processor}" arg2="$${maven.script.processor}" />
       </condition>
   
  -    <condition property="maven.script.arg" 
value="${maven.home}/bin/${maven.script}">
  -      <isset property="cygwin.home" />
  +    <condition property="maven.script.arg" value="${maven.home}/bin/maven">
  +      <and>
  +        <isset property="cygwin.home" />
  +        <isset property="maven.use.cygwin" />
  +      </and>
       </condition>
       <condition property="maven.script.arg" value="">
         <equals arg1="${maven.script.arg}" arg2="$${maven.script.arg}" />
  @@ -219,6 +226,11 @@
   | B U I L D I N G  T H E  R E A C T O R                            |
   |                                                                  |
   +------------------------------------------------------------------+
  +    </echo>
  +
  +    <echo>
  +About to execute Maven via
  +${maven.script.processor} ${maven.script.arg}
       </echo>
   
       <exec executable="${maven.script.processor}" failonerror="true">
  
  
  

--
To unsubscribe, e-mail:   <mailto:turbine-maven-dev-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:turbine-maven-dev-help@;jakarta.apache.org>

Reply via email to