bwalding    2003/07/28 02:33:00

  Modified:    src/plugins-build/eclipse/src/plugin-resources/templates
                        classpath.jelly
  Log:
  Reformat
  PR:MAVEN-628
  
  Revision  Changes    Path
  1.2       +56 -62    
maven/src/plugins-build/eclipse/src/plugin-resources/templates/classpath.jelly
  
  Index: classpath.jelly
  ===================================================================
  RCS file: 
/home/cvs/maven/src/plugins-build/eclipse/src/plugin-resources/templates/classpath.jelly,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- classpath.jelly   28 Jul 2003 09:27:16 -0000      1.1
  +++ classpath.jelly   28 Jul 2003 09:33:00 -0000      1.2
  @@ -21,61 +21,59 @@
       <classpathentry kind="src" path="${srcDir}"/>
     </j:if>
     
  -    <j:if test="${unitTestSourcesPresent}">
  -      <ant:echo>Contains JUnit tests</ant:echo>
  -      <j:set var="testSrcDir" value="${pom.build.unitTestSourceDirectory}"/>
  -      <j:if test="${ testSrcDir.startsWith( basedir ) }">
  -         <!--ant:echo>Cutting off basedir from testSourceDirectory</ant:echo-->
  -         <j:set var="testSrcDir" 
value="${testSrcDir.substring(basedir.length())}"/>             
  -         <!-- cut off also slash or backslash -->
  -         <j:set var="testSrcDir" value="${testSrcDir.substring(1)}"/>             
  -      </j:if>
  -      
  -      <!-- Eclipse supports an output directory per input directory -->
  -      <j:set var="testOutputDir" value="${maven.eclipse.test.output.dir}"/>
  -      <j:if test="${empty testOutputDir}">
  -        <j:set var="testOutputDir" 
  -               
value="${pom.getPluginContext('maven-test-plugin').getVariable('maven.test.dest')}"/>  
    
  -      </j:if>
  -      <j:if test="${ testOutputDir.startsWith( basedir ) }">
  -        <!--ant:echo>Cutting off basedir from testOutputDir</ant:echo-->
  -        <j:set var="testOutputDir" 
value="${testOutputDir.substring(basedir.length())}"/>             
  -        <!-- 
  -          cut off also slash or backslash from basedir. 
  -          Is there a way to make it in one step in Jelly?
  -          -->
  -        <j:set var="testOutputDir" value="${testOutputDir.substring(1)}"/>          
   
  -      </j:if>  
  +  <j:if test="${unitTestSourcesPresent}">
  +    <ant:echo>Contains JUnit tests</ant:echo>
  +    <j:set var="testSrcDir" value="${pom.build.unitTestSourceDirectory}"/>
  +    <j:if test="${ testSrcDir.startsWith( basedir ) }">
  +       <!--ant:echo>Cutting off basedir from testSourceDirectory</ant:echo-->
  +       <j:set var="testSrcDir" value="${testSrcDir.substring(basedir.length())}"/>  
           
  +      <!-- Cut off slash or backslash from basedir -->
  +       <j:set var="testSrcDir" value="${testSrcDir.substring(1)}"/>             
  +    </j:if>
         
  -      <ant:echo>Setting compile of ${testSrcDir} to ${testOutputDir}</ant:echo>
  -      <classpathentry kind="src" path="${testSrcDir}" output="${testOutputDir}"/>
  +    <!-- Eclipse supports an output directory per input directory -->
  +    <j:set var="testOutputDir" value="${maven.eclipse.test.output.dir}"/>
  +    <j:if test="${empty testOutputDir}">
  +      <j:set var="testOutputDir" 
  +             
value="${pom.getPluginContext('maven-test-plugin').getVariable('maven.test.dest')}"/>  
    
  +    </j:if>
  +    <j:if test="${ testOutputDir.startsWith( basedir ) }">
  +      <!--ant:echo>Cutting off basedir from testOutputDir</ant:echo-->
  +      <j:set var="testOutputDir" 
value="${testOutputDir.substring(basedir.length())}"/>             
  +      <!-- Cut off slash or backslash from basedir -->
  +      <j:set var="testOutputDir" value="${testOutputDir.substring(1)}"/>            
 
  +    </j:if>  
         
  -     <!-- Here are the rules:
  -          If the project has maven.eclipse.junit property, add that ver of junit
  -          If the project has maven.eclipse.junit property and it is empty, don't 
add junit
  -          If the project has junit dep, use that.
  -          Use the test plugin version
  -       -->
  -     <j:set var="verX" value="${maven.eclipse.junit}X"/>
  +    <ant:echo>Setting compile of ${testSrcDir} to ${testOutputDir}</ant:echo>
  +    <classpathentry kind="src" path="${testSrcDir}" output="${testOutputDir}"/>
  +
   
  -     <j:set 
var="depVersion">${pom.getPluginContext('maven-test-plugin').getVariable('plugin').getDependency('junit').getVersion()}</j:set>
  +    <!-- Here are the rules:
  +         If the project has maven.eclipse.junit property, add that ver of junit
  +         If the project has maven.eclipse.junit property and it is empty, don't add 
junit
  +         If the project has junit dep, use that.
  +         Use the test plugin version
  +      -->
  +    <j:set var="verX" value="${maven.eclipse.junit}X"/>
  +
  +    <j:set 
var="depVersion">${pom.getPluginContext('maven-test-plugin').getVariable('plugin').getDependency('junit').getVersion()}</j:set>
     
  -     <j:if test="${pom.getDependency('junit') != null}">
  -       <j:set var="depVersion" value="${pom.getDependency('junit').getVersion()}"/>
  -     </j:if>
  +    <j:if test="${pom.getDependency('junit') != null}">
  +      <j:set var="depVersion" value="${pom.getDependency('junit').getVersion()}"/>
  +    </j:if>
     
  -     <j:if test="${verX != 'X'}">
  -       <j:set var="depVersion">${maven.eclipse.junit}</j:set>
  -     </j:if>
  +    <j:if test="${verX != 'X'}">
  +      <j:set var="depVersion">${maven.eclipse.junit}</j:set>
  +    </j:if>
     
  -     <j:if test="${verX == 'noneX'}">
  -       <j:set var="depVersion" value="none"/>  
  -     </j:if>
  +    <j:if test="${verX == 'noneX'}">
  +      <j:set var="depVersion" value="none"/>  
  +    </j:if>
         
  -     <j:if test="${depVersion != 'none'}">
  -       <classpathentry kind="var" 
path="MAVEN_REPO/junit/jars/junit-${depVersion}.jar"/>
  -     </j:if>
  +    <j:if test="${depVersion != 'none'}">
  +      <classpathentry kind="var" 
path="MAVEN_REPO/junit/jars/junit-${depVersion}.jar"/>
       </j:if>
  +  </j:if>
   
     <j:set var="cactusSrcDir"
         
value="${pom.getPluginContext('maven-cactus-plugin').getVariable('cactus.src.dir')}"/>
  @@ -115,24 +113,20 @@
         </j:choose>
       </j:forEach>
       
  -  <!-- add the unit test build directory so that any files generated via Maven are 
available -->  
  +    <!-- add the unit test build directory so that any files generated via Maven 
are available -->  
     
  -  <j:set var="outputDir" value="${maven.eclipse.output.dir}"/>
  +    <j:set var="outputDir" value="${maven.eclipse.output.dir}"/>
       <j:if test="${empty outputDir}">
         <j:set var="outputDir" value="${maven.build.dest}"/>      
  -     </j:if>
  -     <j:if test="${ outputDir.startsWith( basedir ) }">
  -       <!--ant:echo>Cutting off basedir from outputDir</ant:echo-->
  -       <j:set var="outputDir" value="${outputDir.substring(basedir.length())}"/>    
         
  -       <!-- 
  -         cut off also slash or backslash from basedir. 
  -        Is there a way to make it in one step in Jelly?
  -       -->
  -       <j:set var="outputDir" value="${outputDir.substring(1)}"/>             
  +    </j:if>
  +    <j:if test="${ outputDir.startsWith( basedir ) }">
  +      <!-- Cutting off basedir from outputDir -->
  +      <j:set var="outputDir" value="${outputDir.substring(basedir.length())}"/>     
        
  +      <!-- Cut off slash or backslash from basedir -->
  +      <j:set var="outputDir" value="${outputDir.substring(1)}"/>             
       </j:if>            
  -  <classpathentry kind="output" path="${outputDir}"/>
  -  <ant:echo>Setting default output directory to ${outputDir}</ant:echo>
  -      
  -</classpath>
  +    <classpathentry kind="output" path="${outputDir}"/>
  +    <ant:echo>Setting default output directory to ${outputDir}</ant:echo>
  +  </classpath>
   
   </j:whitespace>
  
  
  

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

Reply via email to