commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From skitch...@apache.org
Subject svn commit: r190866 - /jakarta/commons/proper/logging/trunk/maven.xml
Date Thu, 16 Jun 2005 04:10:24 GMT
Author: skitching
Date: Wed Jun 15 21:10:24 2005
New Revision: 190866

URL: http://svn.apache.org/viewcvs?rev=190866&view=rev
Log:
Build commons-logging-adapters.jar from maven build.

Modified:
    jakarta/commons/proper/logging/trunk/maven.xml

Modified: jakarta/commons/proper/logging/trunk/maven.xml
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/logging/trunk/maven.xml?rev=190866&r1=190865&r2=190866&view=diff
==============================================================================
--- jakarta/commons/proper/logging/trunk/maven.xml (original)
+++ jakarta/commons/proper/logging/trunk/maven.xml Wed Jun 15 21:10:24 2005
@@ -16,14 +16,19 @@
 
 -->
 
-<project default="jar:jar"
-  xmlns:j="jelly:core">
+<project default="jar:jar" xmlns:j="jelly:core">
+
+  <!-- ==================================================================
+    -   COMMONS-BUILD TWEAKS
+    -
+    -  Ensure commons-build stylesheets are copied into target directory
+    -  when executing the xdoc goal (part of the site goal), so that the
+    -  resulting website has the correct look-and-feel.
+    -
+    -  This goal assumes that commons-build is checked out as a sibling
+    -  to the directory we are doing the build in. 
+    ================================================================== -->
 
-  <!-- ================================================================== -->
-  <!-- START : C O M M O N S - B U I L D                                  -->
-  <!-- ================================================================== -->
-  <!-- Required: Look and Feel for documentation within distributions     -->
-  <!-- ================================================================== -->
   <postGoal name="xdoc:copy-resources">  
     <copy todir="${basedir}/target/docs/style/" failonerror="false">
       <fileset dir="${basedir}/../commons-build/xdocs/style">
@@ -31,8 +36,68 @@
       </fileset>
     </copy>
   </postGoal>
-  <!-- ================================================================== -->
-  <!-- END: C O M M O N S - B U I L D                                     -->
-  <!-- ================================================================== -->
+
+  <!-- ==================================================================
+    -  JAR tweaks
+    -
+    - Unit test tweaks
+    ================================================================== -->
+
+  <preGoal name="test:test">
+    <echo level="warning">
+      Unit testing cannot be done in Maven; the tests require classpaths and
+      system properties to be set differently for different unit tests which
+      Maven does not support. Please run "ant test" to execute the unit tests.
+    </echo>
+  </preGoal>
+  
+  <!-- ==================================================================
+    -  JAR tweaks
+    -
+    - Maven is designed to create only one jar file ("artifact") for each
+    - project.xml file. However we want to create a couple of additional
+    - jars that contain subsets of the main "commons-digester.jar" file.
+    - So here we arrange for those jars to be created.
+    -
+    - We unpack the main jar into a temp dir, then create a new jar file
+    - including or excluding the relevant files. This is simpler than
+    - trying to recreate an appropriate MANIFEST.MF file.
+    ================================================================== -->
+
+  <postGoal name="jar:jar">
   
+    <j:set var="logging.api.work.dir">${maven.build.dir}/logging-api-work</j:set>
+
+    <delete dir="${logging.api.work.dir}"/>
+    <mkdir dir="${logging.api.work.dir}"/>
+    <unzip 
+      src="${maven.build.dir}/${maven.final.name}.jar" 
+      dest="${logging.api.work.dir}"/>
+    
+    <delete file="${maven.build.dir}/${maven.final.name}-api.jar"/>
+    <zip destfile="${maven.build.dir}/${maven.final.name}-api.jar"
+      index="${maven.jar.index}"
+      compress="${maven.jar.compress}">
+      <fileset dir="${logging.api.work.dir}">
+        <exclude name="**/AvalonLogger.class"/>
+        <exclude name="**/Jdk13LumberjackLogger.class"/>
+        <exclude name="**/Log4jFactory.class"/>
+        <exclude name="**/Log4JLogger.class"/>
+        <exclude name="**/LogKitLogger.class"/>
+      </fileset>
+    </zip>
+      
+    <delete file="${maven.build.dir}/${maven.final.name}-adapters.jar"/>
+    <zip destfile="${maven.build.dir}/${maven.final.name}-adapters.jar"
+      index="${maven.jar.index}"
+      compress="${maven.jar.compress}">
+      <fileset dir="${logging.api.work.dir}">
+        <include name="**/AvalonLogger.class"/>
+        <include name="**/Jdk13LumberjackLogger.class"/>
+        <include name="**/Log4JFactory.class"/>
+        <include name="**/Log4JLogger.class"/>
+        <include name="**/LogKitLogger.class"/>
+      </fileset>
+    </zip>
+  </postGoal>  
 </project>



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


Mime
View raw message