1
0

Rework packaging phase. JCL now builds correctly with maven2 (though unit tests don't run).

git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/logging/trunk@426316 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Simon Kitching
2006-07-27 23:09:24 +00:00
parent 833ff6bead
commit f7a013c518

106
pom.xml
View File

@@ -3,7 +3,7 @@
<groupId>commons-logging</groupId> <groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId> <artifactId>commons-logging</artifactId>
<name>Logging</name> <name>Logging</name>
<version>1.1.1</version> <version>1.1.1-SNAPSHOT</version>
<description>Commons Logging is a thin adapter allowing configurable bridging to other, <description>Commons Logging is a thin adapter allowing configurable bridging to other,
well known logging systems.</description> well known logging systems.</description>
<url>http://jakarta.apache.org/commons/logging</url> <url>http://jakarta.apache.org/commons/logging</url>
@@ -145,43 +145,13 @@
<testSourceDirectory>src/test</testSourceDirectory> <testSourceDirectory>src/test</testSourceDirectory>
<plugins> <plugins>
<plugin>
<!-- <!--
- We want to create three jarfiles here; normal, -api and -adapters. - The custom test framework requires the unit test code to be
- The default jar:jar target is used to create the normal one, and
- two additional executions are defined to build the others.
-
- The custom test framework also requires the unit test code to be
- in a jarfile so it can control its place in the classpath. - in a jarfile so it can control its place in the classpath.
--> -->
<plugin>
<artifactId>maven-jar-plugin</artifactId> <artifactId>maven-jar-plugin</artifactId>
<executions> <executions>
<execution>
<id>apijar</id>
<phase>package</phase>
<goals>
<goal>jar</goal>
</goals>
<configuration>
<jarName>${project.artifactId}-api-${project.version}</jarName>
<excludes>
<exclude>org/apache/commons/logging/impl/Log4JLogger.class</exclude>
</excludes>
</configuration>
</execution>
<execution>
<id>adaptersjar</id>
<phase>package</phase>
<configuration>
<jarName>${project.artifactId}-adapters-${project.version}</jarName>
<excludes>
<exclude>org/apache/commons/logging/Log.class</exclude>
<exclude>org/apache/commons/logging/LogFactory.class</exclude>
<exclude>org/apache/commons/logging/impl/LogFactoryImpl.class</exclude>
<exclude>org/apache/commons/logging/impl/WeakHashtable.class</exclude>
</excludes>
</configuration>
</execution>
<execution> <execution>
<id>testjar</id> <id>testjar</id>
<phase>package</phase> <phase>package</phase>
@@ -195,6 +165,74 @@
</executions> </executions>
</plugin> </plugin>
<plugin>
<!--
- We want to create four jarfiles from this project: normal, tests, api
- and adapters. The first two are handled by the normal jar:jar target.
- Alas, the standard jar plugin doesn't have includes/excludes support
- in version 2.0, so antrun is used to create the other ones.
-->
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<id>apijar</id>
<phase>package</phase>
<configuration>
<tasks>
<property name="workdir" value="${project.build.directory}/rejar"/>
<property name="target" value="${project.artifactId}-api-${project.version}"/>
<delete dir="${workdir}" failonerror="false"/>
<mkdir dir="${workdir}"/>
<unjar
src="${project.build.directory}/${project.build.finalName}.jar"
dest="${workdir}"/>
<jar
basedir="${workdir}"
destfile="${project.build.directory}/${target}.jar">
<exclude name="org/apache/commons/logging/impl/Log4J*"/>
<exclude name="org/apache/commons/logging/impl/Avalon*"/>
<exclude name="org/apache/commons/logging/impl/Jdk13*"/>
<exclude name="org/apache/commons/logging/impl/LogKit*"/>
<exclude name="org/apache/commons/logging/impl/Servlet*"/>
</jar>
</tasks>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
<execution>
<id>adaptersjar</id>
<phase>package</phase>
<configuration>
<tasks>
<property name="workdir" value="${project.build.directory}/rejar"/>
<property name="target" value="${project.artifactId}-adapters-${project.version}"/>
<delete dir="${workdir}" failonerror="false"/>
<mkdir dir="${workdir}"/>
<unjar
src="${project.build.directory}/${project.build.finalName}.jar"
dest="${workdir}"/>
<jar
basedir="${workdir}"
destfile="${project.build.directory}/${target}.jar">
<exclude name="org/apache/commons/logging/*"/>
<exclude name="org/apache/commons/logging/impl/WeakHashtable*"/>
<exclude name="org/apache/commons/logging/impl/LogFactoryImpl*"/>
</jar>
</tasks>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin> <plugin>
<!-- <!--
- Many of JCL's tests use tricky techniques to place the generated - Many of JCL's tests use tricky techniques to place the generated
@@ -246,9 +284,11 @@
<plugin> <plugin>
<artifactId>maven-assembly-plugin</artifactId> <artifactId>maven-assembly-plugin</artifactId>
<!--
<configuration> <configuration>
<descriptor>src/maven/assembly/bin-distro.xml</descriptor> <descriptor>src/maven/assembly/bin-distro.xml</descriptor>
</configuration> </configuration>
-->
</plugin> </plugin>
<!-- <!--