henning     2004/05/27 04:47:29

  Modified:    extensions/maven-plugin/src/plugin Tag: TURBINE_2_3_BRANCH
                        plugin.jelly
  Log:
  - Move the turbine.inplace checking and the generation of turbine.target.dir into
    the runtime properties check
  
  - turn turbine.target.dir into an ant property, so that possible postgoals of
    e.g. turbine:deploy and turbine:webapp have access to this variable
  
  - remove all inplace checks from other goals and make these goals dependent on
    the runtime check (currently only clean-clean).
  
  - get the knack about checking multi-dot variables without assigning them
    to a variable without a dot first. It seems that trying to squeeze a general
    purpose programming language into XML syntax wasn't such a good idea after
    all.....
  
  Revision  Changes    Path
  No                   revision
  No                   revision
  1.1.2.10  +9 -14     
jakarta-turbine-2/extensions/maven-plugin/src/plugin/plugin.jelly
  
  Index: plugin.jelly
  ===================================================================
  RCS file: 
/home/cvs/jakarta-turbine-2/extensions/maven-plugin/src/plugin/plugin.jelly,v
  retrieving revision 1.1.2.9
  retrieving revision 1.1.2.10
  diff -u -r1.1.2.9 -r1.1.2.10
  --- plugin.jelly      23 May 2004 19:19:49 -0000      1.1.2.9
  +++ plugin.jelly      27 May 2004 11:47:28 -0000      1.1.2.10
  @@ -295,14 +295,6 @@
   
       <delete file="${maven.build.dir}/${pom.artifactId}.war" />
   
  -    <j:set var="turbine.target.dir" 
  -             value="${maven.appserver.home}/webapps/${pom.name}" />
  -
  -    <j:set var="inPlace" value="${turbine.app.inplace}"/>
  -    <j:if test="${inPlace.equalsIgnoreCase('true')}">
  -      <j:set var="turbine.target.dir" value="${turbine.app.inplace.dir}"/>
  -    </j:if>
  -
       <echo>Installing to Appserver Directory: ${turbine.target.dir}, Inplace: 
${turbine.app.inplace}</echo>
   
       <mkdir dir="${turbine.target.dir}/WEB-INF/lib" />
  @@ -372,10 +364,10 @@
     <!-- Cleanup inplace generated artifacts.                                     -->
     <!--                                                                          -->
     <!-- ======================================================================== --> 
    
  -   <goal name="turbine:clean-clean">
  -    <j:set var="inPlace" value="${turbine.app.inplace}"/>
  -    <j:if test="${inPlace.equalsIgnoreCase('true')}">
  -      <j:set var="turbine.target.dir" value="${turbine.app.inplace.dir}"/>
  +   <goal name="turbine:clean-clean"
  +    prereqs="turbine:check-runtime-environment">
  +
  +    <j:if test="${context.getVariable('turbine.app.inplace') != null and 
context.getVariable('turbine.app.inplace').equalsIgnoreCase('true')}">
         <ant:delete dir="${turbine.target.dir}/WEB-INF/lib"/>
         <ant:delete dir="${turbine.target.dir}/WEB-INF/classes"/>
       </j:if>
  @@ -592,19 +584,22 @@
         <meta:requiredPropertyMissing propname="torque.database" />
       </j:if>
   
  -    <j:set var="inPlace" value="${turbine.app.inplace}"/>
       <j:choose>
  -      <j:when test="${inPlace.equalsIgnoreCase('true')}">
  +      <j:when test="${context.getVariable('turbine.app.inplace') != null and 
context.getVariable('turbine.app.inplace').equalsIgnoreCase('true')}">
           <j:if test="${context.getVariable('turbine.app.inplace.dir') == null || 
context.getVariable('turbine.app.inplace.dir') == ''}">
             <meta:requiredPropertyMissing propname="turbine.app.inplace.dir" />
           </j:if>
  +        <ant:property name="turbine.target.dir" value="${turbine.app.inplace.dir}" 
/>
         </j:when>
         <j:otherwise>
           <j:if test="${context.getVariable('maven.appserver.home') == null || 
context.getVariable('maven.appserver.home') == ''}">
             <meta:requiredPropertyMissing propname="maven.appserver.home" />
           </j:if>
  +        <ant:property name="turbine.target.dir" 
value="${maven.appserver.home}/webapps/${pom.name}" />
         </j:otherwise>
       </j:choose>
  +
  +    <echo>Turbine Target Directory is ${turbine.target.dir}</echo>
     </goal>
   
     <goal name="turbine:check-setup-environment"
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to