You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@avalon.apache.org by le...@apache.org on 2003/06/05 23:02:29 UTC

cvs commit: avalon-excalibur/compatibility project.xml maven.xml

leosimons    2003/06/05 14:02:29

  Modified:    .        maven-common.xml
               compatibility project.xml maven.xml
  Log:
  more work on the maven build
  
  Revision  Changes    Path
  1.5       +161 -9    avalon-excalibur/maven-common.xml
  
  Index: maven-common.xml
  ===================================================================
  RCS file: /home/cvs/avalon-excalibur/maven-common.xml,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- maven-common.xml	2 Jun 2003 19:08:06 -0000	1.4
  +++ maven-common.xml	5 Jun 2003 21:02:29 -0000	1.5
  @@ -2,7 +2,9 @@
   
   <!-- maven buildfile customization. -->
   
  -<project default="jar:jar">
  +<project default="excalibur:warn"
  +    xmlns:j="jelly:core"
  +    xmlns:ant="jelly:ant">
   
       <!-- ==========================================================
             Warning
  @@ -17,17 +19,17 @@
   
       <goal name="excalibur:warn"
               description="Alerts the user that the maven build is in development">
  -        <echo>
  -            ----------------------------------------------------------------
  +        <ant:echo>
  +            ================================================================
                Avalon Excalibur Build System, the Maven Edition:
  -            ----------------------------------------------------------------
  +            ================================================================
                               !!! WARNING !!!
   
                excalibur is built using ant; the maven build system
                is still in development. *DO NOT USE IT* unless you're helping
                out with setting that up or testing it.
  -            ----------------------------------------------------------------
  -        </echo>
  +            ================================================================
  +        </ant:echo>
       </goal>
   
       <!-- ==========================================================
  @@ -38,17 +40,167 @@
   
            ========================================================== -->
   
  +    <!-- use forrest for doc generation if requested -->
       <postGoal name="xdoc">
  -        <attainGoal name="forrest:generate"/>
  +        <j:if test="${pom.getProperty('use-forrest')}">
  +            <attainGoal name="forrest:generate"/>
  +        </j:if>
       </postGoal>
   
  +    <goal name="excalibur:generate-readme"
  +            description="Generates a README.txt from the maven POM">
  +
  +        <ant:echo file="${maven.build.dir}/README.txt">
  +=======================================================================
  +            ${pom.name}
  +=======================================================================
  +summary:   ${pom.shortDescription}
  +publisher: ${pom.organization.name}
  +website:   ${pom.url}
  +version:   ${pom.currentVersion}
  +license:   Please see the LICENSE.txt file
  +=======================================================================
  +
  +${pom.description}
  +
  +More documentation?
  +===================
  +We do not distribute all our documentation through releases. Rather,
  +you are encouraged to visit our website at
  +    ${pom.url}
  +for more information.
  +
  +Building from source?
  +=====================
  +The excalibur buildfiles reference a ../maven-common.xml and a
  +../project-common.xml. In addition, you also need ../forrest.properties
  +for documentation generation to work properly. Download these files
  +from the following URLS:
  +
  +http://cvs.apache.org/viewcvs.cgi/*checkout*/avalon-excalibur/project-common.xml?rev=HEAD&amp;content-type=text/xml
  +http://cvs.apache.org/viewcvs.cgi/*checkout*/avalon-excalibur/maven-common.xml?rev=HEAD&amp;content-type=text/xml
  +http://cvs.apache.org/viewcvs.cgi/*checkout*/avalon-excalibur/forrest.properties?rev=HEAD&amp;content-type=text/xml
  +
  +        </ant:echo>
  +    </goal>
  +
  +    <goal name="excalibur:generate-license"
  +            description="Generates a LICENSE.txt from the maven POM">
  +
  +        <ant:tstamp><ant:format property="current.year" pattern="yyyy"/></ant:tstamp>
  +        <j:if test="${current.year==pom.inceptionYear}">
  +            <j:set var="year.string" value="${current.year}"/>
  +        </j:if>
  +        <j:if test="${empty(year.string)}">
  +            <j:set var="year.string" value="${pom.inceptionYear}-${current.year}"/>
  +        </j:if>
  +        <ant:echo file="${maven.build.dir}/LICENSE.txt">
  + ============================================================================
  +                   The Apache Software License, Version 1.1
  + ============================================================================
  +
  + Copyright (C) ${year.string} The Apache Software Foundation. All rights reserved.
  +
  + Redistribution and use in source and binary forms, with or without modifica-
  + tion, are permitted provided that the following conditions are met:
  +
  + 1. Redistributions of  source code must  retain the above copyright  notice,
  +    this list of conditions and the following disclaimer.
  +
  + 2. Redistributions in binary form must reproduce the above copyright notice,
  +    this list of conditions and the following disclaimer in the documentation
  +    and/or other materials provided with the distribution.
  +
  + 3. The end-user documentation included with the redistribution, if any, must
  +    include  the following  acknowledgment:  "This product includes  software
  +    developed  by the  Apache Software Foundation  (http://www.apache.org/)."
  +    Alternately, this  acknowledgment may  appear in the software itself,  if
  +    and wherever such third-party acknowledgments normally appear.
  +
  + 4. The names "Apache", "Avalon", "Excalibur" and "Apache Software Foundation"
  +    must not be used to endorse or promote products derived from this  software
  +    without  prior written permission. For written permission, please contact
  +    apache@apache.org.
  +
  + 5. Products  derived from this software may not  be called "Apache", nor may
  +    "Apache" appear  in their name,  without prior written permission  of the
  +    Apache Software Foundation.
  +
  + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
  + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
  + FITNESS  FOR A PARTICULAR  PURPOSE ARE  DISCLAIMED.  IN NO  EVENT SHALL  THE
  + APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE FOR  ANY DIRECT,
  + INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLU-
  + DING, BUT NOT LIMITED TO, PROCUREMENT  OF SUBSTITUTE GOODS OR SERVICES; LOSS
  + OF USE, DATA, OR  PROFITS; OR BUSINESS  INTERRUPTION)  HOWEVER CAUSED AND ON
  + ANY  THEORY OF LIABILITY,  WHETHER  IN CONTRACT,  STRICT LIABILITY,  OR TORT
  + (INCLUDING  NEGLIGENCE OR  OTHERWISE) ARISING IN  ANY WAY OUT OF THE  USE OF
  + THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  +
  + This software  consists of voluntary contributions made  by many individuals
  + on  behalf of the Apache Software  Foundation. For more  information on the
  + Apache Software Foundation, please see http://www.apache.org/.
  +        </ant:echo>
  +    </goal>
  +
       <!-- ==========================================================
             Cleanup of ant artifacts
            ========================================================== -->
   
       <postGoal name="clean">
  -        <delete dir="${build.dir}"/>
  -        <delete dir="${dist.dir}"/>
  +        <ant:delete dir="${build.dir}"/>
  +        <ant:delete dir="${dist.dir}"/>
  +    </postGoal>
  +
  +    <!-- ==========================================================
  +          Distribution customization
  +         ========================================================== -->
  +
  +    <!-- auto-gen readme and license when building distributions -->
  +    <postGoal name="dist:build-setup">
  +        <attainGoal name="excalibur:generate-readme"/>
  +        <attainGoal name="excalibur:generate-license"/>
  +    </postGoal>
  +
  +    <!-- include genned readme and license and src.zip in distro -->
  +    <postGoal name="dist:prepare-bin-filesystem">
  +        <attainGoal name="excalibur:generate-readme"/>
  +        <attainGoal name="excalibur:generate-license"/>
  +        <attainGoal name="excalibur:generate-src-zip"/>
  +        <attainGoal name="excalibur:generate-test-src-zip"/>
  +
  +        <ant:copy todir="${maven.dist.bin.assembly.dir}">
  +          <ant:fileset dir="${maven.build.dir}">
  +            <ant:include name="README.txt"/>
  +            <ant:include name="LICENSE.txt"/>
  +            <ant:include name="src.zip"/>
  +          </ant:fileset>
  +        </ant:copy>
  +    </postGoal>
  +
  +    <!-- include genned readme and license and src.zip in distro -->
  +    <postGoal name="dist:prepare-src-filesystem">
  +        <attainGoal name="excalibur:generate-readme"/>
  +        <attainGoal name="excalibur:generate-license"/>
  +
  +        <ant:copy todir="${maven.dist.src.assembly.dir}">
  +          <ant:fileset dir="${maven.build.dir}">
  +            <ant:include name="README.txt"/>
  +            <ant:include name="LICENSE.txt"/>
  +          </ant:fileset>
  +        </ant:copy>
       </postGoal>
  +
  +    <!-- build a source zip containing all project sources -->
  +    <goal name="excalibur:generate-src-zip">
  +        <ant:zip destfile="${maven.build.dir}/src.zip"
  +            basedir="${pom.build.sourceDirectory}"/>
  +    </goal>
  +
  +    <!-- build a source zip containing all project test sources -->
  +    <goal name="excalibur:generate-test-src-zip">
  +        <ant:zip destfile="${maven.build.dir}/test-src.zip"
  +            basedir="${pom.build.unitTestSourceDirectory}"/>
  +    </goal>
   
   </project>
  
  
  
  1.3       +4 -0      avalon-excalibur/compatibility/project.xml
  
  Index: project.xml
  ===================================================================
  RCS file: /home/cvs/avalon-excalibur/compatibility/project.xml,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- project.xml	30 May 2003 22:58:25 -0000	1.2
  +++ project.xml	5 Jun 2003 21:02:29 -0000	1.3
  @@ -14,6 +14,10 @@
           Deprecated materials
       </description>
   
  +    <properties>
  +        <use-forrest>true</use-forrest>
  +    </properties>
  +
       <build>
           <!-- Unit test cases; need to rule out abstract classes -->
           <unitTest>
  
  
  
  1.2       +3 -3      avalon-excalibur/compatibility/maven.xml
  
  Index: maven.xml
  ===================================================================
  RCS file: /home/cvs/avalon-excalibur/compatibility/maven.xml,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- maven.xml	30 May 2003 22:13:54 -0000	1.1
  +++ maven.xml	5 Jun 2003 21:02:29 -0000	1.2
  @@ -3,7 +3,8 @@
   <!-- maven buildfile customization. We need to do rmi-compilation. -->
   
   <project default="java:jar"
  -    xmlns:j="jelly:core">
  +    xmlns:j="jelly:core"
  +    xmlns:ant="jelly:ant">
   
       <!-- include the excalibur-wide custom project properties -->
       <property file="${basedir}/project.properties"/>
  @@ -13,8 +14,7 @@
       <property file="${basedir}/../../../../project.properties"/>
   
       <!-- include the excalibur-wide custom goal decorators from maven-common.xml -->
  -    <j:import file="../maven-common.xml"
  -        inherit="true"/>
  +    <j:import file="../maven-common.xml" inherit="true"/>
   
       <!-- ==========================================================
             Compilation
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: cvs-unsubscribe@avalon.apache.org
For additional commands, e-mail: cvs-help@avalon.apache.org