Build commons-logging-adapters.jar from maven build.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/logging/trunk@190866 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
85
maven.xml
85
maven.xml
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user