You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by bw...@apache.org on 2003/02/02 07:48:22 UTC

cvs commit: jakarta-turbine-maven/src/plugins-build/license plugin.jelly

bwalding    2003/02/01 22:48:22

  Modified:    src/plugins-build/license plugin.jelly
  Log:
  MAVEN-241: Integrated into new build process.  Fixed some bugs with encoding on the way.
  
  Revision  Changes    Path
  1.3       +44 -10    jakarta-turbine-maven/src/plugins-build/license/plugin.jelly
  
  Index: plugin.jelly
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine-maven/src/plugins-build/license/plugin.jelly,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- plugin.jelly	25 Jan 2003 17:25:24 -0000	1.2
  +++ plugin.jelly	2 Feb 2003 06:48:22 -0000	1.3
  @@ -3,26 +3,39 @@
   <project 
     xmlns:j="jelly:core" 
     xmlns:define="jelly:define"
  -  xmlns:license="license">
  +  xmlns:doc="doc" 
  +  xmlns:license="license"
  +  xmlns:util="jelly:util">
   
  -      <define:taglib uri="license">
  -        <define:jellybean name="license" 
  -          className="org.apache.maven.license.LicenseTask"
  -          method="doExecute" />
  -      </define:taglib>
  +  <define:taglib uri="license">
  +    <define:jellybean name="license" 
  +      className="org.apache.maven.license.LicenseTask"
  +      method="doExecute" />
  +  </define:taglib>
   
     <!-- ================================================================== -->
     <!-- L I C E N S E                                                      -->
     <!-- ================================================================== -->
  -
  +  <goal name="maven-license-plugin:register">
  +    <doc:registerReport 
  +      name="Project License" 
  +      link="license"
  +      description="Displays the primary license for the project."/>
  +  </goal>
  +  
  +  <goal name="maven-license-plugin:report"
  +    description="Generate an XML file from the license.txt">
  +    <attainGoal name="license"/>
  +  </goal>
  +    
     <goal name="license"
  -    description="Generate a xml file from your license.txt"
  +    description="Generate an XML file from the license file"
       prereqs="license:transfer"/>
           
     <goal 
       name="license:transfer"
       prereqs="xdoc:init"
  -    description="Generate a xml file from your license.txt">
  +    description="Generate a xml file from your license file">
   
         <j:set var="licenseX" value='${maven.license.licenseFile}X'/>	
         <j:set var="genDocs" 
  @@ -37,11 +50,32 @@
           </j:otherwise>  
         </j:choose>
         
  +      <util:available file="${licenseFile}">
  +        <j:set var="licensePresent" value="true"/>
  +      </util:available>
  +          
  +      <j:if test="${licensePresent != 'true'}">
  +      	<echo>
  +  	  ======================================================================
  +      =                             W A R N I N G                          =
  +      ======================================================================
  +      =  Your project doesn't contain a header file specified as:          =
  +      =  ${licenseFile}
  +      =  The License Report Plugin needs it to display the license         =
  +      =  for the project.                                                  =
  +      =  If it can't find this file, it creates a page mentioning that     =
  +      =  no license file has been given to Maven.                          =
  +      ======================================================================
  +        </echo>
  +        <j:set var="licenseFile" value='${plugin.resources}/LICENSE.txt'/>
  +      </j:if>
  +      
  +
         <license:license
           description="Project License"
           input="${licenseFile}"
           output="${genDocs}/license.xml"
  -        outputEncoding="${maven.docs.outputencoding}"
  +        outputEncoding="${pom.getPluginContext('maven-xdoc-plugin').getVariable('maven.docs.outputencoding')}"
           title="License"
         />