dion        2002/10/28 17:16:32

  Modified:    src/plugins-build/site plugin.jelly
  Added:       src/plugins-build/site web.xml
  Log:
  Add goals for creating a war and ear from the site docs
  
  Revision  Changes    Path
  1.6       +45 -6     jakarta-turbine-maven/src/plugins-build/site/plugin.jelly
  
  Index: plugin.jelly
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine-maven/src/plugins-build/site/plugin.jelly,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- plugin.jelly      26 Oct 2002 15:52:33 -0000      1.5
  +++ plugin.jelly      29 Oct 2002 01:16:31 -0000      1.6
  @@ -33,8 +33,7 @@
     <!-- S I T E  D E P L O Y                                               -->
     <!-- ================================================================== -->
   
  -  <goal
  -    name="site:deploy">
  +  <goal name="site:deploy" description="deploy the generated site docs">
   
       <!--
   
  @@ -63,8 +62,8 @@
     <!-- Deploys the site using SSH                                         -->
     <!-- ================================================================== -->
   
  -  <goal
  -    name="site:sshdeploy">
  +  <goal name="site:sshdeploy" 
  +    description="Deploy the generated site docs using ssh">
   
       <m:user-check user="${maven.username}"/>
   
  @@ -98,8 +97,13 @@
   
     </goal>
   
  -  <goal
  -    name="site:fsdeploy">
  +  <!-- ================================================================== -->
  +  <!-- S I T E  F S D E P L O Y                                           -->
  +  <!-- Deploys the site by copying to another file system                 -->
  +  <!-- ================================================================== -->
  +
  +  <goal name="site:fsdeploy" 
  +    description="Deploy the generated site by copying to the site directory">
   
       <echo>
         siteAddress = ${pom.siteAddress}
  @@ -116,5 +120,40 @@
   
     </goal>
   
  +  <goal name="site:war" description="Create a WAR File from the generated site"
  +    prereqs="site">
  +    <mkdir dir="${maven.docs.dest}/WEB-INF" />
  +    <war destfile="${maven.build.dir}/${maven.final.name}-site.war"
  +      webxml="${plugin.dir}/web.xml">
  +      <fileset dir="${maven.docs.dest}" />
  +    </war>
  +  </goal>
  +
  +  <goal name="site:ear" prereqs="site:war"
  +    description="Create an EAR File from the generated site">
   
  +    <j:set var="docType1" value="&lt;" />
  +    <j:set var="docType2">!DOCTYPE application PUBLIC '-//Sun Microsystems, 
Inc.//DTD J2EE Application 1.2//EN' 
'http://java.sun.com/j2ee/dtds/application_1_2.dtd'</j:set>
  +    <j:set var="docType3" value="&gt;" />
  +    <mkdir dir="${maven.build.dir}/${plugin.id}" />
  +    <j:set var="warName" value="${maven.final.name}-site.war" />
  +    <j:file name="${maven.build.dir}/${plugin.id}/application.xml"
  +      prettyPrint="true">
  +      <application>
  +        <display-name>${pom.id}</display-name>
  +        <description>${pom.shortDescription}</description>
  +        <module>
  +          <web>
  +            <web-uri>${warName}</web-uri>
  +            <context-root>${maven.final.name}</context-root>
  +          </web>
  +        </module>
  +      </application>
  +    </j:file>
  +    
  +    <ear destfile="${maven.build.dir}/${maven.final.name}-site.ear"
  +      appxml="${maven.build.dir}/${plugin.id}/application.xml">
  +      <fileset dir="${maven.build.dir}" includes="${maven.final.name}-site.war" />
  +    </ear>
  +  </goal>
   </project>
  
  
  
  1.1                  jakarta-turbine-maven/src/plugins-build/site/web.xml
  
  Index: web.xml
  ===================================================================
  <?xml version="1.0" ?>
  
  <!DOCTYPE web-app
      PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"
      "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd";>
  
  <web-app>
  
    <!-- Your servlet definitions go here  -->
  
  </web-app>
  
  
  

--
To unsubscribe, e-mail:   <mailto:turbine-maven-dev-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:turbine-maven-dev-help@;jakarta.apache.org>

Reply via email to