You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@turbine.apache.org by he...@apache.org on 2004/05/23 20:17:14 UTC

cvs commit: jakarta-turbine-2/extensions/maven-plugin/xdocs flavors.xml changes.xml navigation.xml properties.xml

henning     2004/05/23 11:17:14

  Modified:    extensions/maven-plugin Tag: TURBINE_2_3_BRANCH project.xml
               extensions/maven-plugin/src/plugin Tag: TURBINE_2_3_BRANCH
                        plugin.jelly plugin.properties
               extensions/maven-plugin/xdocs Tag: TURBINE_2_3_BRANCH
                        changes.xml navigation.xml properties.xml
  Added:       extensions/maven-plugin/xdocs Tag: TURBINE_2_3_BRANCH
                        flavors.xml
  Log:
  - Add the flavor selection code to plugin.jelly
  
  - Add Docs
  
  - Bump plugin version to 1.1-dev
  
  Revision  Changes    Path
  No                   revision
  No                   revision
  1.6.2.2   +10 -2     jakarta-turbine-2/extensions/maven-plugin/project.xml
  
  Index: project.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine-2/extensions/maven-plugin/project.xml,v
  retrieving revision 1.6.2.1
  retrieving revision 1.6.2.2
  diff -u -r1.6.2.1 -r1.6.2.2
  --- project.xml	19 May 2004 13:48:03 -0000	1.6.2.1
  +++ project.xml	23 May 2004 18:17:14 -0000	1.6.2.2
  @@ -21,7 +21,7 @@
   <!--                                                                     -->
   <!--  Maven project.xml Datei                                            -->
   <!--                                                                     -->
  -<!-- $Id$           -->
  +<!-- $Id$        -->
   <!--                                                                     -->
   <!-- =================================================================== -->
   
  @@ -30,7 +30,7 @@
     <id>maven-turbine-plugin</id>
     <name>Maven Environment for Turbine Applications Plugin</name>
     <groupId>turbine</groupId>
  -  <currentVersion>1.0-dev</currentVersion>
  +  <currentVersion>1.1-dev</currentVersion>
     <organization>
       <name>Apache Software Foundation</name>
       <url>http://jakarta.apache.org/</url>
  @@ -110,4 +110,12 @@
          </resource> 
       </resources>
     </build>
  +  <reports>
  +    <report>maven-changes-plugin</report>
  +    <report>maven-changelog-plugin</report>
  +    <report>maven-developer-activity-plugin</report>
  +    <report>maven-file-activity-plugin</report>
  +    <report>maven-linkcheck-plugin</report>
  +    <report>maven-tasklist-plugin</report>
  +  </reports>
   </project>
  
  
  
  No                   revision
  No                   revision
  1.1.2.7   +132 -52   jakarta-turbine-2/extensions/maven-plugin/src/plugin/plugin.jelly
  
  Index: plugin.jelly
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine-2/extensions/maven-plugin/src/plugin/plugin.jelly,v
  retrieving revision 1.1.2.6
  retrieving revision 1.1.2.7
  diff -u -r1.1.2.6 -r1.1.2.7
  --- plugin.jelly	21 May 2004 15:05:52 -0000	1.1.2.6
  +++ plugin.jelly	23 May 2004 18:17:14 -0000	1.1.2.7
  @@ -40,6 +40,7 @@
       <attainGoal name="turbine:check-setup-environment"/>
   
       <filter token="TURBINE_APP_NAME"           value="${turbine.app.name}"/>
  +    <filter token="TURBINE_APP_FLAVOR"         value="${turbine.app.flavor}"/>
       <filter token="TURBINE_APP_PACKAGE"        value="${turbine.app.package}"/>
       <filter token="TURBINE_APP_OM_NAME"        value="${turbine.app.om.name}"/>
       <filter token="TURBINE_APP_OM_PACKAGE"     value="${turbine.app.om.package}"/>
  @@ -74,11 +75,13 @@
       </j:if>
   
       <echo>Building Turbine Skeleton for ${turbine.app.name} application
  +          Flavor:         ${turbine.app.flavor}
             Package:        ${turbine.app.package}
             Database:       ${turbine.app.database}
             Base Directory: ${baseDir} (${turbine.app.subdir})
       </echo>
   
  +    <!-- Make directories -->
       <mkdir dir="${baseDir}/${turbine.plugin.src.conf}"/>
       <mkdir dir="${baseDir}/${turbine.plugin.src.java}"/>
       <mkdir dir="${baseDir}/${turbine.plugin.src.schema}"/>
  @@ -98,67 +101,87 @@
       <mkdir dir="${baseDir}/${turbine.plugin.src.java}/${appDir}/modules/navigations" />
       <mkdir dir="${baseDir}/${turbine.plugin.src.java}/${appDir}/modules/pages" />
   
  -    <ant:copy todir="${baseDir}" filtering="true">
  -      <ant:fileset dir="${plugin.resources}/maven">
  -        <exclude name="setup.properties"/>
  -      </ant:fileset>
  -    </ant:copy>
  +    <!-- ========== Copy base files into application root ========== -->
  +
  +    <meta:copyTurbineDir todir="${baseDir}" filtering="true"
  +                                flavor="${turbine.app.flavor}"
  +                                frompath="${plugin.resources}/maven"
  +                                include="**/*"
  +                                exclude="setup.properties"/>
   
       <!-- Try to rebuild the setup.properties file. 
            If it already exists, don't clobber it!
       -->
  -    <ant:copy todir="${baseDir}" filtering="true" overwrite="false">
  -      <ant:fileset dir="${plugin.resources}/maven">
  -        <include name="setup.properties"/>
  -      </ant:fileset>
  -    </ant:copy>
  +    <u:available file="${plugin.resources}/maven/common">
  +      <ant:copy todir="${baseDir}" filtering="true" overwrite="false">
  +        <ant:fileset dir="${plugin.resources}/maven/common">
  +          <include name="setup.properties"/>
  +        </ant:fileset>
  +      </ant:copy>
  +    </u:available>
   
  +    <!-- ========== Copy schema files for Torque ========== -->
   
       <!-- filtering="false" is intentional! The file variables are 
            replaced when the files are copied inside the application.
       -->
  -    <ant:copy todir="${baseDir}/${turbine.plugin.src.schema}" filtering="false">
  -      <ant:fileset dir="${plugin.resources}/schema">
  -        <exclude name="**/application*"/>
  -      </ant:fileset>
  -    </ant:copy>
  -
  -    <ant:copy tofile="${baseDir}/${turbine.plugin.src.schema}/${turbine.app.name}-schema.xml" filtering="false"
  -      file="${plugin.resources}/schema/application-schema.xml"/>
  -
  -    <ant:copy tofile="${baseDir}/${turbine.plugin.src.schema}/${turbine.app.name}-data.dtd" filtering="false"
  -      file="${plugin.resources}/schema/application-data.dtd"/>
  -
  -    <ant:copy tofile="${baseDir}/${turbine.plugin.src.schema}/${turbine.app.name}-data.xml" filtering="true"
  -      file="${plugin.resources}/schema/application-data.xml"/>
  -
  -    <ant:copy todir="${baseDir}/${turbine.plugin.src.templates}" filtering="true">
  -      <ant:fileset dir="${plugin.resources}/templates">
  -        <exclude name="**/application*"/>
  -      </ant:fileset>
  -    </ant:copy>
  -
  -    <ant:copy tofile="${baseDir}/${turbine.plugin.src.templates}/macros/${turbine.app.name}Macros.vm" filtering="true"
  -      file="${plugin.resources}/templates/macros/applicationMacros.vm"/>
  -
  -    <ant:copy todir="${baseDir}/${turbine.plugin.src.conf}" filtering="true">
  -      <ant:fileset dir="${plugin.resources}/conf">
  -        <exclude name="**/application*"/>
  -      </ant:fileset>
  -    </ant:copy>
  -
  -    <ant:copy tofile="${baseDir}/${turbine.plugin.src.conf}/${turbine.app.name}-web.xml" filtering="true"
  -      file="${plugin.resources}/conf/application-web.xml"/>
  -
  -    <ant:copy tofile="${baseDir}/${turbine.plugin.src.conf}/${turbine.app.name}.properties" filtering="true"
  -      file="${plugin.resources}/conf/application.properties"/>
  -
  -    <ant:copy tofile="${baseDir}/${turbine.plugin.src.conf}/${turbine.app.name}-intake.xml" filtering="true"
  -      file="${plugin.resources}/conf/application-intake.xml"/>
  -
  -    <ant:copy todir="${baseDir}/src/images">
  -      <ant:fileset dir="${plugin.resources}/images"/>
  -    </ant:copy>
  +
  +    <meta:copyTurbineDir todir="${baseDir}/${turbine.plugin.src.schema}" filtering="false"
  +                                flavor="${turbine.app.flavor}"
  +                                frompath="${plugin.resources}/schema"
  +                                include="**/*"
  +                                exclude="**/application*"/>
  +
  +    <meta:copyTurbineFile tofile="${baseDir}/${turbine.plugin.src.schema}/${turbine.app.name}-schema.xml" filtering="false"
  +                                flavor="${turbine.app.flavor}"
  +                                frompath="${plugin.resources}/schema" fromfile="application-schema.xml" />
  +
  +    <meta:copyTurbineFile tofile="${baseDir}/${turbine.plugin.src.schema}/${turbine.app.name}-data.dtd" filtering="false"
  +                                flavor="${turbine.app.flavor}"
  +                                frompath="${plugin.resources}/schema" fromfile="application-data.dtd" />
  +
  +    <meta:copyTurbineFile tofile="${baseDir}/${turbine.plugin.src.schema}/${turbine.app.name}-data.xml" filtering="false"
  +                                flavor="${turbine.app.flavor}"
  +                                frompath="${plugin.resources}/schema" fromfile="application-data.xml" />
  +
  +    <!-- ========== Copy template files ========== -->
  +
  +    <meta:copyTurbineDir todir="${baseDir}/${turbine.plugin.src.templates}" filtering="true"
  +                                flavor="${turbine.app.flavor}"
  +                                frompath="${plugin.resources}/templates"
  +                                include="**/*"
  +                                exclude="**/application*"/>
  +
  +    <meta:copyTurbineFile tofile="${baseDir}/${turbine.plugin.src.templates}/macros/${turbine.app.name}Macros.vm" filtering="true"
  +                                flavor="${turbine.app.flavor}"
  +                                frompath="${plugin.resources}/templates/macros" fromfile="applicationMacros.vm" />
  +
  +    <!-- ========== Copy Turbine configuration files ========== -->
  +
  +    <meta:copyTurbineDir todir="${baseDir}/${turbine.plugin.src.conf}" filtering="true"
  +                                flavor="${turbine.app.flavor}"
  +                                frompath="${plugin.resources}/conf"
  +                                include="**/*"
  +                                exclude="**/application*"/>
  +
  +    <meta:copyTurbineFile tofile="${baseDir}/${turbine.plugin.src.conf}/${turbine.app.name}-web.xml" filtering="true"
  +                                flavor="${turbine.app.flavor}"
  +                                frompath="${plugin.resources}/conf" fromfile="application-web.xml" />
  +
  +    <meta:copyTurbineFile tofile="${baseDir}/${turbine.plugin.src.conf}/${turbine.app.name}.properties" filtering="true"
  +                                flavor="${turbine.app.flavor}"
  +                                frompath="${plugin.resources}/conf" fromfile="application.properties" />
  +
  +    <meta:copyTurbineFile tofile="${baseDir}/${turbine.plugin.src.conf}/${turbine.app.name}-intake.xml" filtering="true"
  +                                flavor="${turbine.app.flavor}"
  +                                frompath="${plugin.resources}/conf" fromfile="application-intake.xml" />
  +
  +    <!-- ========== Copy other files into application tree ========== -->
  +
  +    <meta:copyTurbineDir todir="${baseDir}/src/images" filtering="false"
  +                                flavor="${turbine.app.flavor}"
  +                                frompath="${plugin.resources}/images"
  +                                include="**/*" />
   
     </goal>
     <!-- ======================================================================== -->
  @@ -512,7 +535,44 @@
    --------------------------------------------------------------------------
           </fail>
         </define:tag>
  +
  +      <define:tag name="copyTurbineFile">
  +
  +        <u:available file="${frompath}/common/${fromfile}">
  +          <ant:copy tofile="${tofile}" filtering="${filtering}" overwrite="true"
  +            file="${frompath}/common/${fromfile}"/>
  +        </u:available>
  +    
  +        <u:available file="${frompath}/${flavor}/${fromfile}">
  +          <ant:copy tofile="${tofile}" filtering="${filtering}" overwrite="true"
  +            file="${frompath}/${flavor}/${fromfile}"/>
  +        </u:available>
  +
  +      </define:tag>
  +
  +      <define:tag name="copyTurbineDir">
  +
  +        <u:available file="${frompath}/common">
  +          <ant:copy todir="${todir}" filtering="${filtering}" overwrite="true" >
  +            <ant:fileset dir="${frompath}/common">
  +              <include name="${include}"/>
  +              <exclude name="${exclude}"/>
  +            </ant:fileset>
  +          </ant:copy>
  +        </u:available>
  +
  +        <u:available file="${frompath}/${flavor}">
  +          <ant:copy todir="${todir}" filtering="${filtering}" overwrite="true" >
  +            <ant:fileset dir="${frompath}/${flavor}">
  +              <include name="${include}"/>
  +              <exclude name="${exclude}"/>
  +            </ant:fileset>
  +          </ant:copy>
  +        </u:available>
  +
  +      </define:tag>
       </define:taglib>
  +
     </goal>
   
     <!-- ======================================================================== -->
  @@ -537,6 +597,26 @@
       <j:if test="${context.getVariable('turbine.app.name') == ''}">
         <meta:requiredPropertyMissing propname="turbine.app.name" />
       </j:if>
  +
  +    <ant:condition property="flavorExists">
  +    <or>
  +      <ant:available type="dir" file="${plugin.resources}/maven/${turbine.app.flavor}" />
  +    </or>
  +    </ant:condition>    
  +
  +    <j:if test="${context.getVariable('flavorExists') != 'true'}">
  +        <fail>
  + --------------------------------------------------------------------------
  + | Flavor not found Error                                                 |
  + --------------------------------------------------------------------------
  +
  +  The requested flavor ${turbine.app.flavor} was not found in the
  +  current version ($plugin.version) of M.E.T.A.
  +
  + --------------------------------------------------------------------------
  +        </fail>
  +    </j:if>
  +
     </goal>
     <!-- ======================================================================== -->
     <!-- turbine:check-environment                                                -->
  
  
  
  1.1.2.4   +4 -1      jakarta-turbine-2/extensions/maven-plugin/src/plugin/plugin.properties
  
  Index: plugin.properties
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine-2/extensions/maven-plugin/src/plugin/plugin.properties,v
  retrieving revision 1.1.2.3
  retrieving revision 1.1.2.4
  diff -u -r1.1.2.3 -r1.1.2.4
  --- plugin.properties	19 May 2004 15:45:04 -0000	1.1.2.3
  +++ plugin.properties	23 May 2004 18:17:14 -0000	1.1.2.4
  @@ -16,6 +16,9 @@
   # application name. Default: empty
   turbine.app.name =
   
  +# application type. Default: turbine-2.3
  +turbine.app.flavor = turbine-2.3
  +
   # application package. Default: derived from the application name
   turbine.app.package =		org.apache.turbine.app.${turbine.app.name}
   
  
  
  
  No                   revision
  No                   revision
  1.2.2.2   +13 -1     jakarta-turbine-2/extensions/maven-plugin/xdocs/changes.xml
  
  Index: changes.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine-2/extensions/maven-plugin/xdocs/changes.xml,v
  retrieving revision 1.2.2.1
  retrieving revision 1.2.2.2
  diff -u -r1.2.2.1 -r1.2.2.2
  --- changes.xml	19 May 2004 13:48:08 -0000	1.2.2.1
  +++ changes.xml	23 May 2004 18:17:14 -0000	1.2.2.2
  @@ -24,7 +24,19 @@
     </properties>
   
     <body>
  -
  +    <release version="1.1-dev" date="in CVS">
  +     <action dev="henning" type="modify">
  +       Replaced the <code>turbine:inplace</code> goal by making <code>turbine:deploy</code>
  +       configureable.
  +     </action>
  +     <action dev="henning" type="add">
  +       Add lots of xdocs for documenting the plugin.
  +     </action>
  +     <action dev="henning" type="add">
  +       Add <code>turbine.app.flavor</code> switch for setting up different types of Turbine
  +       applications.
  +     </action>
  +    </release>
       <release version="2.4-dev" date="in CVS">
         <action dev="epugh" type="add">
           Added goals turbine:inplace-war and turbine:inplace-clean to facilate inplace editing
  
  
  
  1.2.2.3   +1 -0      jakarta-turbine-2/extensions/maven-plugin/xdocs/navigation.xml
  
  Index: navigation.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine-2/extensions/maven-plugin/xdocs/navigation.xml,v
  retrieving revision 1.2.2.2
  retrieving revision 1.2.2.3
  diff -u -r1.2.2.2 -r1.2.2.3
  --- navigation.xml	21 May 2004 17:07:45 -0000	1.2.2.2
  +++ navigation.xml	23 May 2004 18:17:14 -0000	1.2.2.3
  @@ -17,6 +17,7 @@
         <item href="/tree.html" name="Directory tree reference"/>
         <item href="/config.html" name="Configuration file reference"/>
         <item href="/schema.html" name="Schema file reference"/>
  +      <item href="/flavors.html" name="Flavors of Turbine applications"/>
         <item href="/goals.html" name="Goals"/>
         <item href="/properties.html" name="Properties"/>
       </menu>
  
  
  
  1.2.2.4   +13 -1     jakarta-turbine-2/extensions/maven-plugin/xdocs/properties.xml
  
  Index: properties.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine-2/extensions/maven-plugin/xdocs/properties.xml,v
  retrieving revision 1.2.2.3
  retrieving revision 1.2.2.4
  diff -u -r1.2.2.3 -r1.2.2.4
  --- properties.xml	23 May 2004 10:50:36 -0000	1.2.2.3
  +++ properties.xml	23 May 2004 18:17:14 -0000	1.2.2.4
  @@ -34,7 +34,19 @@
   <td>turbine.app.name</td>
   <td>No</td>
   <td><b>no default value</b></td>
  -<td>Name of the new application.<font color="red">Must be set for turbine:setup, else the goal fails!</font></td>
  +<td>Name of the new application. <font color="red">Must be set for turbine:setup, else the goal fails!</font></td>
  +</tr>
  +
  +<tr>
  +<td>turbine.app.flavor</td>
  +<td>No</td>
  +<td>turbine-2.3</td>
  +<td>Defines the dependencies and the release version of Turbine that the new application should use. Currently supported versions are:<br/>
  +    <ul>
  +    <li>turbine-2.3</li>
  +    <li>turbine-2.3.1-dev</li>
  +    </ul>
  +    See the <a href="flavors.html">Flavors page</a> for more information.</td>
   </tr>
   
   <tr>
  
  
  
  No                   revision
  
  Index: properties.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine-2/extensions/maven-plugin/xdocs/properties.xml,v
  retrieving revision 1.2.2.3
  retrieving revision 1.2.2.4
  diff -u -r1.2.2.3 -r1.2.2.4
  --- properties.xml	23 May 2004 10:50:36 -0000	1.2.2.3
  +++ properties.xml	23 May 2004 18:17:14 -0000	1.2.2.4
  @@ -34,7 +34,19 @@
   <td>turbine.app.name</td>
   <td>No</td>
   <td><b>no default value</b></td>
  -<td>Name of the new application.<font color="red">Must be set for turbine:setup, else the goal fails!</font></td>
  +<td>Name of the new application. <font color="red">Must be set for turbine:setup, else the goal fails!</font></td>
  +</tr>
  +
  +<tr>
  +<td>turbine.app.flavor</td>
  +<td>No</td>
  +<td>turbine-2.3</td>
  +<td>Defines the dependencies and the release version of Turbine that the new application should use. Currently supported versions are:<br/>
  +    <ul>
  +    <li>turbine-2.3</li>
  +    <li>turbine-2.3.1-dev</li>
  +    </ul>
  +    See the <a href="flavors.html">Flavors page</a> for more information.</td>
   </tr>
   
   <tr>
  
  
  
  No                   revision
  
  Index: properties.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine-2/extensions/maven-plugin/xdocs/properties.xml,v
  retrieving revision 1.2.2.3
  retrieving revision 1.2.2.4
  diff -u -r1.2.2.3 -r1.2.2.4
  --- properties.xml	23 May 2004 10:50:36 -0000	1.2.2.3
  +++ properties.xml	23 May 2004 18:17:14 -0000	1.2.2.4
  @@ -34,7 +34,19 @@
   <td>turbine.app.name</td>
   <td>No</td>
   <td><b>no default value</b></td>
  -<td>Name of the new application.<font color="red">Must be set for turbine:setup, else the goal fails!</font></td>
  +<td>Name of the new application. <font color="red">Must be set for turbine:setup, else the goal fails!</font></td>
  +</tr>
  +
  +<tr>
  +<td>turbine.app.flavor</td>
  +<td>No</td>
  +<td>turbine-2.3</td>
  +<td>Defines the dependencies and the release version of Turbine that the new application should use. Currently supported versions are:<br/>
  +    <ul>
  +    <li>turbine-2.3</li>
  +    <li>turbine-2.3.1-dev</li>
  +    </ul>
  +    See the <a href="flavors.html">Flavors page</a> for more information.</td>
   </tr>
   
   <tr>
  
  
  
  1.1.2.1   +98 -0     jakarta-turbine-2/extensions/maven-plugin/xdocs/Attic/flavors.xml
  
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-dev-help@jakarta.apache.org