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:
106
pom.xml
106
pom.xml
@@ -3,7 +3,7 @@
|
||||
<groupId>commons-logging</groupId>
|
||||
<artifactId>commons-logging</artifactId>
|
||||
<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,
|
||||
well known logging systems.</description>
|
||||
<url>http://jakarta.apache.org/commons/logging</url>
|
||||
@@ -145,43 +145,13 @@
|
||||
<testSourceDirectory>src/test</testSourceDirectory>
|
||||
|
||||
<plugins>
|
||||
<plugin>
|
||||
<!--
|
||||
- We want to create three jarfiles here; normal, -api and -adapters.
|
||||
- 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
|
||||
- The custom test framework requires the unit test code to be
|
||||
- in a jarfile so it can control its place in the classpath.
|
||||
-->
|
||||
<plugin>
|
||||
<artifactId>maven-jar-plugin</artifactId>
|
||||
<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>
|
||||
<id>testjar</id>
|
||||
<phase>package</phase>
|
||||
@@ -195,6 +165,74 @@
|
||||
</executions>
|
||||
</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>
|
||||
<!--
|
||||
- Many of JCL's tests use tricky techniques to place the generated
|
||||
@@ -246,9 +284,11 @@
|
||||
|
||||
<plugin>
|
||||
<artifactId>maven-assembly-plugin</artifactId>
|
||||
<!--
|
||||
<configuration>
|
||||
<descriptor>src/maven/assembly/bin-distro.xml</descriptor>
|
||||
</configuration>
|
||||
-->
|
||||
</plugin>
|
||||
|
||||
<!--
|
||||
|
||||
Reference in New Issue
Block a user