You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by ni...@apache.org on 2008/03/17 21:51:21 UTC
svn commit: r638061 - in /commons/proper/collections/trunk:
build-testframework.xml build.xml maven.xml pom.xml
Author: niallp
Date: Mon Mar 17 13:51:18 2008
New Revision: 638061
URL: http://svn.apache.org/viewvc?rev=638061&view=rev
Log:
COLLECTIONS-281 - Change maven build to create Collections Test Framework jar
Added:
commons/proper/collections/trunk/build-testframework.xml (with props)
Modified:
commons/proper/collections/trunk/build.xml
commons/proper/collections/trunk/maven.xml
commons/proper/collections/trunk/pom.xml
Added: commons/proper/collections/trunk/build-testframework.xml
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/build-testframework.xml?rev=638061&view=auto
==============================================================================
--- commons/proper/collections/trunk/build-testframework.xml (added)
+++ commons/proper/collections/trunk/build-testframework.xml Mon Mar 17 13:51:18 2008
@@ -0,0 +1,70 @@
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<project name="Collections Test Framework jar" default="jar" basedir=".">
+
+
+<!--
+ $Id$
+-->
+
+
+<!-- ========== Component Declarations ==================================== -->
+
+
+ <!-- The current version number of this component -->
+ <property name="component.version" value=""/>
+
+ <!-- The base directory for compiled test classes -->
+ <property name="test.classes" value="target/test-classes"/>
+
+ <!-- The base directory for distribution targets -->
+ <property name="dist.home" value="target"/>
+
+ <!-- JDK versions -->
+ <property name="maven.compile.source" value=""/>
+ <property name="maven.compile.target" value=""/>
+
+
+<!-- ========== Executable Targets ======================================== -->
+
+ <target name="jar" description="Create Collections Test Framework jar">
+ <mkdir dir="${dist.home}"/>
+ <mkdir dir="${test.classes}/META-INF"/>
+ <copy file="LICENSE.txt" tofile="${test.classes}/META-INF/LICENSE.txt"/>
+ <copy file="NOTICE.txt" tofile="${test.classes}/META-INF/NOTICE.txt"/>
+ <jar jarfile="${dist.home}/commons-collections-testframework-${component.version}.jar">
+ <manifest>
+ <attribute name="Specification-Title" value="Commons Collections Test Framework"/>
+ <attribute name="Specification-Version" value="${component.version}"/>
+ <attribute name="Specification-Vendor" value="The Apache Software Foundation"/>
+ <attribute name="Implementation-Title" value="Commons Collections Test Framework"/>
+ <attribute name="Implementation-Version" value="${component.version}"/>
+ <attribute name="Implementation-Vendor" value="The Apache Software Foundation"/>
+ <attribute name="Implementation-Vendor-Id" value="org.apache"/>
+ <attribute name="X-Compile-Source-JDK" value="${maven.compile.source}"/>
+ <attribute name="X-Compile-Target-JDK" value="${maven.compile.target}"/>
+ </manifest>
+ <fileset dir="${test.classes}">
+ <include name="**/LICENSE.txt"/>
+ <include name="**/NOTICE.txt"/>
+ <include name="**/AbstractTest*.class"/>
+ <include name="**/BulkTest*.class"/>
+ </fileset>
+ </jar>
+ </target>
+
+</project>
Propchange: commons/proper/collections/trunk/build-testframework.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: commons/proper/collections/trunk/build-testframework.xml
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Modified: commons/proper/collections/trunk/build.xml
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/build.xml?rev=638061&r1=638060&r2=638061&view=diff
==============================================================================
--- commons/proper/collections/trunk/build.xml (original)
+++ commons/proper/collections/trunk/build.xml Mon Mar 17 13:51:18 2008
@@ -432,28 +432,15 @@
</fileset>
</copy>
- <mkdir dir="${tf.build.tf}/META-INF"/>
- <copy file="LICENSE.txt"
- tofile="${tf.build.tf}/META-INF/LICENSE.txt"/>
- <copy file="NOTICE.txt"
- tofile="${tf.build.tf}/META-INF/NOTICE.txt"/>
-
- <tstamp/>
- <mkdir dir="${tf.build.conf}"/>
- <copy todir="${tf.build.conf}" filtering="on">
- <filterset>
- <filter token="name" value="${tf.name}"/>
- <filter token="title" value="${tf.title}"/>
- <filter token="package" value="${tf.package}"/>
- <filter token="version" value="${tf.version}"/>
- </filterset>
- <fileset dir="${source.conf}" includes="*.MF"/>
- </copy>
-
<!-- NOTE: A jar built using JDK1.4 is incompatible with JDK1.2 -->
- <jar jarfile="${tf.build.jar.name}"
- basedir="${tf.build.tf}"
- manifest="${tf.build.conf}/MANIFEST.MF"/>
+ <ant antfile="build-testframework.xml" target="jar">
+ <property name="test.classes" value="${tf.build.tf}"/>
+ <property name="dist.home" value="${tf.build.tf}"/>
+ <property name="component.version" value="${tf.version}"/>
+ <property name="maven.compile.source" value="1.2"/>
+ <property name="maven.compile.target" value="1.2"/>
+ </ant>
+
</target>
<!-- ====================================================================== -->
Modified: commons/proper/collections/trunk/maven.xml
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/maven.xml?rev=638061&r1=638060&r2=638061&view=diff
==============================================================================
--- commons/proper/collections/trunk/maven.xml (original)
+++ commons/proper/collections/trunk/maven.xml Mon Mar 17 13:51:18 2008
@@ -29,37 +29,11 @@
<!-- ============== JAR ================== -->
<postGoal name="jar:jar">
- <j:set var="finalName" value="${pom.getPluginContext('maven-jar-plugin').getVariable('maven.final.name')}"/>
- <j:set var="finalVersion" value="${finalName.substring(20)}" />
- <j:set var="testfwkBase" value="${pom.artifactId}-testframework" />
- <j:set var="testfwkName" value="${testfwkBase}-${finalVersion}" />
-
- <ant:jar
- jarfile="${maven.build.dir}/${testfwkName}.jar">
- <j:set var="licenseFileName"><license:fileName/></j:set>
- <util:file name="${licenseFileName}" var="licenseFile"/>
- <ant:metainf dir="${licenseFile.canonicalFile.parent}">
- <ant:include name="${licenseFile.canonicalFile.name}"/>
- </ant:metainf>
- <ant:manifest>
- <ant:attribute name="Built-By" value="${user.name}"/>
- <ant:attribute name="Created-By" value="Apache Jakarta Maven"/>
- <ant:attribute name="Package" value="${pom.package}"/>
- <ant:attribute name="Build-Jdk" value="${java.version}"/>
- <!-- added supplementary entries -->
- <ant:attribute name="Extension-Name" value="Commons Collections Test Framework"/>
- <ant:attribute name="Specification-Version" value="${pom.specificationVersion}"/>
- <ant:attribute name="Specification-Vendor" value="${pom.organization.name}"/>
- <ant:attribute name="Specification-Title" value="Commons Collections Test Framework"/>
- <ant:attribute name="Implementation-Version" value="${pom.currentVersion}"/>
- <ant:attribute name="Implementation-Vendor" value="${pom.organization.name}"/>
- <ant:attribute name="Implementation-Vendor-Id" value="${pom.organization.identifier}"/>
- </ant:manifest>
- <ant:fileset dir="${maven.build.dir}/test-classes">
- <ant:include name="**/AbstractTest*.class"/>
- <ant:include name="**/BulkTest*.class"/>
- </ant:fileset>
- </ant:jar>
+ <ant:ant antfile="build-testframework.xml" target="jar">
+ <property name="component.version" value="${pom.currentVersion}"/>
+ <property name="test.classes" value="${maven.build.dir}/test-classes"/>
+ <property name="dist.home" value="${maven.build.dir}"/>
+ </ant:ant>
</postGoal>
<postGoal name="jar:install">
Modified: commons/proper/collections/trunk/pom.xml
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/pom.xml?rev=638061&r1=638060&r2=638061&view=diff
==============================================================================
--- commons/proper/collections/trunk/pom.xml (original)
+++ commons/proper/collections/trunk/pom.xml Mon Mar 17 13:51:18 2008
@@ -399,6 +399,28 @@
</configuration>
</plugin>
<plugin>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <executions>
+ <execution>
+ <phase>package</phase>
+ <configuration>
+ <tasks>
+ <ant antfile="build-testframework.xml" target="jar">
+ <property name="component.version" value="${project.version}"/>
+ <property name="test.classes" value="${project.build.directory}/test-classes"/>
+ <property name="dist.home" value="${project.build.directory}"/>
+ <property name="maven.compile.source" value="${maven.compile.source}"/>
+ <property name="maven.compile.target" value="${maven.compile.target}"/>
+ </ant>
+ </tasks>
+ </configuration>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<descriptors>