commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ohe...@apache.org
Subject svn commit: r446883 - in /jakarta/commons/proper/configuration/trunk: build.xml default.properties src/conf/MANIFEST.MF
Date Sat, 16 Sep 2006 15:20:24 GMT
Author: oheger
Date: Sat Sep 16 08:20:22 2006
New Revision: 446883

URL: http://svn.apache.org/viewvc?view=rev&rev=446883
Log:
Updated ant build to create a proper jar

Added:
    jakarta/commons/proper/configuration/trunk/default.properties   (with props)
Modified:
    jakarta/commons/proper/configuration/trunk/build.xml
    jakarta/commons/proper/configuration/trunk/src/conf/MANIFEST.MF

Modified: jakarta/commons/proper/configuration/trunk/build.xml
URL: http://svn.apache.org/viewvc/jakarta/commons/proper/configuration/trunk/build.xml?view=diff&rev=446883&r1=446882&r2=446883
==============================================================================
--- jakarta/commons/proper/configuration/trunk/build.xml (original)
+++ jakarta/commons/proper/configuration/trunk/build.xml Sat Sep 16 08:20:22 2006
@@ -20,38 +20,43 @@
   on date January 29 2005, time 1728-->
 
 <project default="jar" name="commons-configuration" basedir=".">
-  <property name="defaulttargetdir" value="target">
+
+  <!-- Manual changes for dealing with the conf directory and jdbc dependency -->
+  <property file="build.properties"/>
+  <property file="default.properties"/>
+  <property name="confdir" value="conf"/>
+  <!-- Manual changes end -->
+
+  <property name="defaulttargetdir" value="${build.home}">
   </property>
-  <property name="libdir" value="target/lib">
+  <property name="libdir" value="${build.home}/lib">
   </property>
-  <property name="classesdir" value="target/classes">
+  <property name="classesdir" value="${build.home}/classes">
   </property>
-  <property name="testclassesdir" value="target/test-classes">
+  <property name="metadir" value="${classesdir}/META-INF"/>
+  <property name="testclassesdir" value="${build.home}/test-classes">
   </property>
-  <property name="testclassesdir" value="target/test-classes">
+  <property name="testclassesdir" value="${build.home}/test-classes">
   </property>
-  <property name="testreportdir" value="target/test-reports">
+  <property name="testreportdir" value="${build.home}/test-reports">
   </property>
   <property name="distdir" value="dist">
   </property>
   <property name="javadocdir" value="dist/docs/api">
   </property>
-  
-  <!-- Manual changes for dealing with the conf directory and jdbc dependency -->
-  <property name="confdir" value="conf"/>
   <property name="targetconfdir" value="${testclassesdir}"/>
-  <property file="build.properties"/>
-  <!-- Manual changes end -->
-  
-  <property name="final.name" value="commons-configuration-1.3RC2">
-  </property>
+
   <path id="build.classpath">
     <fileset dir="${libdir}">
       <include name="**/*.jar">
       </include>
     </fileset>
   </path>
+
   <target name="init" description="o Initializes some properties">
+    <filter token="name" value="${component.name}"/>
+    <filter token="package" value="${component.package}"/>
+    <filter token="version" value="${component.version}"/>
     <mkdir dir="${libdir}">
     </mkdir>
     <condition property="noget">
@@ -73,16 +78,17 @@
     depends="get-deps, copy-jdbc-dep">
     <mkdir dir="${classesdir}">
     </mkdir>
-    <javac destdir="${classesdir}" deprecation="true" debug="true" optimize="false" excludes="**/package.html">
+    <javac destdir="${classesdir}" deprecation="${compile.deprecation}" 
+      debug="${compile.debug}" optimize="${compile.optimize}" excludes="**/package.html">
       <src>
-        <pathelement location="src/java">
+        <pathelement location="${source.home}">
         </pathelement>
       </src>
       <classpath refid="build.classpath">
       </classpath>
     </javac>
     <copy todir="${classesdir}">
-      <fileset dir="conf">
+      <fileset dir="${confdir}">
         <include name="digesterRules.xml">
         </include>
         <include name="properties.dtd">
@@ -90,8 +96,14 @@
       </fileset>
     </copy>
   </target>
+
   <target name="jar" description="o Create the jar" depends="compile,test">
-    <jar jarfile="${defaulttargetdir}/${final.name}.jar" excludes="**/package.html" basedir="${classesdir}">
+    <mkdir dir="${classesdir}/META-INF"/>
+    <copy file="LICENSE.txt" todir="${metadir}"/>
+    <copy file="NOTICE.txt" todir="${metadir}"/>
+    <copy file="${conf.home}/manifest.mf" todir="${defaulttargetdir}" filtering="on"/>
+    <jar jarfile="${defaulttargetdir}/${final.name}.jar" basedir="${classesdir}"
+       manifest="${defaulttargetdir}/manifest.mf" excludes="**/package.html">
     </jar>
   </target>
   <target name="clean" description="o Clean up the generated directories">
@@ -117,7 +129,8 @@
   <target name="internal-test" if="Junit.present" depends="junit-present,compile-tests">
     <mkdir dir="${testreportdir}">
     </mkdir>
-    <junit dir="./" failureproperty="test.failure" printSummary="yes" fork="true" haltonerror="true">
+    <junit dir="./" failureproperty="test.failure" printSummary="yes" fork="${junit.fork}"
+      haltonerror="${test.failonerror}">
       <sysproperty key="basedir" value=".">
       </sysproperty>
       <formatter type="xml">
@@ -165,7 +178,7 @@
     </mkdir>
     <javac destdir="${testclassesdir}" deprecation="true" debug="true" optimize="false"
excludes="**/package.html">
       <src>
-        <pathelement location="src/test">
+        <pathelement location="${test.home}">
         </pathelement>
       </src>
       <classpath>

Added: jakarta/commons/proper/configuration/trunk/default.properties
URL: http://svn.apache.org/viewvc/jakarta/commons/proper/configuration/trunk/default.properties?view=auto&rev=446883
==============================================================================
--- jakarta/commons/proper/configuration/trunk/default.properties (added)
+++ jakarta/commons/proper/configuration/trunk/default.properties Sat Sep 16 08:20:22 2006
@@ -0,0 +1,61 @@
+#
+# 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.
+#
+
+# $Id$
+
+# The name of this component
+component.name = commons-configuration
+
+# The primary package name of this component
+component.package = org.apache.commons.configuration
+
+# The title of this component
+component.title = Configuration Utilities
+
+# The current version number of this component
+component.version = 1.3RC2
+
+# The name that is used to create the jar file
+final.name = ${component.name}-${component.version}
+
+# The base directory for compilation targets
+build.home = target
+
+# The base directory for component configuration files
+conf.home = src/conf
+
+# The base directory for component sources
+source.home = src/java
+
+# The base directory for unit test sources
+test.home = src/test
+
+# Should Java compilations set the 'debug' compiler option?
+compile.debug = true
+
+# Should Java compilations set the 'deprecation' compiler option?
+compile.deprecation = true
+
+# Should Java compilations set the 'optimize' compiler option?
+compile.optimize = true
+
+# Should all tests fail if one does?
+test.failonerror = true
+
+# Whether or not to fork tests
+junit.fork = true
+

Propchange: jakarta/commons/proper/configuration/trunk/default.properties
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jakarta/commons/proper/configuration/trunk/default.properties
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Propchange: jakarta/commons/proper/configuration/trunk/default.properties
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: jakarta/commons/proper/configuration/trunk/src/conf/MANIFEST.MF
URL: http://svn.apache.org/viewvc/jakarta/commons/proper/configuration/trunk/src/conf/MANIFEST.MF?view=diff&rev=446883&r1=446882&r2=446883
==============================================================================
--- jakarta/commons/proper/configuration/trunk/src/conf/MANIFEST.MF (original)
+++ jakarta/commons/proper/configuration/trunk/src/conf/MANIFEST.MF Sat Sep 16 08:20:22 2006
@@ -3,7 +3,8 @@
 Extension-Name: @name@
 Specification-Version: @version@
 Specification-Vendor: Apache Software Foundation
-Specification-Title: @title@
+Specification-Title: Commons Configuration
 Implementation-Version: @version@
 Implementation-Vendor: Apache Software Foundation
-Implementation-Vendor-Id:
+Implementation-Title: Commons Configuration
+Implementation-Vendor-Id: org.apache



---------------------------------------------------------------------
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