kaz         02/05/15 12:51:12

  Added:       src/templates/build/plugins/core Control.vm build.xml
                        default.properties
  Log:
  My CVS client missed the 'core' directory, this is part of the large
  commit that turns Maven's core into a plugin and provides callbacks for
  those targets.
  
  Revision  Changes    Path
  1.1                  
jakarta-turbine-maven/src/templates/build/plugins/core/Control.vm
  
  Index: Control.vm
  ===================================================================
  ## -------------------------------------------------------
  ## Control file for Maven core plug-in
  ## -------------------------------------------------------
  
  ## -------------------------------------------------------
  ## Add build files to the list
  ## -------------------------------------------------------
  $buildElements.add("plugins/$plugin/build.xml")
  $buildElements.add("plugins/$plugin/default.properties")
  
  ## -------------------------------------------------------
  ## Make the list of delegators
  ## -------------------------------------------------------
  $delegators.put("jar",             "plugins/$plugin/build.xml")
  $delegators.put("install-jar",     "plugins/$plugin/build.xml")
  $delegators.put("env",             "plugins/$plugin/build.xml")
  $delegators.put("clean",           "plugins/$plugin/build.xml")
  $delegators.put("dist",            "plugins/$plugin/build.xml")
  $delegators.put("dist-build",      "plugins/$plugin/build.xml")
  $delegators.put("deploy-dist",     "plugins/$plugin/build.xml")
  $delegators.put("gump-descriptor", "plugins/$plugin/build.xml")
  $delegators.put("compile",         "plugins/$plugin/build.xml")
  $delegators.put("check-source",    "plugins/$plugin/build.xml")
  $delegators.put("update-jars",     "plugins/$plugin/build.xml")
  $delegators.put("announce",        "plugins/$plugin/build.xml")
  $delegators.put("maven-update",    "plugins/$plugin/build.xml")
  $delegators.put("validate-pom",    "plugins/$plugin/build.xml")
  $delegators.put("verify-project",  "plugins/$plugin/build.xml")
  
  ## -------------------------------------------------------
  ## Make the list of callbacks
  ## -------------------------------------------------------
  $callbacks.put( "$plugin", [ "pre-jar", "post-jar","pre-install-jar", 
"post-install-jar", "pre-env", "post-env", "pre-clean", "post-clean", "pre-dist", 
"post-dist", "pre-dist-build", "post-dist-build", "pre-deploy-dist", 
"post-deploy-dist", "pre-gump-descriptor", "post-gump-descriptor", "pre-compile", 
"post-compile", "pre-check-source", "post-check-source", "pre-update-jars", 
"post-update-jars", "pre-announce", "post-announce", "pre-maven-update", 
"post-maven-update", "pre-validate-pom", "post-validate-pom" ] )
  
  
  
  
  1.1                  jakarta-turbine-maven/src/templates/build/plugins/core/build.xml
  
  Index: build.xml
  ===================================================================
  <?xml version="1.0"?>
  
  <project name="$project.id" default="jar" basedir="$antBasedir">
  
    #parse("build.init.target")
  
    <!-- ================================================================== -->
    <!-- L O C A L   I N I T                                                -->
    <!-- ================================================================== -->
  
    <target
      name="local-init"
      depends="init">
  
      <mkdir dir="${maven.build.dest}"/>
      <mkdir dir="${maven.docs.dest}"/>
  
      <condition property="maven.build.includes.aspects">
        <equals arg1="${maven.compile.aspects}" arg2="true"/>
      </condition>
  
    </target>
  
    <!-- ================================================================== -->
    <!-- E N V I R O N M E N T                                              -->
    <!-- ================================================================== -->
  
    <target 
      name="env"
      depends="local-init,#callback("pre-env"),do-env,#callback("post-env")"/>
  
    <target name="do-env">
  
      <property name="maven.dependency.classpath" refid="maven.dependency.classpath"/>
  
      <echo>
        java.home = ${java.home}
        user.home = ${user.home}
        lib.repo = ${lib.repo}
        
        Classpath:
        ${maven.dependency.classpath}
      </echo>      
    </target>
  
    <!-- ================================================================== -->
    <!-- U P D A T E  J A R S                                               -->
    <!-- ================================================================== -->
  
    <target
      name="update-jars"
      description="o Update JARs required for building"
      
depends="project-properties,load-default-properties,#callback("pre-update-jars"),do-update-jars,#callback("post-update-jars")">
    </target>
  
    <target
      name="do-update-jars"
      depends="update-jars-proxy,update-jars-noproxy">
    </target>
  
    <target
      name="prepare.update.httpget">
  
      <taskdef
        name="httpget"
        className="org.apache.maven.UpdateResources">
        <classpath refid="maven-classpath"/>
      </taskdef>
    </target>
  
    <target
      name="update-jars-noproxy"
      unless="proxy.host"
      depends="prepare.update.httpget">
  
      <httpget
        projectDescriptor="project.xml"
        baseUrl="${maven.repo.remote}"
        dest="${lib.repo}"
      />
    </target>
  
    <target name="update-jars-proxy" if="proxy.host" depends="prepare.update.httpget">
      <httpget
        projectDescriptor="project.xml"
        baseUrl="http://jakarta.apache.org/turbine/jars/";
        dest="${lib.repo}"
        proxyHost="${proxy.host}"
        proxyPort="${proxy.port}"
      />
    </target>
  
    <!-- ================================================================== -->
    <!-- U P D A T E  M A V E N                                             -->
    <!-- ================================================================== -->
  
    <target
      name="maven-update-check"
      description="o Check to see if Maven itself needs updating">
  
      <!-- Set default values for the build. We don't want
           the project.xml to be mapped here. Need to clean up
           the init process and break it up into stages.
      -->
      <property file="${maven.home}/plugins/core/default.properties" />
  
      <taskdef 
        name="maven-update-check"
        className="org.apache.maven.UpdateMavenCheck">
        <classpath refid="maven-classpath"/>
      </taskdef>
  
      <maven-update-check/>
      
      <echo>
        maven.mavenUpdateRequired = ${maven.mavenUpdateRequired}
      </echo>      
  
    </target>
  
    <target
      name="maven-update"
      
depends="maven-update-check,#callback("pre-maven-update"),do-maven-update,#callback("post-maven-update")"/>
  
    <target
      name="do-maven-update"
      if="maven.mavenUpdateRequired">
          
      <!-- We need to update the Maven installation so we need to
      
           1. Pull down the new distribution JAR (hopefully we can
              make this more efficient than having to replace the
              whole JAR but it will do for now).
              
           2. Move the old directory out of the way.
           
           3. Unpack the new distribution.
      -->
      
      <property name="mavenUpdateZip" value="maven-${maven.mavenVersion}.zip"/>
  
      <!-- Grab the update zip file -->
      <get 
        src="${maven.updateSite}/${mavenUpdateZip}"
        dest="${lib.repo}/${mavenUpdateZip}"
        verbose="true"
      />
  
      <!-- Back up the old maven installation -->
      <zip
        zipfile="${lib.repo}/maven-${maven.lastMavenVersion}.zip"
        basedir="${maven.home}"
      />
  
      <!-- Remove the the old maven.home directory -->
      <delete dir="${maven.home}"/>
  
      <!-- Make a the new one -->
      <mkdir dir="${maven.home}"/>
      
      <!-- Unpack the new installation -->
      <unzip
        src="${lib.repo}/${mavenUpdateZip}"
        dest="${maven.home}"
      />
  
      <!-- Run the little install/build.xml file -->
      <ant antfile="${maven.home}/install/build.xml"/>
  
      <!-- Remove the update zip file -->
      <delete file="${lib.repo}/${mavenUpdateZip}"/>
  
    </target>
  
    <target
      name="validate-pom"
      
depends="local-init,#callback("pre-validate-pom"),do-validate-pom,#callback("post-validate-pom")"/>
  
    <target
      name="do-validate-pom">
      
      <taskdef 
        name="validate-pom" classname="org.apache.maven.XmlPomValidator">
        <classpath>
          <path refid="maven-classpath"/>
        </classpath>
      </taskdef>
      
      <validate-pom
        projectDescriptor="project.xml"
        xmlSchema="${maven.home}/project.xsd"
      />
      
    </target>
      
  
    <!-- ================================================================== -->
    <!-- U S A G E                                                          -->
    <!-- ================================================================== -->
  
    <target 
      name="usage">
      
      <echo message="use -projecthelp to see the available targets"/>
    </target>
  
    <!-- ================================================================== -->
    <!-- P R E P A R E  S O U R C E S                                       -->
    <!-- ================================================================== -->
    
    <target
      name="prepare-sources"
      if="maven.prepareSourceDirectory">
      
      <echo>
        maven.prepareSourceDirectory = ${maven.prepareSourceDirectory}
      </echo>
      
      <mkdir dir="${maven.prepareSourceDirectory}"/>
      
      <!-- We need to do this here but we need to make a
           fileset reference to make this easier.
      -->
      
      <!--
      <copy todir="${build.dir}">
        <fileset dir=".">
          <patternset refid="src.set.patternset"/>
        </fileset>
      </copy>
      -->
      
      <ant 
        antfile="${maven.delegatorBuildFile}"
        target="${maven.prepareSourceTarget}"
      />
  
      <touch file="${maven.prepareSourceDirectory}/PREPARED"/>
  
    </target>
  
    <!-- ================================================================== -->
    <!-- C O M P I L E                                                      -->
    <!-- ================================================================== -->
  
    <target
      name="compile"
      
depends="local-init,#callback("pre-compile"),do-compile,#callback("post-compile")"
      description="o Compile project source code"/>
  
    <target
      name="do-compile"
      if="maven.sourcesPresent">
      <antcall target="compile-sources"/>
    </target>
  
    <target
      name="compile-sources"
      depends="env,prepare-sources,javac.compile,aspectj.compile"
      description="o Compile project source code"/>
  
    <!-- ================================================================== -->
    <!-- J A V A C  C O M P I L E                                           -->
    <!-- ================================================================== -->
  
    <target
      name="javac.compile"
      unless="maven.build.includes.aspects"
      description="o Compile project source code with javac">
  
      <javac
        destdir="${maven.build.dest}"
        excludes="**/package.html"
        debug="${maven.compile.debug}"
        deprecation="${maven.compile.deprecation}"
        optimize="${maven.compile.optimize}">
        <src>
          <path refid="maven.compile.src.set"/>
        </src>
        <classpath>
          <path refid="maven.dependency.classpath"/>
          <pathelement path="${maven.build.dest}"/>
        </classpath>
      </javac>
    </target>
  
    <!-- =================================================================== -->
    <!-- A S P E C T  C O M P I L E                                          -->
    <!-- =================================================================== -->
  
    <target
      name="aspectj.compile"
      if="maven.build.includes.aspects"
      description="o Compile project source code with AspectJ compiler">
  
      <taskdef
        name="ajc"
        classname="org.aspectj.tools.ant.taskdefs.Ajc"/>
  
      <ajc 
        destdir="${maven.build.dest}"
        excludes="**/package.html"
        debug="${maven.compile.debug}"
        deprecation="${maven.compile.deprecation}"
        optimize="${maven.compile.optimize}">
        
        <src>
          <path refid="maven.compile.src.set"/>
          <path refid="maven.src.aspect.set"/>
        </src>
        <classpath>
          <path refid="maven.dependency.classpath"/>
          <pathelement location="${maven.jar.aspectjrt}"/>
          <pathelement location="${maven.jar.aspectjtools}"/>
          <!--
             The fileset is required because the ajc ant task does not
             support the "includeAntRuntime" attribute (of the javac
             task).  Therefore, Ant's runtime libraries are excluded when
             aspectj is trying to compile.  By default, the javac task
             does include Ant's runtime libraries when compiling, so to
             mimic this behavior, we need to manually include the jars
             from the ant.home/lib directory.
           --> 
          <fileset dir="${ant.home}/lib">
            <include name="**/*.jar"/>
          </fileset>
        </classpath>
      </ajc>
  
    </target>
    
    <!-- ================================================================== -->
    <!-- C H E C K S O U R C E                                              -->
    <!-- ================================================================== -->
    <target
      name="check-source"
      depends="local-init, env, #callback("pre-check-source"), do-check-source, 
#callback("post-check-source")"
      description="o Check the source code for style violations"/>
      
    <target name="do-check-source" if="maven.sourcesPresent">
  
      <taskdef 
        name="checkstyle"
        classname="com.puppycrawl.tools.checkstyle.CheckStyleTask">
        <classpath refid="maven-classpath"/>
      </taskdef>
  
      <taskdef name="dvsl" classname="org.apache.tools.dvsl.DVSLTask">
        <classpath>
          <path refid="maven-classpath"/>
        </classpath>
      </taskdef>
  
      <checkstyle
        lcurlyType="${maven.checkstyle.lcurly.type}"
        lcurlyMethod="${maven.checkstyle.lcurly.method}"
        lcurlyOther="${maven.checkstyle.lcurly.other}"
        rcurly="${maven.checkstyle.rcurly}"
        parenPad="${maven.checkstyle.paren.pad}"
        allowTabs="${maven.checkstyle.allow.tabs}"
        allowProtected="${maven.checkstyle.allow.protected}"
        allowPackage="${maven.checkstyle.allow.package}"
        allowNoAuthor="${maven.checkstyle.allow.no.author}"
        maxLineLen="${maven.checkstyle.max.line.len}"
        tabWidth="${maven.checkstyle.tab.width}"
        ignoreLineLengthPattern="${maven.checkstyle.ignore.line.len.pattern}"
        maxMethodLen="${maven.checkstyle.max.method.len}"
        maxConstructorLen="${maven.checkstyle.max.constructor.len}"
        maxFileLen="${maven.checkstyle.max.file.len}"
        ignoreImportLen="${maven.checkstyle.ignore.import.len}"
        memberPattern="${maven.checkstyle.member.pattern}"
        publicMemberPattern="${maven.checkstyle.public.member.pattern}"
        paramPattern="${maven.checkstyle.param.pattern}"
        constPattern="${maven.checkstyle.const.pattern}"
        staticPattern="${maven.checkstyle.static.pattern}"
        typePattern="${maven.checkstyle.type.pattern}"
        methodPattern="${maven.checkstyle.method.pattern}"
        localVarPattern="${maven.checkstyle.local.var.pattern}"
        headerFile="${maven.checkstyle.header.file}"
        headerLinesRegexp="${maven.checkstyle.header.lines.regexp}"
        headerIgnoreLine="${maven.checkstyle.header.ignore.line}"
        javadocScope="${maven.checkstyle.javadoc.scope}"
        requirePackageHtml="${maven.checkstyle.require.package.html}"
        ignoreImports="${maven.checkstyle.ignore.imports}"
        illegalImports="${maven.checkstyle.illegal.imports}"
        ignoreWhitespace="${maven.checkstyle.ignore.whitespace}"
        ignoreCastWhitespace="${maven.checkstyle.ignore.cast.whitespace}"
        ignoreBraces="${maven.checkstyle.ignore.braces}"
        ignorePublicInInterface="${maven.checkstyle.ignore.public.in.interface}"
        failOnViolation="${maven.checkstyle.fail.on.violation}"
        cacheFile="${maven.checkstyle.cache.file}" >
        <fileset 
          dir="${maven.src.dir}" 
          includes="${maven.checkstyle.includes}"
          excludes="${maven.checkstyle.excludes}"/>
        <formatter type="xml" toFile="${maven.build.dir}/checkstyle-raw-report.xml"/> 
        <formatter type="plain" 
toFile="${maven.build.dir}/checkstyle-raw-report.txt"/> 
      </checkstyle>
  
      <dvsl
        basedir="."
        style="${maven.home}/stylesheets/checkstyle.dvsl"
        toolboxfile="${maven.home}/stylesheets/toolbox.props"
        in="${maven.build.dir}/checkstyle-raw-report.xml"
        out="${maven.gen.docs}/checkstyle-report.xml">
        <!-- Need to add the maven jar to load the toolbox -->
        <classpath>
          <path refid="maven-classpath"/>
        </classpath>
        <tool name="toolbox.string.srcDir" value="${maven.src.dir}"/>
      </dvsl>
  
    </target>
      
    <!-- ================================================================== -->
    <!-- J A R  R E S O U R C E S                                           -->
    <!-- ================================================================== -->
    
    <target
      name="jar-resources"
      depends="local-init,env"
      if="maven.jar.resources.present">
  
      <!-- Copy any resources that must be present in the deployed
           JAR file.
      -->
      
      <echo>
        Copy resources into destination directory for deployment
        in the JAR.
      </echo>
      
      <copy todir="${maven.build.dest}">
        <fileset dir="${maven.jarResources.basedir}">
          <patternset refid="maven.jar.resources.set"/>
        </fileset>
      </copy>
    </target>    
  
    <!-- ================================================================== -->
    <!-- J A R                                                              -->
    <!-- ================================================================== -->
  
    <target
      name="jar"
      depends="compile,#callback("pre-jar"),do-jar,#callback("post-jar")"
      description="o Generates the ${project} JAR file (default)"/>
  
    <target name="do-jar" depends="jar-resources">
  
      <ant antfile="${maven.home}/plugins/test/build.xml" target="test"/>
      
      <jar
        jarfile="${maven.build.dir}/${maven.final.name}.jar"
        basedir="${maven.build.dest}"
        excludes="${maven.jar.excludes}">
        <metainf dir="${basedir}">
          <include name="LICENSE.txt"/>
        </metainf>
        <manifest>
          <attribute name="Built-By" value="${user.name}"/>
          <!-- name should be '/' separated, not '.' -->
          <section name="${maven.package}">
            <attribute name="Specification-Title" value="${maven.id}"/>
            <attribute name="Specification-Version" value="${maven.currentVersion}"/>
            <attribute name="Specification-Vendor" value="${maven.organization}"/>
            <attribute name="Implementation-Title" value="${maven.package}"/>
            <attribute name="Implementation-Version" value="${maven.currentVersion}"/>
            <attribute name="Implementation-Vendor" value="${maven.organization}"/>
          </section>
        </manifest>
      </jar>
  
    </target>
  
    <!-- ================================================================== -->
    <!-- D I S T R I B U T I O N S                                          -->
    <!-- ================================================================== -->
    <!-- We want to be able to create distributions accurately by using     -->
    <!-- a repository identifier to extract a known set of sources from     -->
    <!-- the project's repository with which to create the distribution.    -->
    <!--                                                                    -->
    <!-- We use the ${maven.distBuildDirectory} to checkout a clean set     -->
    <!-- of sources denoted by ${tag} which must be specified on the        -->
    <!-- command line. After the sources have been checked out we proceed   -->
    <!-- to run the 'dist' target which will produce our distribution       -->
    <!-- deliverables with our fresh sources.                               -->
    <!--                                                                    -->
    <!-- You would use a command like the following to build a distribution -->
    <!-- for your project:                                                  -->
    <!--                                                                    -->   
    <!-- ant maven:dist -Dmaven.tag=MAVEN_B4                                -->      
    <!-- ================================================================== -->
  
    <target name="dist" 
depends="dist-check-tag,#callback("pre-dist"),do-dist,#callback("post-dist")"/>
  
    <target name="do-dist" if="maven.tag">
      
      <antcall target="dist-checkout-sources"/>
      
    </target>
  
    <target
      name="dist-checkout-sources"
      depends="local-init">
      
      <!-- 
      
      Make sure the dist directory is remove so that we know
      we are starting with a clean slate. We will also place a
      file in ${maven.distBuildDirectory} which indicates that
      it is ok to build a distribution within that directory.
      
      -->
      
      <delete dir="${maven.distBuildDirectory}"/>
      <mkdir dir="${maven.distBuildDirectory}/${maven.cvsModule}"/>
      <touch 
file="${maven.distBuildDirectory}/${maven.cvsModule}/${maven.distBuildIndicator}"/>
      
      <cvs
        cvsRoot="${maven.cvsRoot}"
        package="${maven.cvsModule}"
        dest="${maven.distBuildDirectory}"
        tag="${maven.tag}"
      />
  
      <!--
      
      Now that we have our freshly checked out sources we can use
      those sources to create our distribution.
      
      -->
      
      <ant 
        dir="${maven.distBuildDirectory}/${maven.cvsModule}"
        target="maven:dist-build"
        inheritAll="false"
      />
      
      <!--
      
      The distributions have been created with fresh sources so
      lets move the distributions into a visible location and
      remove everything used to create the distributions so that
      no mistakes can be made unintentionally.
      
      -->
      
      <mkdir dir="${maven.distDirectory}"/>
      
      <copy todir="${maven.distDirectory}">
        <fileset dir="${maven.distBuildDirectory}/${maven.cvsModule}/target">
          <include name="**/*.tar.gz"/>
          <include name="**/*.zip"/>
        </fileset>
      </copy>
  
      <delete dir="${maven.distBuildDirectory}"/>
  
    </target>
  
    <target
      name="dist-build"
      
depends="local-init,#callback("pre-dist-build"),do-dist-build,#callback("post-dist-build")"
      description="o Create source and binary distributions"/>
  
    <target name="do-dist-build">
  
      <property name="maven.distDir" 
value="${maven.distBuildDirectory}/${maven.final.name}"/>
      <mkdir dir="${maven.distDir}"/>
  
      <antcall target="jar"/>
      <antcall target="javadocs"/>
  
      <!-- B I N A R Y  D I S T R I B U T I O N -->
  
      <echo>
        +-------------------------------------------------------+
        | C R E A T I N G  B I N A R Y  D I S T R I B U T I O N |
        +-------------------------------------------------------+
      </echo>
  
      <!-- Copy the project descriptor -->
      <copy todir="${maven.distDir}" file="project.xml"/>
  
      <copy todir="${maven.distDir}">
        <fileset dir="${maven.build.dir}">
          <include name="build-maven.xml"/>
          <include name="README.txt"/>
          <include name="LICENSE*.txt"/>
        </fileset>
      </copy>
  
      <!-- Copy Jars -->
      <copy todir="${maven.distDir}">
        <fileset dir="${maven.build.dir}">
          <include name="**/*.jar"/>
        </fileset>
      </copy>
  
      <!-- Copy documentation -->
      <copy todir="${maven.distDir}/docs">
        <fileset dir="${maven.docs.dest}">
          <include name="**"/>
        </fileset>
      </copy>
  
      <!-- Create a tar.gz file -->
      <tar longfile="gnu" tarfile="${maven.build.dir}/${maven.final.name}.tar">
        <tarfileset dir="${maven.build.dir}">
          <include name="${maven.final.name}/**"/>
        </tarfileset>
      </tar>
  
      <gzip 
        zipfile="${maven.build.dir}/${maven.final.name}.tar.gz" 
        src="${maven.build.dir}/${maven.final.name}.tar"
      />
      
      <delete file="${maven.build.dir}/${maven.final.name}.tar"/>
  
      <!-- Create a zip file -->
      <zip zipfile="${maven.build.dir}/${maven.final.name}.zip">
        <zipfileset dir="${maven.build.dir}">
          <include name="${maven.final.name}/**"/>
        </zipfileset>
      </zip>
  
      <!-- S O U R C E  D I S T R I B U T I O N -->
  
      <echo>
        +-------------------------------------------------------+
        | C R E A T I N G  S O U R C E  D I S T R I B U T I O N |
        +-------------------------------------------------------+
      </echo>
  
      <delete>
        <fileset dir="${maven.distDir}">
          <include name="**/*.jar"/>
        </fileset>
      </delete>
  
      <copy todir="${maven.distDir}" file="build.xml"/>
  
      <!-- Copy Source -->
      <copy todir="${maven.distDir}/src">
        <fileset dir="${maven.src.dir}">
          <include name="**/*.java"/>
          <include name="**/*.xml"/>
          <include name="**/*.properties"/>
        </fileset>
      </copy>
  
      <!-- Create a tar.gz file -->
      <tar longfile="gnu" tarfile="${maven.build.dir}/${maven.final.name}-src.tar">
        <tarfileset dir="${maven.build.dir}">
          <include name="${maven.final.name}/**"/>
        </tarfileset>
      </tar>
  
      <gzip 
        zipfile="${maven.build.dir}/${maven.final.name}-src.tar.gz" 
        src="${maven.build.dir}/${maven.final.name}-src.tar"
      />
      
      <delete file="${maven.build.dir}/${maven.final.name}-src.tar"/>
  
      <!-- Create a zip file -->
      <zip zipfile="${maven.build.dir}/${maven.final.name}-src.zip">
        <zipfileset dir="${maven.build.dir}">
          <include name="${maven.final.name}/**"/>
        </zipfileset>
      </zip>
  
    </target>
  
    <target name="dist-check-tag" unless="maven.tag">
      <echo>
        +-------------------------------------------------------+
        | The dist target will not execute correctly unless a   |
        | 'maven.tag' property is provided, e.g.                |
        |            ant maven:dist -Dmaven.tag=MAVEN_B4        |
        +-------------------------------------------------------+
      </echo>
    </target>
    <!-- ================================================================== -->
    <!-- I N S T A L L  J A R                                               -->
    <!-- ================================================================== -->
  
    <target 
      name="install-jar" 
      
depends="jar,#callback("pre-install-jar"),do-install-jar,#callback("post-install-jar")"
      description="o Installs JAR file in local ${lib.repo}"/>
  
    <target name="do-install-jar">
      
      <copy todir="${lib.repo}" filtering="no">
        <fileset dir="${maven.build.dir}">
          <include name="${maven.final.name}.jar"/>
        </fileset>
      </copy>
    </target>
  
    <!-- ================================================================== -->
    <!-- G U M P  D E S C R I P T O R                                       -->
    <!-- ================================================================== -->
    <!-- Converts a Maven descriptor to Gump format so that projects        -->
    <!-- using Maven can easily participate in Gump builds. This also       -->
    <!-- means that the Gump descriptor will be accurate because if         -->
    <!-- the project builds with Maven then the descriptor generated        -->
    <!-- for Gump will be correct. Distribution of responsibility.          -->
    <!-- ================================================================== -->
  
    <target
      name="gump-descriptor"
      
depends="local-init,#callback("pre-gump-descriptor"),do-gump-descriptor,#callback("post-gump-descriptor")"
      description="o Generate Gump descriptor from Maven descriptor"/>
  
    <target name="do-gump-descriptor">
  
      <taskdef 
        name="dvsl" classname="org.apache.tools.dvsl.DVSLTask">
        <classpath>
          <path refid="maven-classpath"/>
        </classpath>
      </taskdef>
  
      <dvsl
        basedir="."
        destdir="./"
        extension=".xml"
        style="${maven.home}/dvsl/gump/convert-project.dvsl"
        in="project.xml"
        out="gump.xml"
      />
    
      <taskdef
        name="gump-build"
        classname="org.apache.maven.BaseProjectTask">
        <classpath refid="maven-classpath"/>
      </taskdef>
                                
      <gump-build
        controlTemplate="build-gump.xml"
        outputDirectory="${basedir}"
        templatePath="${maven.home}"
        outputFile="build-gump.xml"
        projectDescriptor="project.xml"
      />
    
    </target>
  
    <!-- ================================================================== -->
    <!-- C L E A N                                                          -->
    <!-- ================================================================== -->
  
    <target 
      name="clean"
      depends="local-init,#callback("pre-clean"),do-clean,#callback("post-clean")"
      description="o Cleans up the build directory"/>
  
    <target name="do-clean">
      <echo message="Cleaning up ${maven.build.dir}"/>
      <delete dir="${maven.build.dir}"/>
      <delete dir="${maven.test.reportsDirectory}"/>
    </target>
  
    <!-- ================================================================== -->
    <!-- C O N V E N I E N C E  D E L E G A T O R S                         -->
    <!-- ================================================================== -->
  
    <target
      name="metrics">
      <ant antfile="${maven.home}/plugins/metrics/build.xml"/>
    </target>
  
    <target
      name="test">
      <ant antfile="${maven.home}/plugins/test/build.xml"/>
    </target>
  
    <target
      name="docs">
      <ant antfile="${maven.home}/plugins/docs/build.xml"/>
    </target>
  
    <target
      name="javadocs">
      <ant antfile="${maven.home}/plugins/docs/build.xml" target="javadocs"/>
    </target>
  
    <target
      name="deploy-site">
      <ant antfile="${maven.home}/plugins/docs/build.xml" target="deploy-site"/>
    </target>
  
    <!-- ================================================================== -->
    <!-- A N N O U N C E M E N T S                                          -->
    <!-- ================================================================== -->
  
    <target
      name="announce"
      
depends="local-init,#callback("pre-announce"),do-announce,#callback("post-announce")"/>
  
    <target
      name="do-announce">
      
      <!-- Need to make sure all these values are set before trying
           to send an announcement so that we're not spamming
           people needlessly.
      -->
      
      <property 
file="${maven.src.dir}/announcements/${maven.announcement}.properties"/>
      
      <echo>
        from="${maven.announcementFrom}" 
        tolist="${maven.announcementRecipients}" 
        subject="${maven.announcementSubject}"
        files="${maven.announcementFile}"
        mailHost="${maven.mailHost}"
      </echo>    
      
      <mail 
        from="${maven.announcementFrom}" 
        tolist="${maven.announcementRecipients}" 
        subject="${maven.announcementSubject}"
        files="${maven.announcementFile}"
        mailHost="${maven.mailHost}"
      />
    
    </target>
  
  </project>
  
  
  
  1.1                  
jakarta-turbine-maven/src/templates/build/plugins/core/default.properties
  
  Index: default.properties
  ===================================================================
  # -------------------------------------------------------------------
  # D E F A U L T  M A V E N  P R O P E R T I E S
  # -------------------------------------------------------------------
  # These are the properties that we believe are immutable so we
  # keep them apart from the project specific properties.
  # -------------------------------------------------------------------
  
  maven.test.reportsDirectory = ${basedir}/test-reports
  
  maven.src.dir = ${basedir}/src
  maven.conf.dir = ${basedir}/conf
  maven.build.dir = ${basedir}/target
  maven.build.src = ${maven.build.dir}/src
  maven.build.dest = ${maven.build.dir}/classes
  
  maven.compile.aspects = false
  maven.jar.aspectjrt = ${ant.home}/lib/aspectjrt.jar
  maven.jar.aspectjtools = ${ant.home}/lib/aspectjtools.jar
  maven.jar.excludes = **/package.html
  
  maven.docs.src = ${basedir}/xdocs
  maven.docs.dest = ${basedir}/docs
  maven.docs.outputencoding = ISO-8859-1
  maven.gen.docs = ${maven.build.dir}/generated-xdocs
  
  maven.repo.remote = http://jakarta.apache.org/turbine/jars/
  maven.repo.local = ${lib.repo}
  maven.jarResources.basedir=${basedir}
  
  ##
  # Properties that are used for the integration unit tests
  # Defined here so they can easily be overridden by project
  # specific properties if necessary.
  ##
  maven.iutest.dir = ${maven.integrationUnitTestSourceDirectory}
  maven.out.test.dir = ${maven.build.dir}/iutest
  maven.webapp.dir = ${maven.iutest.dir}/testapp
  maven.conf.test.dir = ${maven.iutest.dir}/cactus
  maven.tomcat.home = ${tdk.home}
  maven.test.port = 8192
  maven.iutest.dest = ${maven.build.dir}/iutest-classes
  
  ##
  # properties for unit testing
  ##
  maven.junit.fork = no 
  maven.junit.dir = ${basedir}
  maven.junit.usefile = true
  maven.test.dest = ${maven.build.dir}/test-classes
  
  ##
  # These names will actually be based on the versioning document
  # that morgan checked into jakarta-site2 the other day.
  ##
  maven.final.name = ${maven.id}-${maven.currentVersion}
  maven.final.dir = ${basedir}/${maven.final.name}
  
  ##
  # Properties for the javadoc generation
  ##
  maven.javadoc.destdir = ${maven.docs.dest}/apidocs
  maven.javadoc.windowtitle = ${maven.name} ${maven.currentVersion} API
  maven.javadoc.doctitle = ${maven.name} ${maven.currentVersion} API
  maven.javadoc.author = true
  maven.javadoc.private = false
  maven.javadoc.version = true
  maven.javadoc.use = true
  
  ##
  # properties for jxr cross-referencing
  ##
  maven.jxr.destdir = ${maven.docs.dest}/xref
  
  ##
  # Checkstyle settings ... default maven settings, these can be
  # overridden in a project specific properties file.
  ##
  maven.checkstyle.includes = **/*.java
  maven.checkstyle.excludes = 
  maven.checkstyle.lcurly.type = nl
  maven.checkstyle.lcurly.method = nl
  maven.checkstyle.lcurly.other = nl
  maven.checkstyle.rcurly = alone
  maven.checkstyle.paren.pad = nospace
  maven.checkstyle.allow.tabs = false
  maven.checkstyle.allow.protected = false
  maven.checkstyle.allow.package = false
  maven.checkstyle.allow.no.author = false
  maven.checkstyle.max.line.len = 80
  maven.checkstyle.tab.width = 8
  maven.checkstyle.ignore.line.len.pattern = ^$
  maven.checkstyle.max.method.len = 150
  maven.checkstyle.max.constructor.len = 150
  maven.checkstyle.max.file.len = 2000
  maven.checkstyle.ignore.import.len = false
  maven.checkstyle.member.pattern = ^[a-z][a-zA-Z0-9]*$
  maven.checkstyle.public.member.pattern = ^f[A-Z][a-zA-Z0-9]*$
  maven.checkstyle.param.pattern = ^[a-z][a-zA-Z0-9]*$
  maven.checkstyle.const.pattern = ^[A-Z]([A-Z0-9_]*[A-Z0-9])?$
  maven.checkstyle.static.pattern = ^[a-z][a-zA-Z0-9]*$
  maven.checkstyle.type.pattern = ^[A-Z][a-zA-Z0-9]*$
  maven.checkstyle.method.pattern = ^[a-z][a-zA-Z0-9]*$
  maven.checkstyle.local.var.pattern = ^[a-z][a-zA-Z0-9]*$
  maven.checkstyle.header.file = LICENSE.txt
  maven.checkstyle.header.lines.regexp = false
  maven.checkstyle.header.ignore.line = 1,6
  maven.checkstyle.javadoc.scope = private
  maven.checkstyle.require.package.html = false
  maven.checkstyle.ignore.imports = false
  maven.checkstyle.illegal.imports = 
  maven.checkstyle.ignore.whitespace = false
  maven.checkstyle.ignore.cast.whitespace = false
  maven.checkstyle.ignore.braces = false
  maven.checkstyle.ignore.public.in.interface = false
  maven.checkstyle.fail.on.violation = false
  maven.checkstyle.cache.file = ${maven.build.dir}/checkstyle-cachefile
  
  ##
  # UI Color Prefs
  ##
  maven.ui.body.background = #fff
  maven.ui.body.foreground = #000
  maven.ui.section.background = #036
  maven.ui.section.foreground = #fff
  maven.ui.subsection.background = #888
  maven.ui.subsection.foreground = #fff
  maven.ui.table.header.background = #bbb
  maven.ui.table.header.foreground = #fff
  maven.ui.table.row.odd.background = #ddd
  maven.ui.table.row.odd.foreground = #000
  maven.ui.table.row.even.background = #efefef
  maven.ui.table.row.even.foreground = #000
  maven.ui.banner.background = #036
  maven.ui.banner.foreground = #fff
  maven.ui.banner.border.top = #369
  maven.ui.banner.border.bottom = #003
  maven.ui.source.background = #fff
  maven.ui.source.foreground = #000
  maven.ui.source.border.right = #888
  maven.ui.source.border.left = #888
  maven.ui.source.border.top = #888
  maven.ui.source.border.bottom = #888
  maven.ui.navcol.background = #eee
  maven.ui.navcol.background.ns4 = #fff
  maven.ui.navcol.foreground = #000
  maven.ui.navcol.foreground.ns4 = #555
  maven.ui.navcol.border.top = #fff
  maven.ui.navcol.border.right = #aaa
  maven.ui.navcol.border.bottom = #aaa
  maven.ui.breadcrumbs.background = #ddd
  maven.ui.breadcrumbs.foreground = #000
  maven.ui.breadcrumbs.border.top = #fff
  maven.ui.breadcrumbs.border.bottom = #aaa
  maven.ui.href.link = blue
  maven.ui.href.link.active = #f30
  maven.ui.href.link.selfref = #555
  
  ##
  # properties for changelog
  ##
  maven.changelog.range = 5
  maven.activitylog.range = 30
  maven.changelog.generator = org.apache.maven.cvslib.CvsChangeLogGenerator
  maven.changelog.parser = org.apache.maven.cvslib.CvsChangeLogParser
  
  # -------------------------------------------------------------------
  # M A V E N  U P D A T E  S I T E  A N D  S E L F  U P D A T I N G
  # -------------------------------------------------------------------
  # This needs to be changed before prime time.
  maven.updateSite = http://www.apache.org/~jvanzyl/maven/update
  
  # -------------------------------------------------------------------
  # M A V E N  D I S T R I B U T I O N S
  # -------------------------------------------------------------------
  maven.distBuildDirectory = ${basedir}/target
  maven.distBuildIndicator = DIST_BUILD_DIRECTORY
  maven.distDirectory = ${basedir}/dist
  
  
  

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

Reply via email to