You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by js...@apache.org on 2002/05/23 01:07:29 UTC
cvs commit: jakarta-commons-sandbox/cli project.xml project.properties build.xml PROPOSAL.html STATUS.html build.properties.sample
jstrachan 02/05/22 16:07:29
Modified: cli build.xml
Added: cli/xdocs index.xml
cli project.xml project.properties
Removed: cli PROPOSAL.html STATUS.html build.properties.sample
Log:
Applied John Keyes' patch to convert CLI's build process to Maven. Tweeked it a little on the way.
Revision Changes Path
1.1 jakarta-commons-sandbox/cli/xdocs/index.xml
Index: index.xml
===================================================================
<?xml version="1.0"?>
<document>
<properties>
<title></title>
<author email="jstrachan@apache.org">James Strachan</author>
</properties>
<body>
<section name="CLI : Command Line Interface">
<p>
<b>CLI</b>
</p>
<p>
The CLI library provides a simple and easy to use API for working
with the command line arguments and options.</p>
<p>
CLI is based on ideas and code from
<ul>
<li>werken.opt by Bob Mcwhirter</li>
<li>The cli package in Avalon Excalibur by Peter Donald</li>
<li>Optz by John Keyes</li>
</ul>
</p>
</section>
</body>
</document>
1.4 +172 -222 jakarta-commons-sandbox/cli/build.xml
Index: build.xml
===================================================================
RCS file: /home/cvs/jakarta-commons-sandbox/cli/build.xml,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- build.xml 17 May 2002 15:11:58 -0000 1.3
+++ build.xml 22 May 2002 23:07:29 -0000 1.4
@@ -1,228 +1,178 @@
-<project name="Digester" default="compile" basedir=".">
+<?xml version="1.0"?>
-<!--
- $Id: build.xml,v 1.3 2002/05/17 15:11:58 jstrachan Exp $
--->
+<project name="cli" default="maven:jar" basedir=".">
+ <!-- Give user a chance to override without editing this file
+ (and without typing -D each time they invoke a target) -->
-<!-- ========== Initialize Properties ===================================== -->
-
-
- <property file="build.properties"/> <!-- Component local -->
- <property file="../build.properties"/> <!-- Commons local -->
- <property file="${user.home}/build.properties"/> <!-- User local -->
-
-
-<!-- ========== External Dependencies ===================================== -->
-
-
- <!-- The directories corresponding to your necessary dependencies -->
- <property name="junit.home" value="/usr/local/junit3.7"/>
- <property name="commons.home" value="../../jakarta-commons"/>
- <property name="beanutils.home" value="${commons.home}/beanutils"/>
- <property name="collections.home" value="${commons.home}/collections"/>
- <property name="logging.home" value="${commons.home}/logging"/>
- <property name="digester.home" value="${commons.home}/digester"/>
-
-
-<!-- ========== Derived Values ============================================ -->
-
-
- <!-- The locations of necessary jar files -->
- <property name="jdk.api" value="${jdk.home}/docs/api"/>
- <property name="junit.jar" value="${junit.home}/junit.jar"/>
+ <!-- Allow any user specific values to override the defaults -->
+ <property file="${user.home}/build.properties" />
-
-<!-- ========== Component Declarations ==================================== -->
-
-
- <!-- The name of this component -->
- <property name="component.name" value="cli"/>
-
- <!-- The primary package name of this component -->
- <property name="component.package" value="org.apache.commons.cli"/>
-
- <!-- The title of this component -->
- <property name="component.title" value="CLI - Command Line Interface toolkit"/>
-
- <!-- The current version number of this component -->
- <property name="component.version" value="1.0-dev"/>
-
- <!-- The base directory for compilation targets -->
- <property name="build.home" value="target"/>
-
- <!-- The base directory for component configuration files -->
- <property name="conf.home" value="src/conf"/>
-
- <!-- The base directory for distribution targets -->
- <property name="dist.home" value="dist"/>
-
- <!-- The base directory for component sources -->
- <property name="source.home" value="src/java"/>
-
- <!-- The base directory for unit test sources -->
- <property name="test.home" value="src/test"/>
-
-
-<!-- ========== Compiler Defaults ========================================= -->
-
-
- <!-- Should Java compilations set the 'debug' compiler option? -->
- <property name="compile.debug" value="true"/>
-
- <!-- Should Java compilations set the 'deprecation' compiler option? -->
- <property name="compile.deprecation" value="false"/>
-
- <!-- Should Java compilations set the 'optimize' compiler option? -->
- <property name="compile.optimize" value="true"/>
-
- <!-- Construct compile classpath -->
- <path id="compile.classpath">
- <pathelement location="${build.home}/classes"/>
- </path>
-
-
-<!-- ========== Test Execution Defaults =================================== -->
-
-
- <!-- Construct unit test classpath -->
- <path id="test.classpath">
- <pathelement location="${build.home}/classes"/>
- <pathelement location="${build.home}/tests"/>
- <pathelement location="${junit.jar}"/>
- </path>
-
- <!-- Should all tests fail if one does? -->
- <property name="test.failonerror" value="true"/>
-
- <!-- The test runner to execute -->
- <property name="test.runner" value="junit.textui.TestRunner"/>
-
-
-<!-- ========== Executable Targets ======================================== -->
-
-
- <target name="init"
- description="Initialize and evaluate conditionals">
- <echo message="-------- ${component.name} ${component.version} --------"/>
- <filter token="name" value="${component.package}"/>
- <filter token="version" value="${component.version}"/>
- </target>
-
-
- <target name="prepare" depends="init"
- description="Prepare build directory">
- <mkdir dir="${build.home}"/>
- <mkdir dir="${build.home}/classes"/>
- <mkdir dir="${build.home}/conf"/>
- <mkdir dir="${build.home}/tests"/>
- </target>
-
-
- <target name="static" depends="prepare"
- description="Copy static files to build directory">
- <tstamp/>
- <copy todir="${build.home}/conf" filtering="on">
- <fileset dir="${conf.home}" includes="*.MF"/>
- </copy>
- </target>
-
-
- <target name="compile" depends="static"
- description="Compile shareable components">
- <javac srcdir="${source.home}"
- destdir="${build.home}/classes"
- debug="${compile.debug}"
- deprecation="${compile.deprecation}"
- optimize="${compile.optimize}">
- <classpath refid="compile.classpath"/>
- </javac>
- <copy todir="${build.home}/classes" filtering="on">
- <fileset dir="${source.home}" excludes="**/*.java"/>
- </copy>
- </target>
-
-
- <target name="compile.tests" depends="compile"
- description="Compile unit test cases">
- <javac srcdir="${test.home}"
- destdir="${build.home}/tests"
- debug="${compile.debug}"
- deprecation="${compile.deprecation}"
- optimize="${compile.optimize}">
- <classpath refid="test.classpath"/>
- </javac>
- <copy todir="${build.home}/tests" filtering="on">
- <fileset dir="${test.home}" excludes="**/*.java"/>
- </copy>
- </target>
-
-
- <target name="clean"
- description="Clean build and distribution directories">
- <delete dir="${build.home}"/>
- <delete dir="${dist.home}"/>
- </target>
-
-
- <target name="all" depends="clean,compile"
- description="Clean and compile all components"/>
-
-
- <target name="javadoc" depends="compile"
- description="Create component Javadoc documentation">
- <mkdir dir="${dist.home}"/>
- <mkdir dir="${dist.home}/docs"/>
- <mkdir dir="${dist.home}/docs/api"/>
- <javadoc sourcepath="${source.home}"
- destdir="${dist.home}/docs/api"
- packagenames="org.apache.commons.*"
- author="true"
- private="true"
- version="true"
- doctitle="<h1>${component.title}</h1>"
- windowtitle="${component.title} (Version ${component.version})"
- bottom="Copyright (c) 2002 - Apache Software Foundation">
- <link offline="true" packagelistLoc="${jdk.api}"
- href="http://java.sun.com/products/jdk/1.3/docs/api"/>
- <classpath refid="compile.classpath"/>
- </javadoc>
- </target>
-
-
- <target name="dist" depends="compile,javadoc"
- description="Create binary distribution">
- <mkdir dir="${dist.home}"/>
- <copy file="../LICENSE"
- todir="${dist.home}"/>
- <mkdir dir="${build.home}/classes/META-INF"/>
- <copy file="../LICENSE"
- tofile="${build.home}/classes/META-INF/LICENSE.txt"/>
- <jar jarfile="${dist.home}/commons-${component.name}.jar"
- basedir="${build.home}/classes"
- manifest="${build.home}/conf/MANIFEST.MF"/>
- </target>
-
-
-<!-- ========== Unit Test Targets ========================================= -->
-
-
- <target name="test" depends="compile.tests"
- description="Run all unit test cases">
- <java classname="${component.package}.AllTest" fork="yes" failonerror="${test.failonerror}">
- <classpath refid="test.classpath"/>
- </java>
- </target>
-
-
-<!-- ========== Sample Program Targets ==================================== -->
-
- <target name="demo.help" depends="compile.tests"
- description="Runs the help format sample">
- <echo message="Running the help format sample..."/>
- <java classname="org.apache.commons.cli.HelpFormatterExamples" fork="yes">
- <classpath refid="test.classpath"/>
- </java>
- </target>
+ <!-- Allow user defaults for this project -->
+ <property file="build.properties" />
+
+ <!-- Set default values for the build -->
+ <property file="project.properties" />
+
+ <!-- maven:start -->
+
+ <!-- ================================================================== -->
+ <!-- D E L E G A T O R S -->
+ <!-- ================================================================== -->
+
+ <target name="maven:gump-descriptor">
+ <ant antfile="${maven.home}/build-maven.xml" target="gump-descriptor"/>
+ </target>
+
+ <target name="maven:maven-update">
+ <ant antfile="${maven.home}/build-maven.xml" target="maven-update"/>
+ </target>
+
+ <target name="maven:update-jars">
+ <ant antfile="${maven.home}/build-maven.xml" target="update-jars"/>
+ </target>
+
+ <target name="maven:jar">
+ <ant antfile="${maven.home}/build-maven.xml" target="jar"/>
+ </target>
+
+ <target name="maven:docs-quick">
+ <ant antfile="${maven.home}/build-docs.xml" target="docs-quick"/>
+ </target>
+
+ <target name="maven:run-singletest">
+ <ant antfile="${maven.home}/build-test.xml" target="run-singletest"/>
+ </target>
+
+ <target name="maven:compile">
+ <ant antfile="${maven.home}/build-maven.xml" target="compile"/>
+ </target>
+
+ <target name="maven:jar-resources">
+ <ant antfile="${maven.home}/plugins/core/build.xml" target="jar-resources"/>
+ </target>
+
+ <target name="maven:fo">
+ <ant antfile="${maven.home}/build-docs.xml" target="fo"/>
+ </target>
+
+ <target name="maven:cvs-change-log">
+ <ant antfile="${maven.home}/build-docs.xml" target="cvs-change-log"/>
+ </target>
+
+ <target name="maven:war">
+ <ant antfile="${maven.home}/plugins/j2ee/build.xml" target="war"/>
+ </target>
+
+ <target name="maven:generate-reactor">
+ <ant antfile="${maven.home}/build-reactor.xml" target="generate-reactor"/>
+ </target>
+
+ <target name="maven:cross-ref">
+ <ant antfile="${maven.home}/build-docs.xml" target="cross-ref"/>
+ </target>
+
+ <target name="maven:deploy-site">
+ <ant antfile="${maven.home}/build-docs.xml" target="deploy-site"/>
+ </target>
+
+ <target name="maven:ear">
+ <ant antfile="${maven.home}/plugins/j2ee/build.xml" target="ear"/>
+ </target>
+
+ <target name="maven:install-jar">
+ <ant antfile="${maven.home}/build-maven.xml" target="install-jar"/>
+ </target>
+
+ <target name="maven:task-list">
+ <ant antfile="${maven.home}/build-docs.xml" target="task-list"/>
+ </target>
+
+ <target name="maven:docs">
+ <ant antfile="${maven.home}/build-docs.xml" target="docs"/>
+ </target>
+
+ <target name="maven:site">
+ <ant antfile="${maven.home}/build-docs.xml" target="site"/>
+ </target>
+
+ <target name="maven:deploy-dist">
+ <ant antfile="${maven.home}/build-maven.xml" target="deploy-dist"/>
+ </target>
+
+ <target name="maven:javadocs">
+ <ant antfile="${maven.home}/build-docs.xml" target="javadocs"/>
+ </target>
+
+ <target name="maven:announce">
+ <ant antfile="${maven.home}/build-maven.xml" target="announce"/>
+ </target>
+
+ <target name="maven:check-source">
+ <ant antfile="${maven.home}/build-maven.xml" target="check-source"/>
+ </target>
+
+ <target name="maven:dist">
+ <ant antfile="${maven.home}/build-maven.xml" target="dist"/>
+ </target>
+
+ <target name="maven:dist-build">
+ <ant antfile="${maven.home}/build-maven.xml" target="dist-build"/>
+ </target>
+
+ <target name="maven:metrics">
+ <ant antfile="${maven.home}/build-metrics.xml" target="metrics"/>
+ </target>
+
+ <target name="maven:clean">
+ <ant antfile="${maven.home}/build-maven.xml" target="clean"/>
+ </target>
+
+ <target name="maven:env">
+ <ant antfile="${maven.home}/build-maven.xml" target="env"/>
+ </target>
+
+ <target name="maven:test">
+ <ant antfile="${maven.home}/build-test.xml" target="test"/>
+ </target>
+
+ <target name="maven:pdf">
+ <ant antfile="${maven.home}/build-docs.xml" target="pdf"/>
+ </target>
+
+ <target name="maven:iutest">
+ <ant antfile="${maven.home}/build-iutest.xml" target="iutest"/>
+ </target>
+
+ <target name="maven:activity-log">
+ <ant antfile="${maven.home}/build-docs.xml" target="activity-log"/>
+ </target>
+
+ <target name="maven:verify-project">
+ <ant antfile="${maven.home}/build-maven.xml" target="verify-project"/>
+ </target>
+
+ <target name="maven:validate-pom">
+ <ant antfile="${maven.home}/build-maven.xml" target="validate-pom"/>
+ </target>
+
+ <target name="maven:validate-war">
+ <ant antfile="${maven.home}/plugins/j2ee/build.xml" target="validate-war"/>
+ </target>
+
+
+ <!-- maven:end -->
+
+<!-- ========== Helper Targets ============================================ -->
+
+ <target name="clean" depends="maven:clean">
+ <delete file="velocity.log"/>
+ </target>
+
+ <target name="site" depends="maven:site"/>
+
+ <target name="test" depends="maven:test"/>
+
+ <target name="compile" depends="maven:compile, maven:jar-resources"/>
</project>
1.1 jakarta-commons-sandbox/cli/project.xml
Index: project.xml
===================================================================
<?xml version="1.0" encoding="UTF-8"?>
<project>
<version>2</version>
<name>commons-cli</name>
<id>commons-cli</id>
<currentVersion>1.0-dev</currentVersion>
<organization>
<name>Apache Software Foundation</name>
<url>http://www.apache.org</url>
</organization>
<inceptionYear>2002</inceptionYear>
<package>org.apache.commons.cli</package>
<shortDescription>Commons CLI</shortDescription>
<gumpRepositoryId>jakarta</gumpRepositoryId>
<description>Commons CLI: Command Line Interface</description>
<url>http://jakarta.apache.org/commons/sandbox/cli.html</url>
<cvsWebUrl>http://cvs.apache.org/viewcvs/jakarta-commons-sandbox/cli/</cvsWebUrl>
<cvsModule>jakarta-commons-sandbox/cli</cvsModule>
<issueTrackingUrl>http://nagoya.apache.org/</issueTrackingUrl>
<siteAddress>jakarta.apache.org</siteAddress>
<siteDirectory>/www/jakarta.apache.org/commons/sandbox/cli/</siteDirectory>
<mailingLists>
<mailingList>
<name>Commons Dev List</name>
<subscribe>commons-dev-subscribe@jakarta.apache.org</subscribe>
<unsubscribe>commons-dev-unsubscribe@jakarta.apache.org</unsubscribe>
<archive>http://nagoya.apache.org/eyebrowse/SummarizeList?listName=commons-dev@jakarta.apache.org</archive>
</mailingList>
</mailingLists>
<developers>
<developer>
<name>James Strachan</name>
<id>jstrachan</id>
<email>jstrachan@apache.org</email>
<organization>SpiritSoft, Inc.</organization>
</developer>
<developer>
<name>bob mcwhirter</name>
<id>bob</id>
<email>bob@werken.com</email>
<organization>Werken</organization>
</developer>
<developer>
<name>John Keys</name>
<id>johnkeys</id>
<email></email>
<organization></organization>
</developer>
</developers>
<dependencies>
<dependency>
<name>commons-logging</name>
<type>required</type>
<version>1.0</version>
<jar>commons-logging-1.0.jar</jar>
</dependency>
</dependencies>
<build>
<sourceDirectories>
<sourceDirectory>src/java</sourceDirectory>
</sourceDirectories>
<unitTestSourceDirectory>src/test</unitTestSourceDirectory>
<aspectSourceDirectories></aspectSourceDirectories>
<unitTestPatterns>
<unitTestPattern>include = **/*Test*.java</unitTestPattern>
</unitTestPatterns>
<jarResources>
<jarResource>include = **/*.properties</jarResource>
</jarResources>
<jars></jars>
<nagEmailAddress>commons-dev@jakarta.apache.org</nagEmailAddress>
</build>
</project>
1.1 jakarta-commons-sandbox/cli/project.properties
Index: project.properties
===================================================================
# -------------------------------------------------------------------
# P R O J E C T P R O P E R T I E S
# -------------------------------------------------------------------
compile.debug = on
compile.optimize = off
compile.deprecation = off
maven.jarResources.basedir=${basedir}/src/java
# use Sun coding standards
maven.checkstyle.lcurly.type = eol
maven.checkstyle.lcurly.method = eol
maven.checkstyle.lcurly.other = eol
maven.checkstyle.header.file = LICENSE.txt
maven.checkstyle.header.ignore.line = 1,2,3,4,5,6
maven.checkstyle.const.pattern = ^[a-z][a-zA-Z0-9]*$
# disable these non-critical errors to highlight
# more important ones like missing javadoc
maven.checkstyle.max.line.len = 100
maven.checkstyle.ignore.whitespace = true
maven.checkstyle.ignore.public.in.interface = true
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>