dion        2002/06/10 02:58:41

  Modified:    src/templates/build/plugins/core build-init.xml
  Log:
  Updated build file to remove init target and 'fix' project properties so that
  unnecessary calls to targets are no longer made.
  Reinstated use of ant call (using maven's version) to help with this.
  
  Revision  Changes    Path
  1.9       +33 -88    
jakarta-turbine-maven/src/templates/build/plugins/core/build-init.xml
  
  Index: build-init.xml
  ===================================================================
  RCS file: 
/home/cvs/jakarta-turbine-maven/src/templates/build/plugins/core/build-init.xml,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- build-init.xml    7 Jun 2002 02:18:01 -0000       1.8
  +++ build-init.xml    10 Jun 2002 09:58:41 -0000      1.9
  @@ -6,7 +6,7 @@
     Based on src/templates/build/build-init-target v1.37
     
     author:   dion
  -  version:  $Id: build-init.xml,v 1.8 2002/06/07 02:18:01 dion Exp $
  +  version:  $Id: build-init.xml,v 1.9 2002/06/10 09:58:41 dion Exp $
   -->
   
   <project name="maven-init" default="verify-project">
  @@ -17,61 +17,20 @@
     </target>
   
     <!-- ================================================================== -->
  -  <!-- I N I T I A L I Z E                                                -->
  -  <!-- ================================================================== -->
  -  <!-- This deals with loading our path creation task that is used to:    -->
  -  <!--                                                                    --> 
  -  <!-- a) Construct a classpath from a descriptor file which allows us    -->
  -  <!--    to store our dependencies externally and makes a build          -->
  -  <!--    file reusable.                                                  -->
  -  <!--                                                                    -->
  -  <!-- b) Construct pattern sets that can be used for various task like   -->
  -  <!--    copying a set of resources into a JAR for deployment.           -->
  -  <!-- ================================================================== -->
  -
  -  <target name="init">
  -    <!-- redefine maven-classpath, just in case someone forgot when calling -->
  -    <!-- These are the bare minimum set of JARs that maven needs to operate.
  -    We don't want to make a big JAR containing everything so we
  -    are creating a special maven-classpath reference which is
  -    used by the maven operations.
  -    -->
  -
  -    <taskdef
  -      name="create-classpath"
  -      classname="org.apache.maven.ant.CreateClasspath">
  -      <classpath>
  -        <pathelement location="${lib.repo}/maven.jar"/>
  -      </classpath>
  -    </taskdef>
  -    
  -    <create-classpath
  -      listFile="${maven.home}/plugins/core/jars.list"
  -      reference="pre-maven-classpath"
  -      baseDir="${lib.repo}"
  -    />
  -    
  -    <path id="maven-classpath">
  -      <path refid="pre-maven-classpath"/>
  -      <pathelement location="${lib.repo}/maven.jar"/>
  -    </path>
  -    
  -    <!-- define maven taskdefs, as taskdefs are not yet inheritable? -->
  -    <taskdef resource="maven-taskdefs.properties">
  -      <classpath refid="maven-classpath" />
  -    </taskdef>
  -  </target>
  -
  -  <!-- ================================================================== -->
     <!-- V E R I F Y  P R O J E C T                                         -->
     <!-- ================================================================== -->
   
  +  <target name="verify-project"
  +    unless="maven.verificationSucceeded">
  +    <maven-antcall target="do-verify-project" inheritRefs="true" />
  +  </target>
  +  
     <target
  -    name="verify-project" 
  +    name="do-verify-project" 
       description="o Update JARs required for building"
  -    depends="init,project-properties,load-default-properties,
  +    depends="project-properties,load-default-properties,
                verify-project-proxy,verify-project-noproxy"
  -    if="verificationFailed">
  +    if="maven.verificationFailed">
       
       <fail message="">
       
  @@ -83,14 +42,8 @@
     </target>
   
     <target 
  -    name="prepare.httpget">    
  -    <!-- nothing yet -->
  -  </target>
  -
  -  <target 
       name="verify-project-noproxy" 
  -    unless="proxy.host" 
  -    depends="prepare.httpget">
  +    unless="proxy.host">
       
       <verify-project
         projectDescriptor="project.xml"
  @@ -101,8 +54,7 @@
   
     <target 
       name="verify-project-proxy" 
  -    if="maven.proxy.host" 
  -    depends="prepare.httpget">
  +    if="maven.proxy.host">
   
       <verify-project
         projectDescriptor="project.xml"
  @@ -122,13 +74,7 @@
     
       <project-properties projectDescriptor="project.xml"/>
   
  -    <!-- Temporary to assist users of HEAD while the b3 users still 
  -         exist.  This will go away in b4. 
  -         
  -         FIXME: Is this still needed?
  -     -->
  -    <update-properties/>
  -
  +    <!-- FIXME: move to docs plugin -->
       <tstamp>
         <format property="maven.current.year" pattern="yyyy" />
       </tstamp>
  @@ -153,14 +99,18 @@
     
     <target
       name="update-pom-check"
  -    depends="pom-check, callUpdateDescriptor">
  +    depends="pom-check"
  +    if="maven.pomUpdateRequired">
  +    <maven-antcall targtet="callUpdateDescriptor" inheritRefs="true" />
     </target>
   
     <target
  -    name="callUpdateDescriptor"
  -    depends="update-descriptor"
  -    if="maven.pomUpdateRequired">
  +    name="callUpdateDescriptor">
       
  +    <!--  depends="update-descriptor" if="maven.pomUpdateRequired" -->
  +    
  +    <maven-antcall target="update-descriptor" inheritRefs="true" />
  +      
       <format-pom
         input="project.xml"
         output="project.xml.formatted"
  @@ -208,14 +158,20 @@
   
     <target 
       name="updateDvslExists"
  -    depends="fromVersion"
       if="maven.fromVersion">
  -    
  -    <available
  -      property="maven.updateDvslExists"
  -      value="true"
  -      
file="${maven.home}/update/v${maven.fromVersion}-v${maven.toVersion}/update-descriptor.dvsl"
  -    />
  +<!--     depends="fromVersion" -->
  +
  +    <!-- dvsl file to do the transform exists, as well as from and to versions
  +      No need to check fromVersion, as it's on the if=
  +    -->
  +    <condition property="maven.updateDvslExists" value="true">
  +      <and>
  +        <available 
file="${maven.home}/update/v${maven.fromVersion}-v${maven.toVersion}/update-descriptor.dvsl"
 />
  +        <not>
  +          <equals arg1="${maven.toVersion}" arg2="$${maven.toVersion}"/>
  +        </not>
  +      </and>
  +    </condition>
       
     </target>
   
  @@ -238,17 +194,6 @@
       
     </target>
   
  -  <target 
  -    name="fromVersion"
  -    depends="toVersion"
  -    if="maven.toVersion">
  -  </target>
  -
  -  <target 
  -    name="toVersion"
  -    if="maven.toVersion">
  -  </target>
  -  
     <!-- the update is needed if the update dvsl exists and 
          maven.pomUpdateRequired is true
      -->
  
  
  

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

Reply via email to