dion        2003/03/27 05:16:40

  Modified:    src/plugins-build/eclipse plugin.jelly
  Log:
  Explicity use ant name space. In prep for removal of jeez etc
  
  Revision  Changes    Path
  1.9       +77 -76    maven/src/plugins-build/eclipse/plugin.jelly
  
  Index: plugin.jelly
  ===================================================================
  RCS file: /home/cvs/maven/src/plugins-build/eclipse/plugin.jelly,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- plugin.jelly      16 Mar 2003 01:01:44 -0000      1.8
  +++ plugin.jelly      27 Mar 2003 13:16:40 -0000      1.9
  @@ -1,7 +1,9 @@
   <?xml version="1.0"?>
   
  -<project xmlns:j="jelly:core"
  -     xmlns:test="test">
  +<project 
  +  xmlns:j="jelly:core"
  +  xmlns:ant="jelly:ant"
  +  xmlns:test="test">
   
     <test:eclipse/>
   
  @@ -15,81 +17,80 @@
     <goal name="eclipse:generate-project"
       description="Generate Eclipse .project and .classpath project files">
   
  -             <j:set var="outputDir" value="${maven.eclipse.output.dir}"/>
  -             <j:if test="${empty outputDir}">
  -                     <j:set var="outputDir" value="target\classes"/>
  -             </j:if>
  -             
  -    <echo>Creating ${basedir}/.project ...</echo>
  -
  -     <j:file name="${basedir}/.project" prettyPrint="true" xmlns="dummy">
  -        <projectDescription>
  -         <name>${pom.artifactId}</name>
  -         <comment></comment>
  -         <projects>
  -         </projects>
  -         <buildSpec>
  -               <buildCommand>
  -                     <name>org.eclipse.jdt.core.javabuilder</name>
  -                     <arguments>
  -                     </arguments>
  -               </buildCommand>
  -         </buildSpec>
  -         <natures>
  -               <nature>org.eclipse.jdt.core.javanature</nature>
  -         </natures>
  -      </projectDescription>
  -     </j:file>
  +    <j:set var="outputDir" value="${maven.eclipse.output.dir}"/>
  +    <j:if test="${empty outputDir}">
  +      <j:set var="outputDir" value="target\classes"/>
  +    </j:if>
  +    
  +    <ant:echo>Creating ${basedir}/.project ...</ant:echo>
  +
  +    <j:file name="${basedir}/.project" prettyPrint="true" xmlns="dummy">
  +<projectDescription>
  +  <name>${pom.artifactId}</name>
  +  <comment></comment>
  +  <projects>
  +  </projects>
  +  <buildSpec>
  +    <buildCommand>
  +      <name>org.eclipse.jdt.core.javabuilder</name>
  +      <arguments>
  +      </arguments>
  +    </buildCommand>
  +  </buildSpec>
  +  <natures>
  +    <nature>org.eclipse.jdt.core.javanature</nature>
  +  </natures>
  +</projectDescription>
  +    </j:file>
   
  -    <echo>Creating ${basedir}/.classpath ...</echo>
  +    <ant:echo>Creating ${basedir}/.classpath ...</ant:echo>
   
       <j:file name="${basedir}/.classpath" prettyPrint="true" xmlns="dummy">
         <classpath>
   
  -        <j:if test="${sourcesPresent}">
  -          <classpathentry kind="src" path="${pom.build.sourceDirectory}"/>
  +      <j:if test="${sourcesPresent}">
  +        <classpathentry kind="src" path="${pom.build.sourceDirectory}"/>
  +      </j:if>
  +
  +      <j:if test="${unitTestSourcesPresent}">
  +        <classpathentry kind="src" path="${pom.build.unitTestSourceDirectory}"/>
  +        <!-- 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="${unitTestSourcesPresent}">
  -          <classpathentry kind="src" path="${pom.build.unitTestSourceDirectory}"/>
  -           <!-- 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="${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="${depVersion != 'none'}">
  -              <classpathentry kind="var" 
path="MAVEN_REPO/junit/jars/junit-${depVersion}.jar"/>
  -          </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="${depVersion != 'none'}">
  +          <classpathentry kind="var" 
path="MAVEN_REPO/junit/jars/junit-${depVersion}.jar"/>
           </j:if>
  +      </j:if>
   
  -        <classpathentry kind="var" path="JRE_LIB" rootpath="JRE_SRCROOT" 
sourcepath="JRE_SRC"/>
  +      <classpathentry kind="var" path="JRE_LIB" rootpath="JRE_SRCROOT" 
sourcepath="JRE_SRC"/>
           <j:forEach var="lib" items="${pom.artifacts}">
             <classpathentry kind="var" path="MAVEN_REPO${lib.urlPath}"/>
           </j:forEach>
  -        <classpathentry kind="output" path="${outputDir}"/>
  -      </classpath>
  -     </j:file>       
  -     
  -     <echo>Now refresh your project in Eclipse (right click on the project and 
select "Refresh")</echo>
  -     
  -     
  +      <classpathentry kind="output" path="${outputDir}"/>
  +    </classpath>
  +  </j:file>  
  +  
  +  <ant:echo>Now refresh your project in Eclipse (right click on the project and 
select "Refresh")</ant:echo>
  +  
     </goal>
   
   
  @@ -98,14 +99,14 @@
     <!--==================================================================-->
     <goal name="eclipse:external-tools"
              description="Generate an Eclipse external tool for each goal">
  -    <mkdir dir="${maven.build.dir}/eclipse/"/>
  +    <ant:mkdir dir="${maven.build.dir}/eclipse/"/>
       <j:set var="toolFile" value="${maven.build.dir}/eclipse/externaltools.xml" />
   
  -    <echo>Creating ${toolFile}</echo>
  +    <ant:echo>Creating ${toolFile}</ant:echo>
   
       <j:set var="os" value="${os.name}" />
       <j:set var="windows" value="${os.toLowerCase().indexOf('windows') != '-1'}"/>
  -    <echo>Adapting the generated file for a ${os} box.</echo>
  +    <ant:echo>Adapting the generated file for a ${os} box.</ant:echo>
       
       <!-- Strangely, j:file inserts a space between ${maven.home} and /bin/maven ... 
--> 
       <j:set var="tool.loc" 
value="${maven.home}${file.separator}bin${file.separator}maven"/>
  @@ -151,18 +152,18 @@
       
       <j:set var="ws" value="${maven.eclipse.workspace}X" />
       <j:if test='${ws != "X"}'>
  -     <j:set var="toDir" 
value="${maven.eclipse.workspace}/.metadata/.plugins/org.eclipse.ui.externaltools/" />
  -     <copy file="${toolFile}" todir="${toDir}"/>
  +      <j:set var="toDir" 
value="${maven.eclipse.workspace}/.metadata/.plugins/org.eclipse.ui.externaltools/" />
  +      <ant:copy file="${toolFile}" todir="${toDir}"/>
       </j:if>
       
       <j:if test='${ws == "X"}'>
  -     <echo>
  +      <ant:echo>
     Please set maven.eclipse.workspace to the location of your eclipse workspace.
     Alternatively, copy 
       ${maven.build.dir}/eclipse/externaltools.xml
     to
       
[maven.eclipse.workspace]/.metadata/.plugins/org.eclipse.ui.externaltools/externaltools.xml
  -             </echo>
  +      </ant:echo>
       </j:if>
   
     </goal>
  @@ -177,10 +178,10 @@
       <j:choose>
         <j:when test='${ws != "X"}'>
           <j:set var="variableFile" 
value="${maven.eclipse.workspace}/.metadata/.plugins/org.eclipse.jdt.core/pref_store.ini"
 />
  -        <propertyfile file="${variableFile}">
  -          <entry key="org.eclipse.jdt.core.classpathVariable.MAVEN_REPO"
  +        <ant:propertyfile file="${variableFile}">
  +          <ant:entry key="org.eclipse.jdt.core.classpathVariable.MAVEN_REPO"
               default="${maven.repo.local}" />
  -        </propertyfile>
  +        </ant:propertyfile>
         </j:when>
         <j:otherwise>The property $${maven.eclipse.workspace} was not set. MAVEN_REPO 
may not be set.</j:otherwise>
       </j:choose>
  
  
  

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

Reply via email to