morciuch    2004/04/19 17:06:14

  Modified:    .        maven.xml
  Log:
  1. Refactored building of the src and bin distributions to resemble the pre-Maven 
distributions.
  2. Weeded out .classes and .log files from the .war file. The .classes are replaced 
with the jetspeed .jar file.
  
  Revision  Changes    Path
  1.14      +86 -25    jakarta-jetspeed/maven.xml
  
  Index: maven.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed/maven.xml,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- maven.xml 9 Apr 2004 05:16:35 -0000       1.13
  +++ maven.xml 20 Apr 2004 00:06:14 -0000      1.14
  @@ -15,22 +15,65 @@
   -->
   <project default="jar:jar" xmlns:j="jelly:core" xmlns:m="maven" 
xmlns:castor="castor">
        <!-- ================================================================== -->
  -     <!-- B I N  D I S T R I B U T I O N   G O A L S                         -->
  +     <!-- D I S T R I B U T I O N   G O A L S                         -->
        <!-- ================================================================== -->
  -     <preGoal name="dist:prepare-bin-filesystem">
  -             <property name="maven.dist.bin.assembly.dir" 
value="${maven.dist.assembly.dir}/bin"/>
  -     </preGoal>
  -     <postGoal name="dist:prepare-bin-filesystem">
  -             <!--echo>[DEBUG] maven.src.dir = ${maven.src.dir}</echo>
  -             <echo>[DEBUG] maven.war.src = ${maven.war.src}</echo>
  -             <echo>[DEBUG] maven.build.dir = ${maven.build.dir}</echo>
  -             <echo>[DEBUG] maven.war.build.dir = ${maven.war.build.dir}</echo-->
  -             <copy todir="${maven.dist.bin.assembly.dir}/webapp">
  -                     <fileset dir="${maven.war.src}">
  -                             <include name="**"/>
  +     <goal name="dist:prepare-bin-filesystem" description="Builds the binary 
distribution file system.">
  +             <!--    
  +    This is the directory where everything is copied to so that it can
  +    be archived.    
  +    -->
  +             <delete dir="${maven.dist.bin.assembly.dir}"/>
  +             <mkdir dir="${maven.dist.bin.assembly.dir}"/>
  +             <echo>
  ++------------------------------------------------------------------------+
  +| C R E A T I N G  J E T S P E E D  B I N A R Y  D I S T R I B U T I O N |
  ++------------------------------------------------------------------------+
  +             </echo>
  +             <copy todir="${maven.dist.bin.assembly.dir}">
  +                     <fileset dir=".">
  +                             <include name="NOTES"/>
  +                             <include name="LICENSE"/>
  +                             <include name="WARNING"/>
  +                             <include name="README"/>
  +                             <include name="INSTALL"/>
                        </fileset>
                </copy>
  -     </postGoal>
  +             <attainGoal name="war"/>
  +             <copy todir="${maven.dist.bin.assembly.dir}">
  +                     <fileset dir="${maven.build.dir}">
  +                             <include name="*.war"/>
  +                     </fileset>
  +             </copy>
  +     </goal>
  +     <goal name="dist:prepare-src-filesystem" description="Builds the source 
distribution file system.">
  +             <!-- S O U R C E  D I S T R I B U T I O N -->
  +             <delete dir="${maven.dist.src.assembly.dir}"/>
  +             <mkdir dir="${maven.dist.src.assembly.dir}"/>
  +             <echo>
  ++------------------------------------------------------------------------+
  +| C R E A T I N G  J E T S P E E D  S O U R C E  D I S T R I B U T I O N |
  ++------------------------------------------------------------------------+
  +             </echo>
  +             <attainGoal name="xdoc:init"/>
  +             <attainGoal name="jar:jar"/>
  +             <attainGoal name="javadoc:generate"/>
  +             <copy todir="${maven.dist.src.assembly.dir}">
  +                     <fileset dir=".">
  +                             <!--include name="**/plugin/**"/-->
  +                             <exclude name="**/target/**"/>
  +                             <exclude name="**/plugin/target/**"/>
  +                             <exclude name="**/tutorial/target/**"/>
  +                             <exclude name="**/build/**"/>
  +                             <exclude name="**/bin/**"/>
  +                             <exclude name="**/lib/**"/>                            
 
  +                             <exclude name="**/temp/**"/>                           
 
  +                             <exclude name="**/*.log"/>
  +                             <exclude name="**/*.log.1"/>                           
 
  +                             <exclude name="**/marshalled.psml"/>                   
         
  +                             <exclude name="**/*.generation"/>                      
                                         
  +                     </fileset>
  +             </copy>
  +     </goal>
        <!-- ================================================================== -->
        <!-- I N S T A L L  I N  L O C A L  R E P O S I T O R Y   G O A L              
            -->
        <!-- ================================================================== -->
  @@ -104,20 +147,18 @@
                        package="org.apache.jetspeed.xml.api.jcm"
                        marshal="true"/>
                -->
  -             
                <java classname="org.exolab.castor.builder.SourceGenerator" fork="yes">
  -            <classpath refid="maven.dependency.classpath"/>
  -            <arg value="-i" />
  -            <arg value="${maven.src.dir}/xml/jetspeed-portal-content.xsd" />
  -            <arg value="-f" />
  -            <arg value="-dest" />
  -            <arg value="${maven.src.dir}/java" />
  -            <arg value="-package" />
  -            <arg value="org.apache.jetspeed.xml.api.jcm" />
  -        </java>
  +                     <classpath refid="maven.dependency.classpath"/>
  +                     <arg value="-i"/>
  +                     <arg value="${maven.src.dir}/xml/jetspeed-portal-content.xsd"/>
  +                     <arg value="-f"/>
  +                     <arg value="-dest"/>
  +                     <arg value="${maven.src.dir}/java"/>
  +                     <arg value="-package"/>
  +                     <arg value="org.apache.jetspeed.xml.api.jcm"/>
  +             </java>
                <attainGoal name="torque:om"/>
        </preGoal>
  -
        <!-- ================================================================== -->
        <!--C L E A N - U P   T O R Q U E   O M                     -->
        <!-- ================================================================== -->
  @@ -185,9 +226,29 @@
                        <fileset 
dir="${maven.src.dir}/java/org/apache/jetspeed/xml/api/jcm">
                                <include name="**/*.java"/>
                                <exclude name="CVS"/>
  -             <exclude name="package.html"/>
  +                             <exclude name="package.html"/>
                        </fileset>
                </delete>
                <!-- Also, need to delete selected sources from security/turbine and 
dbpsml folders -->
        </preGoal>
  +     <!-- 
  +     =================================================================== 
  +      Remove unwanted items before the .war is created
  +     =================================================================== 
  +     -->
  +     <preGoal name="war:war">
  +             <attainGoal name="jar"/>        
  +             <echo>Deleting uneeded resources from ${maven.war.webapp.dir}...</echo>
  +             <delete failonerror="false">
  +                     <fileset dir="${maven.war.webapp.dir}" includes="**/*.log"/>
  +                     <fileset dir="${maven.war.webapp.dir}" includes="**/*.log.1"/>
  +                     <fileset dir="${maven.war.webapp.dir}" 
includes="**/WEB-INF/classes/**"/>                       
  +             </delete>
  +             <echo>Copying ${maven.final.name}.jar to 
${maven.war.webapp.dir}...</echo>              
  +             <copy todir="${maven.war.webapp.dir}/WEB-INF/lib">
  +                     <fileset dir="${maven.build.dir}">
  +                             <include name="${maven.final.name}.jar"/>
  +                     </fileset>
  +             </copy>
  +     </preGoal>      
   </project>
  
  
  

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

Reply via email to