Author: linus
Date: 2008-02-09 06:30:05-0800
New Revision: 14094
Added:
trunk/src/app/ (props changed)
trunk/src/app/build.xml
- copied, changed from r14091, /trunk/src_new/build.xml
trunk/src/app/default.properties
- copied, changed from r14091, /trunk/src_new/default.properties
trunk/src/app/lib/
- copied from r14091, /trunk/lib/
trunk/src/app/src/
- copied from r14091, /trunk/src_new/
trunk/src/app/tests/
- copied from r14091, /trunk/tests/
trunk/src/build.bat
- copied unchanged from r14091, /trunk/src_new/build.bat
trunk/src/build.sh
- copied unchanged from r14091, /trunk/src_new/build.sh
trunk/src/build.xml
- copied, changed from r14091, /trunk/src_new/build.xml
trunk/src/default.properties
- copied, changed from r14091, /trunk/src_new/default.properties
trunk/src/infra/ (props changed)
trunk/src/infra/build.xml (contents, props changed)
trunk/src/infra/lib/
trunk/src/infra/lib/log4j-1.2.6.jar
- copied unchanged from r14091, /trunk/lib/log4j-1.2.6.jar
trunk/src/infra/lib/log4j.LICENSE.txt
- copied unchanged from r14091, /trunk/lib/log4j.LICENSE.txt
trunk/src/model-mdr/tests/org/argouml/resource/
trunk/src/model-mdr/tests/org/argouml/resource/info_console.lcf
Removed:
trunk/build/
trunk/lib/
trunk/src/model-mdr/build/
trunk/src_new/
trunk/tests/
Modified:
trunk/src/app/src/org/argouml/application/events/ArgoDiagramAppearanceEventListener.java
trunk/src/app/src/org/argouml/cognitive/Highlightable.java
trunk/src/model-mdr/build.xml
trunk/src/model-mdr/tests/org/argouml/model/mdr/AbstractMDRModelImplementationTestCase.java
trunk/src/model/build.xml
Log:
Restructuring the source code moving src_new, tests, and lib
to src/app.
Beginning of restructuring the src_new/build.xml into src/build.xml and
src/<dir>/build.xml.
Copied: trunk/src/app/build.xml (from r14091, /trunk/src_new/build.xml)
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/app/build.xml?view=diff&rev=14094&p1=/trunk/src_new/build.xml&p2=trunk/src/app/build.xml&r1=14091&r2=14094
==============================================================================
--- /trunk/src_new/build.xml (original)
+++ trunk/src/app/build.xml 2008-02-09 06:30:05-0800
@@ -1,123 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- $Id$
-This requires Apache Ant 1.6.2 and has been tested through Ant 1.7.
-Introduction
-============
-ArgoUML is a free UML tool. It is written entirely in Java.
-The homepage of ArgoUML is http://argouml.tigris.org
-
-Building instructions
-=====================
-First, make sure your current working directory is where this very
-file is located. Then just type
- build -p
-if on a MS Windows system, or
- ./build.sh -p
-if on a *nix system, to get a list of available build targets
-and the name of the default target which will be used if none
-is specified (currently 'compile').
-
-Executing build.bat/build.sh will use the version of Ant from
-the ArgoUML CVS repository. You can use
- build -version
-to find out what the current version is.
-
-If your directories are organized as set up by the Eclipse project set
-file, use the file build2.sh/build2.bat to build from the command line.
-This uses an alternate properties file, eclipse-ant-build.properties,
-which accommodates the different directory layout.
-
-Property Settings
-=================
-The default property settings are in "default.properties". To override
-them, create a file called "build.properties" here or
-"argouml.build.properties" in your home directory. Order of precedence
-is the reverse of the order they are mentioned in above.
-
-For example, to override the model subystem implementation used for
-tests, put the following line your file:
-
-test.model.implementation=org.argouml.model.euml.EUMLModelImplementation
-
-Refer to the Ant documentation and this file for other settings.
-
-Compilation instructions for ArgoUML
-====================================
-If you want to compile ArgoUML, you need to have following:
-- JAVA_HOME correctly set to where Java2 jdk is installed
-- the additional libraries (ocl-argo.jar, log4j.jar,
- gef.jar, antlrall.jar, toolbar.jar, swidgets.jar) in argouml/lib
- when these are right the command
- build compile
- will do the job.
- -->
-
-<project basedir="." default="compile" name="argouml">
-
- <!-- =================================================================== -->
- <!-- Global initialization -->
- <!-- =================================================================== -->
-
-
- <!-- =================================================================== -->
- <!-- Convenience target for locating property files. -->
- <!-- =================================================================== -->
-
- <target name="list-property-files" depends="init"
- description="List the property files read by the build.">
-
- <!-- ====================================================== -->
- <!-- System property path.separator is a simple way to tell -->
- <!-- what operating system we are running on -->
- <!-- ====================================================== -->
- <pathconvert pathsep="${path.separator}" property="lbp.path">
- <path>
- <pathelement location="${local.build.properties}"/>
- </path>
- </pathconvert>
-
- <pathconvert pathsep="${path.separator}" property="ubp.path">
- <path>
- <pathelement location="${user.build.properties}"/>
- </path>
- </pathconvert>
-
- <pathconvert pathsep="${path.separator}" property="dp.path">
- <path>
- <pathelement location="default.properties"/>
- </path>
- </pathconvert>
-
- <!-- ====================================================== -->
- <!-- Ant does not replace property values once they are -->
- <!-- set. So only those which do not exist will get the -->
- <!-- property values set to "not present". -->
- <!-- ====================================================== -->
- <available file="${lbp.path}" property="lbp.exists" value="present"/>
- <available file="${ubp.path}" property="ubp.exists" value="present"/>
- <available file="${dp.path}" property="dp.exists" value="present"/>
-
- <property name="lbp.exists" value="not present"/>
- <property name="ubp.exists" value="not present"/>
- <property name="dp.exists" value="not present"/>
+ Ant build file for App, all subsystems not yet split.
- <echo>
+ This is designed to work:
+ - in the subdirectory named app, as stored in the repository.
+ Used when compiling, running tests from the command line.
+ - When checked out from within Eclipse (subdirectory named argouml-app)
+ Used for generating code.
+
+Building this requires:
+ infra
+ model
-Property files to be searched:
-
-1. ${lbp.path}
- File is ${lbp.exists}.
-
-2. ${ubp.path}
- File is ${ubp.exists}.
-
-3. ${dp.path}
- File is ${dp.exists}.
-
- </echo>
+ -->
- </target>
+<project basedir="." default="compile" name="argouml">
<!-- =================================================================== -->
<!-- Initialization target -->
@@ -129,8 +27,6 @@
<format pattern="yyyy" property="year"/>
</tstamp>
- <property name="argo.dist.dir" value="../DIST"/>
-
<property name="local.build.properties" value="build.properties"/>
<property name="user.build.properties"
value="${user.home}/argouml.build.properties"/>
@@ -143,59 +39,60 @@
<property file="${override.build.properties}"/>
<property file="default.properties"/>
- <path id="java.tools.classpath">
- <pathelement path="${JAVA_HOME}/lib/tools.jar"/>
- </path>
+ <property name="build.dir" value="build"/>
+ <property name="build.classes" value="${build.dir}/classes"/>
- <path id="antlr.runtime.classpath">
- <pathelement location="${antlrall.jar.path}"/>
- </path>
+ <property name="tests.classes" value="${build.dir}/tests/classes"/>
+ <property name="tests.reports" value="${build.dir}/tests/reports"/>
- <path id="argo.compile.classpath">
- <pathelement location="${ocl-argo.jar.path}"/>
- <pathelement location="${gef.jar.path}"/>
- <pathelement location="${log4j.jar.path}"/>
- <pathelement location="${swidgets.jar.path}"/>
- <pathelement location="${toolbar.jar.path}"/>
- <pathelement location="${commons-logging.jar.path}"/>
- <path refid="antlr.runtime.classpath"/>
- <pathelement location="${argo.build.dir}/argouml-model.jar"/>
+ <path id="java.tools.classpath">
+ <pathelement path="${JAVA_HOME}/lib/tools.jar"/>
</path>
- <path id="argo.mdr.runtime.classpath">
- <pathelement location="${argo.mdr.dir}/build/java-interfaces.jar"/>
- <pathelement location="${argo.mdr.dir}/build/argouml-mdr.jar"/>
- <pathelement location="${argo.mdr.dir}/lib/mof.jar"/>
- <pathelement location="${argo.mdr.dir}/lib/jmi.jar"/>
- <pathelement location="${argo.mdr.dir}/lib/mdrapi.jar"/>
- <pathelement location="${argo.mdr.dir}/lib/nbmdr.jar"/>
- <pathelement location="${argo.mdr.dir}/lib/jmiutils.jar"/>
- <pathelement location="${argo.mdr.dir}/lib/openide-util.jar"/>
+ <path id="antlr.run.classpath">
+ <pathelement location="lib/antlrall-2.7.2.jar"/>
</path>
- <path id="argo.euml.runtime.classpath">
- <pathelement location="${argo.euml.dir}/build/argouml-euml.jar"/>
- <pathelement location="${argo.euml.dir}/lib/org.eclipse.emf.common_2.3.0.v200703080200.jar"/>
- <pathelement location="${argo.euml.dir}/lib/org.eclipse.emf.ecore.change_2.3.0.v200706262000.jar"/>
- <pathelement location="${argo.euml.dir}/lib/org.eclipse.emf.ecore.xmi_2.3.0.v200703080200.jar"/>
- <pathelement location="${argo.euml.dir}/lib/org.eclipse.emf.ecore_2.3.0.v200703080200.jar"/>
- <pathelement location="${argo.euml.dir}/lib/org.eclipse.emf.edit_2.3.0.v200706262000.jar"/>
- <pathelement location="${argo.euml.dir}/lib/org.eclipse.emf.mapping.ecore2xml_2.3.0.v200706262000.jar"/>
- <pathelement location="${argo.euml.dir}/lib/org.eclipse.uml2.common_1.3.0.v200703011358.jar"/>
- <pathelement location="${argo.euml.dir}/lib/org.eclipse.uml2.common.edit_1.3.0.v200706251652.jar"/>
- <pathelement location="${argo.euml.dir}/lib/org.eclipse.uml2.uml.resources_2.1.0.v200706251652.jar"/>
- <pathelement location="${argo.euml.dir}/lib/org.eclipse.uml2.uml_2.1.0.v200703011358.jar"/>
+ <path id="src.compile.classpath">
+ <fileset dir="lib">
+ <include name="*.jar"/>
+ </fileset>
+ <fileset dir="../infra/build/">
+ <include name="*.jar"/>
+ </fileset>
+ <fileset dir="../model/build/">
+ <include name="*.jar"/>
+ </fileset>
</path>
<!-- This runtime classpath is used for tests and other things started
from this file.
-->
- <path id="argo.runtime.classpath">
- <path refid="argo.compile.classpath"/>
+ <path id="src.run.classpath">
+ <path refid="src.compile.classpath"/>
<!-- only one of the following will be used at a time -->
<!-- we put them together because there's little risk of crosstalk -->
- <path refid="argo.mdr.runtime.classpath"/>
- <path refid="argo.euml.runtime.classpath"/>
+ <fileset dir="../model-mdr/build/">
+ <include name="*.jar"/>
+ </fileset>
+ <fileset dir="../model-euml/build/">
+ <include name="*.jar"/>
+ </fileset>
+ </path>
+
+ <path id="tests.compile.classpath">
+ <pathelement location="${build.classes}"/>
+ <pathelement location="../../tools/junit-3.8.2/junit.jar"/>
+ <pathelement location="../../tools/lib/easymock12.jar"/>
+ <pathelement location="../../tools/jdepend-2.9/lib/jdepend-2.9.jar"/>
+ <path refid="src.compile.classpath"/>
+ </path>
+
+ <path id="tests.run.classpath">
+ <path refid="tests.compile.classpath"/>
+ <fileset dir="../model-mdr/build/">
+ <include name="*.jar"/>
+ </fileset>
</path>
<!-- In order to use ant optional tasks which use jars that are not -->
@@ -210,49 +107,6 @@
value="${argo.build.version}-${DSTAMP}-${TSTAMP}"/>
<property name="version.package" value="org/argouml/application"/>
-
- <available classname="org.tigris.gef.base.Globals"
- classpathref="argo.compile.classpath"
- property="has.gef"/>
- <available classname="org.tigris.gef.util.Localizer"
- classpathref="argo.compile.classpath"
- property="has.gef.localizer"/>
- <available classname="org.apache.log4j.Category"
- classpathref="argo.compile.classpath"
- property="has.log4j"/>
- <available classname="org.apache.commons.logging.LogFactory"
- classpathref="argo.compile.classpath"
- property="has.commons-logging"/>
- <available classname="org.tigris.toolbar.ToolBar"
- classpathref="argo.compile.classpath"
- property="has.toolbar"/>
- <available classname="org.tigris.swidgets.FlexiGridLayout"
- classpathref="argo.compile.classpath"
- property="has.swidgets"/>
- <available classname="antlr.ANTLRException"
- classpathref="argo.compile.classpath"
- property="has.antlr"/>
-
- <!-- developer.lib.dir is the developer snapshot directory. -->
- <!-- If it is not set, it defaults to build.dir, and "build install" -->
- <!-- will not do anything. -->
- <property name="developer.lib.dir" value="${argo.build.dir}"/>
-
- <!-- developer.bin.dir is the developer snapshot directory. -->
- <!-- If it is not set, it defaults to argo.bin.dir, and -->
- <!-- "build install" will not do anything. -->
- <property name="developer.bin.dir" value="${argo.bin.dir}"/>
-
- <!-- Set of properties with fixed paths that we pass to subtasks -->
- <propertyset id="absolute-properties" dynamic="false">
- <propertyref name="argo.root.dir" />
- <propertyref name="argo.lib.dir" />
- <propertyref name="argo.tools.dir" />
- <propertyref name="argo.model.dir" />
- <propertyref name="argo.mdr.dir" />
- <propertyref name="argo.euml.dir" />
- </propertyset>
-
</target>
<!-- =================================================================== -->
@@ -280,8 +134,6 @@
</classpath>
</taskdef>
- <taskdef resource="checkstyletask.properties"
- classpath="${checkstyle.jar.path}"/>
</target>
@@ -297,45 +149,42 @@
<target name="prepare" depends="init,check-version">
<!-- create directories -->
<echo message="Preparing the build directories"/>
- <mkdir dir="${argo.build.dir}"/>
- <mkdir dir="${argo.build.dir}/ext"/>
- <mkdir dir="${argo.build.classes}"/>
+ <mkdir dir="${build.dir}"/>
+ <mkdir dir="${build.classes}"/>
- <copy todir="${argo.build.classes}/org/argouml/Images">
- <fileset dir="${argo.src.dir}/org/argouml/Images" excludes="CVS/**" includes="**/**"/>
+ <copy todir="${build.classes}/org/argouml/Images">
+ <fileset dir="src/org/argouml/Images" includes="**/**"/>
</copy>
- <copy todir="${argo.build.classes}/org/argouml/i18n">
- <fileset dir="${argo.src.dir}/org/argouml/i18n" includes="*.properties"/>
+ <copy todir="${build.classes}/org/argouml/i18n">
+ <fileset dir="src/org/argouml/i18n" includes="*.properties"/>
</copy>
- <copy todir="${argo.build.classes}/org/argouml/resource">
- <fileset dir="${argo.src.dir}/org/argouml/resource"
- excludes="CVS/**"
+ <copy todir="${build.classes}/org/argouml/resource">
+ <fileset dir="src/org/argouml/resource"
includes="**/**"/>
</copy>
<!-- this should copy across all .tee files, dtds and xslt for persistence mechanism -->
- <copy todir="${argo.build.classes}/org/argouml/persistence">
- <fileset dir="${argo.src.dir}/org/argouml/persistence"
- excludes="CVS/**"
+ <copy todir="${build.classes}/org/argouml/persistence">
+ <fileset dir="src/org/argouml/persistence"
includes="**/**"/>
</copy>
- <copy todir="${argo.build.classes}/org/argouml/profile/profiles">
- <fileset dir="${argo.src.dir}/org/argouml/profile/profiles"
+ <copy todir="${build.classes}/org/argouml/profile/profiles">
+ <fileset dir="src/org/argouml/profile/profiles"
includes="*.xmi,README.txt"/>
</copy>
<!-- The class that uses argo.ini was deprecated for 0.25.4. It can be
removed when that class is removed after the release of 0.26 -->
- <copy todir="${argo.build.classes}/org/argouml">
- <fileset dir="${argo.src.dir}/org/argouml"
+ <copy todir="${build.classes}/org/argouml">
+ <fileset dir="src/org/argouml"
includes="*argo.ini"/>
</copy>
<!-- copy test files -->
- <copy todir="${argo.tests.classes}/testmodels">
- <fileset dir="${argo.tests.src}/testmodels" excludes="CVS/**" includes="**/**"/>
+ <copy todir="${tests.classes}/testmodels">
+ <fileset dir="tests/testmodels" includes="**/**"/>
</copy>
</target>
@@ -348,16 +197,16 @@
<echo message="Generate parsers"/>
<uptodate property="parser1.is.current"
- targetfile="${argo.src.dir}/org/argouml/uml/reveng/java/JavaTokenTypes.txt">
- <srcfiles dir="${argo.src.dir}/org/argouml/uml/reveng/java">
+ targetfile="src/org/argouml/uml/reveng/java/JavaTokenTypes.txt">
+ <srcfiles dir="src/org/argouml/uml/reveng/java">
<include name="java.g"/>
</srcfiles>
</uptodate>
<antcall target="generateparser1"/>
<uptodate property="parser2.is.current"
- targetfile="${argo.src.dir}/org/argouml/language/java/generator/JavaTokenTypes.txt">
- <srcfiles dir="${argo.src.dir}/org/argouml/language/java/generator">
+ targetfile="src/org/argouml/language/java/generator/JavaTokenTypes.txt">
+ <srcfiles dir="src/org/argouml/language/java/generator">
<include name="java.g"/>
</srcfiles>
</uptodate>
@@ -367,43 +216,50 @@
<target name="generateparser1" unless="parser1.is.current" depends="init">
<delete>
- <fileset dir="org/argouml/uml/reveng/java">
+ <fileset dir="src/org/argouml/uml/reveng/java">
<include name="JavaTokenTypes.txt"/>
</fileset>
</delete>
- <echo message="Antlr classpath is ${antlrall.jar.path}"/>
- <java classname="antlr.Tool" classpath="${antlrall.jar.path}" fork="yes"
- maxmemory="32M">
+ <java classname="antlr.Tool"
+ fork="yes"
+ maxmemory="32M">
+ <classpath>
+ <path refid="antlr.run.classpath"/>
+ </classpath>
<arg value="-o"/>
- <arg file="${argo.src.dir}/org/argouml/uml/reveng/java"/>
- <arg file="${argo.src.dir}/org/argouml/uml/reveng/java/java.g"/>
+ <arg file="src/org/argouml/uml/reveng/java"/>
+ <arg file="src/org/argouml/uml/reveng/java/java.g"/>
</java>
</target>
<target name="generateparser2" unless="parser2.is.current" depends="init">
<delete>
- <fileset dir="org/argouml/language/java/generator">
+ <fileset dir="src/org/argouml/language/java/generator">
<include name="JavaTokenTypes.txt"/>
</fileset>
</delete>
- <java classname="antlr.Tool" classpath="${antlrall.jar.path}" fork="yes"
- maxmemory="32M">
+ <java classname="antlr.Tool"
+ fork="yes"
+ maxmemory="32M">
+ <classpath>
+ <path refid="antlr.run.classpath"/>
+ </classpath>
<arg value="-o"/>
- <arg file="${argo.src.dir}/org/argouml/language/java/generator"/>
- <arg file="${argo.src.dir}/org/argouml/language/java/generator/java.g"/>
+ <arg file="src/org/argouml/language/java/generator"/>
+ <arg file="src/org/argouml/language/java/generator/java.g"/>
</java>
</target>
<target name="cleanparser"
description="Clean up the antlr parsers.">
<delete>
- <fileset dir="org/argouml/uml/reveng/java">
+ <fileset dir="src/org/argouml/uml/reveng/java">
<include name="JavaLexer.java"/>
<include name="JavaRecognizer.java"/>
<include name="JavaTokenTypes.java"/>
<include name="JavaTokenTypes.txt"/>
</fileset>
- <fileset dir="org/argouml/language/java/generator">
+ <fileset dir="src/org/argouml/language/java/generator">
<include name="JavaLexer.java"/>
<include name="JavaRecognizer.java"/>
<include name="JavaTokenTypes.java"/>
@@ -413,245 +269,78 @@
</target>
<!-- =================================================================== -->
- <!-- Checks for necessary libraries and correct versions of libraries -->
- <!-- =================================================================== -->
-
- <target name="prerequisites"
- depends="prepare,check.swidgets,check.gef.localizer,check.gef,check.toolbar,check.log4j,check.antlr" >
- </target>
-
- <target depends="prepare" name="check.toolbar" unless="has.toolbar">
- <fail message="toolbar library does not appear to be in the classpath."/>
- </target>
-
- <target depends="prepare" name="check.swidgets" unless="has.swidgets">
- <fail message="swidgets library does not appear to be in the classpath."/>
- </target>
-
- <target depends="prepare" name="check.gef" unless="has.gef">
- <fail message="gef library does not appear to be in the classpath."/>
- </target>
-
- <target depends="prepare, check.commons-logging" name="check.log4j" unless="has.log4j">
- <fail message="log4j library does not appear to be in the classpath."/>
- </target>
-
- <target depends="prepare" name="check.commons-logging" unless="has.commons-logging">
- <fail message="commons-logging library does not appear to be in the classpath."/>
- </target>
-
- <target depends="prepare, check.gef" name="check.gef.localizer" unless="has.gef.localizer">
- <fail message="Please install a more recent version of the gef library (minimum 0.9.5)"/>
- </target>
-
- <target depends="prepare" name="check.antlr" unless="has.antlr">
- <fail message="antlrall library does not appear to be in the classpath."/>
- </target>
-
- <!-- =================================================================== -->
<!-- Updates the version source file if necessary -->
<!-- =================================================================== -->
<target name="check-version" depends="init">
<uptodate property="version.is.current"
- targetfile="${argo.src.dir}/${version.package}/ArgoVersion.java">
- <srcfiles dir="${argo.src.dir}/templates">
+ targetfile="src/${version.package}/ArgoVersion.java">
+ <srcfiles dir="src/templates">
<include name="ArgoVersion.template"/>
</srcfiles>
- <srcfiles dir="${argo.src.dir}">
+ <srcfiles dir="src">
<include name="default.properties"/>
<include name="build.properties"/>
</srcfiles>
</uptodate>
</target>
- <target depends="check-version" name="update-version" unless="version.is.current">
+ <target name="update-version" depends="check-version"
+ unless="version.is.current">
<echo message="Creating ArgoVersion.java for version ${argo.build.version}"/>
<filter token="ARGO_RELEASE_VERSION" value="${argo.build.version}"/>
- <copy file="${argo.src.dir}/templates/ArgoVersion.template" filtering="on"
- overwrite="on" tofile="${argo.src.dir}/${version.package}/ArgoVersion.java"/>
+ <copy file="src/templates/ArgoVersion.template"
+ filtering="on"
+ overwrite="on"
+ tofile="src/${version.package}/ArgoVersion.java"/>
</target>
<!-- =================================================================== -->
<!-- Compiles the source directory -->
<!-- =================================================================== -->
- <target name="build-model" depends="prepare">
- <echo message="Building Model API"/>
- <ant dir="${argo.model.dir}" inheritAll="false" target="install">
- <propertyset dynamic="false">
- <propertyset refid="absolute-properties"/>
- </propertyset>
- </ant>
- </target>
-
<target name="compile"
- depends="prepare,prerequisites,update-version,generateparser,build-model,build-mdr"
+ depends="prepare,update-version,generateparser"
description="Compile the sources.">
<echo message="Compiling the sources"/>
<javac debug="${debug}"
deprecation="${deprecation}"
- destdir="${argo.build.classes}"
+ destdir="${build.classes}"
includes="org/argouml/**/*.java"
excludes="org/argouml/model/uml/**"
optimize="${optimize}"
- srcdir="${argo.src.dir}"
+ srcdir="src"
source="1.5"
target="1.5">
<compilerarg compiler="javac1.5" line="-Xlint:unchecked"/>
<classpath>
- <path refid="argo.compile.classpath"/>
+ <path refid="src.compile.classpath"/>
</classpath>
</javac>
-
- <available file="${argo.tests.src}" type="dir" property="has.tests"/>
- <antcall target="compile-tests-if-there"/>
</target>
<!-- =================================================================== -->
- <!-- Creates the jar file -->
+ <!-- Copies the complete set of jar files to the build directory. -->
<!-- =================================================================== -->
<target name="jar" depends="compile"
description="Build the main jar file.">
<filter token="version" value="${argo.build.version}"/>
- <copy file="${argo.src.dir}/templates/manifest.template" filtering="on"
- overwrite="on" tofile="${argo.build.manifest}"/>
- <jar basedir="${argo.build.classes}" excludes="*.txt,*.bat,*.xml,*.sh"
- includes="org/argouml/**" jarfile="${argo.build.dir}/${name}.jar"
- manifest="${argo.build.manifest}"/>
- </target>
-
- <!-- =================================================================== -->
- <!-- Copies the complete set of jar files to the build directory. -->
- <!-- The purpose of this is to keep names here in synch with copied-to -->
- <!-- names in build and manifest.mf! -->
- <!-- =================================================================== -->
- <target name="package" depends="jar"
- description="Prepare all jar files, both built and just delivered.">
-
- <copy file="${antlrall.jar.path}" tofile="${argo.build.dir}/antlrall.jar"/>
- <copy file="${gef.jar.path}" tofile="${argo.build.dir}/gef.jar"/>
- <copy file="${log4j.jar.path}" tofile="${argo.build.dir}/log4j.jar"/>
- <copy file="${commons-logging.jar.path}" tofile="${argo.build.dir}/commons-logging.jar"/>
- <copy file="${swidgets.jar.path}" tofile="${argo.build.dir}/swidgets.jar"/>
- <copy file="${toolbar.jar.path}" tofile="${argo.build.dir}/toolbar.jar"/>
- <copy file="${ocl-argo.jar.path}" tofile="${argo.build.dir}/ocl-argo.jar"/>
- <!-- End of name synch area in this file. -->
-
- <copy file="${argo.src.dir}/README.txt" tofile="${argo.build.dir}/README.txt"/>
- <copy file="${argo.src.dir}/bin/argouml.sh" todir="${argo.build.dir}"/>
- <copy file="${argo.src.dir}/bin/argouml.bat" todir="${argo.build.dir}"/>
- </target>
-
-
- <!-- =================================================================== -->
- <!-- Prepares the Javadoc -->
- <!-- =================================================================== -->
- <target name="prepare-docs" depends="init, javadocs, javadocs-api"
- description="Build javadocs.">
- </target>
-
- <target name="javadocs" depends="init">
- <mkdir dir="${argo.javadocs.dir}"/>
-
- <javadoc author="${javadoc.author}"
- bottom="<table width='100%'><tr><td width='25%' align='left'>ArgoUML &copy; 1996-2006</td><td width='25%' align='center'><a href='http://argouml.tigris.org/' target='_blank'>ArgoUML Homepage</a></td><td width='25%' align='center'><a href='http://argouml.tigris.org/dev.html' target='_blank'>ArgoUML Developers' page</a></td><td width='25%' align='right'><a href='http://argouml.tigris.org/documentation/defaulthtml/cookbook/' target='_blank'>ArgoUML Cookbook</a></td></tr></table>"
- destdir="${argo.javadocs.dir}"
- maxmemory="128M"
- overview="org/argouml/overview-argo.html"
- packagenames="org.argouml.*"
- source="1.5"
- splitindex="${javadoc.splitindex}"
- use="${javadoc.use}"
- windowtitle="ArgoUML Javadoc for internal use">
- <sourcepath>
- <pathelement location="${argo.src.dir}"/>
- <pathelement location="${argo.src.dir}/../src/model/src"/>
- <pathelement location="${argo.src.dir}/../src/model-mdr/src"/>
- </sourcepath>
+ <copy file="src/templates/manifest.template" filtering="on"
+ overwrite="on"
+ tofile="${build.classes}/manifest.mf"/>
+ <jar basedir="${build.classes}"
+ excludes="*.txt,*.bat,*.xml,*.sh"
+ includes="org/argouml/**"
+ manifest="${build.classes}/manifest.mf"
+ jarfile="${build.dir}/${name}.jar" />
- <classpath>
- <path refid="argo.compile.classpath"/>
- </classpath>
-
- <!-- Links allow reference to external classes from within
- Argo javadocs
- -->
-
- <link href="${gef.javadoc.link}" offline="true"
- packagelistLoc="${gef.javadoc.packagelist}"/>
-
- <link href="${jdk.javadoc.link}" offline="true"
- packagelistLoc="${jdk.javadoc.packagelist}"/>
-
- <link href="${log4j.javadoc.link}" offline="true"
- packagelistLoc="${log4j.javadoc.packagelist}"/>
-
- <link href="${jmi.javadoc.link}" offline="true"
- packagelistLoc="${jmi.javadoc.packagelist}"/>
-
- <!-- Rest of the packages -->
-
- </javadoc>
-
- <copy todir="${argo.javadocs.dir}/org/argouml/doc-files">
- <fileset dir="${argo.src.dir}/org/argouml/doc-files" excludes="CVS/**" includes="**/**"/>
+ <copy todir="${build.dir}">
+ <fileset dir="lib" includes="*.jar"/>
</copy>
- </target>
-
-
- <target name="javadocs-api" depends="init">
- <mkdir dir="${argo.api.dir}"/>
-
- <!-- The package name list shall be the list of all the main packages for
- all subsystems that are available for modules.
- -->
- <javadoc author="${javadoc.author}"
- bottom="<table width='100%'><tr><td width='33%' align='left'>ArgoUML &copy; 1996-2006</td><td width='34%' align='center'><a href='http://argouml.tigris.org/' target='_blank'>ArgoUML Homepage</a></td><td width='33%' align='right'><a href='http://argouml.tigris.org/documentation/defaulthtml/cookbook/' target='_blank'>ArgoUML Cookbook</a></td></tr></table>"
- destdir="${argo.api.dir}"
- maxmemory="128M"
- overview="org/argouml/overview-api.html"
- packagenames="org.argouml.model,org.argouml.cognitive,org.argouml.uml.reveng,org.argouml.application,org.argouml.i18n,org.argouml.ui,org.argouml.ui.explorer,org.argouml.ocl,org.argouml.moduleloader"
- source="1.5"
- private="false"
- splitindex="${javadoc.splitindex}"
- use="${javadoc.use}"
- windowtitle="ArgoUML Javadoc for ArgoUML Module Developers">
- <sourcepath>
- <pathelement location="${argo.src.dir}"/>
- <pathelement location="${argo.src.dir}/../src/model/src"/>
- </sourcepath>
-
- <classpath>
- <path refid="argo.compile.classpath"/>
- </classpath>
-
- <!-- Links allow reference to external classes from within
- Argo javadocs
- -->
-
- <link href="${gef.javadoc.link}" offline="true"
- packagelistLoc="${gef.javadoc.packagelist}"/>
-
- <link href="${jdk.javadoc.link}" offline="true"
- packagelistLoc="${jdk.javadoc.packagelist}"/>
-
- <link href="${log4j.javadoc.link}" offline="true"
- packagelistLoc="${log4j.javadoc.packagelist}"/>
-
- <link href="${jmi.javadoc.link}" offline="true"
- packagelistLoc="${jmi.javadoc.packagelist}"/>
-
- <!-- Rest of the packages -->
-
- </javadoc>
-
- <copy todir="${argo.api.dir}/org/argouml/doc-files">
- <fileset dir="${argo.src.dir}/org/argouml/doc-files"
- excludes="CVS/**"
- includes="**/**"/>
- </copy>
+ <copy file="src/README.txt" tofile="${build.dir}/README.txt"/>
+ <copy file="src/bin/argouml.sh" todir="${build.dir}"/>
+ <copy file="src/bin/argouml.bat" todir="${build.dir}"/>
</target>
@@ -662,98 +351,13 @@
<target name="clean" depends="init"
description="Clean out all built files.">
- <ant dir="${argo.model.dir}" inheritAll="false" target="clean">
- <propertyset dynamic="false">
- <propertyset refid="absolute-properties"/>
- </propertyset>
- </ant>
- <ant dir="${argo.mdr.dir}" inheritAll="false" target="clean">
- <propertyset dynamic="false">
- <propertyset refid="absolute-properties"/>
- </propertyset>
- </ant>
- <ant dir="${argo.euml.dir}" inheritAll="false" target="clean">
- <propertyset dynamic="false">
- <propertyset refid="absolute-properties"/>
- </propertyset>
- </ant>
- <delete dir="${argo.build.dir}/tests"/>
- <delete dir="${argo.build.dir}/src_new"/>
- <delete dir="${argo.build.dir}/classes"/>
- <delete dir="${argo.build.dir}/bin"/>
- <delete file="${argo.src.dir}/${version.package}/ArgoVersion.java"/>
-
- <!-- TODO: Some of these are obsolete -->
- <delete>
- <fileset dir="${argo.build.dir}">
- <include name="*.jar"/>
- <include name="Fop.java"/>
- <include name="Fop.class"/>
- <include name="README.txt"/>
- <include name="argouml.sh"/>
- <include name="argouml.bat"/>
- </fileset>
- </delete>
+ <delete dir="${build.dir}"/>
+ <delete file="src/${version.package}/ArgoVersion.java"/>
<antcall target="cleanparser"/>
</target>
- <!-- =================================================================== -->
- <!-- Run ArgoUML from compiled sources -->
- <!-- =================================================================== -->
- <target name="run" depends="compile"
- description="Run the newly compiled ArgoUML.">
- <java classname="org.argouml.application.Main"
- fork="yes"
- taskname="argouml"
- maxmemory="500M">
- <sysproperty key="log4j.configuration"
- value="org/argouml/resource/error_console.lcf"/>
- <assertions>
- <enable/>
- </assertions>
- <classpath>
- <pathelement location="${argo.build.classes}"/>
- <path refid="argo.runtime.classpath"/>
- </classpath>
- </java>
- </target>
- <target name="debug" depends="compile"
- description="Run ArgoUML with debug level logging.">
- <java classname="org.argouml.application.Main"
- fork="yes"
- taskname="argouml"
- maxmemory="500M">
- <sysproperty key="log4j.configuration"
- value="org/argouml/resource/full_console.lcf"/>
- <assertions>
- <enable/>
- </assertions>
- <classpath>
- <pathelement location="${argo.build.classes}"/>
- <path refid="argo.runtime.classpath"/>
- </classpath>
- </java>
- </target>
-
- <target name="info" depends="compile"
- description="Run ArgoUML with info level logging.">
- <java classname="org.argouml.application.Main"
- fork="yes"
- taskname="argouml"
- maxmemory="500M">
- <sysproperty key="log4j.configuration"
- value="org/argouml/resource/info_console.lcf"/>
- <assertions>
- <enable/>
- </assertions>
- <classpath>
- <pathelement location="${argo.build.classes}"/>
- <path refid="argo.runtime.classpath"/>
- </classpath>
- </java>
- </target>
<!-- ################################################################### -->
<!-- Section with tests. -->
@@ -767,7 +371,7 @@
<target name="compile-tests" depends="prepare">
<!-- create directories -->
- <mkdir dir="${argo.tests.classes}"/>
+ <mkdir dir="${tests.classes}"/>
<!-- There are classes/test that actually test deprecated methods. -->
<!-- They are listed here. -->
@@ -775,19 +379,15 @@
<javac debug="true"
deprecation="false"
optimize="false"
- destdir="${argo.tests.classes}"
+ destdir="${tests.classes}"
includes="**/GUITestProjectBrowser.java,**/MockUMLUserInterfaceContainer,**/*Deprecated.java"
excludes="org/argouml/model/uml/**"
- srcdir="${argo.tests.src}"
+ srcdir="tests"
source="1.5"
target="1.5">
<compilerarg compiler="javac1.5" line="-Xlint:unchecked"/>
<classpath>
- <pathelement location="${argo.build.classes}"/>
- <pathelement location="${junit.jar.path}"/>
- <pathelement location="${easymock.jar.path}"/>
- <pathelement location="${jdepend.jar.path}"/>
- <path refid="argo.compile.classpath"/>
+ <path refid="tests.compile.classpath"/>
</classpath>
</javac>
@@ -795,8 +395,8 @@
<javac debug="true"
deprecation="${deprecation}"
optimize="false"
- destdir="${argo.tests.classes}"
- srcdir="${argo.tests.src}"
+ destdir="${tests.classes}"
+ srcdir="tests"
includes="org/argouml/uml/reveng/TestJavaImportUnicode.java"
excludes="org/argouml/model/uml/**"
encoding="iso8859-1"
@@ -804,11 +404,7 @@
target="1.5">
<compilerarg compiler="javac1.5" line="-Xlint:unchecked"/>
<classpath>
- <pathelement location="${argo.build.classes}"/>
- <pathelement location="${junit.jar.path}"/>
- <pathelement location="${easymock.jar.path}"/>
- <pathelement location="${jdepend.jar.path}"/>
- <path refid="argo.compile.classpath"/>
+ <path refid="tests.compile.classpath"/>
</classpath>
</javac>
@@ -816,36 +412,28 @@
<javac debug="true"
deprecation="${deprecation}"
optimize="false"
- destdir="${argo.tests.classes}"
- srcdir="${argo.tests.src}"
+ destdir="${tests.classes}"
+ srcdir="tests"
excludes="org/argouml/model/uml/**"
source="1.5"
target="1.5">
<compilerarg compiler="javac1.5" line="-Xlint:unchecked"/>
<classpath>
- <pathelement location="${argo.build.classes}"/>
- <pathelement location="${junit.jar.path}"/>
- <pathelement location="${easymock.jar.path}"/>
- <pathelement location="${jdepend.jar.path}"/>
- <path refid="argo.compile.classpath"/>
+ <path refid="tests.compile.classpath"/>
</classpath>
</javac>
</target>
- <target name="compile-tests-if-there" if="has.tests">
- <antcall target="compile-tests"/>
- </target>
-
<!-- =================================================================== -->
<!-- Prepare for the junit tests. -->
<!-- =================================================================== -->
- <target depends="compile-tests" name="junit-setup"/>
+ <target name="junit-setup" depends="compile-tests"/>
<target name="junit-report-clean">
- <mkdir dir="${argo.tests.reports}/junit/output"/>
- <mkdir dir="${argo.tests.reports}/junit/output/html"/>
+ <mkdir dir="${tests.reports}"/>
+ <mkdir dir="${tests.reports}/html"/>
<delete>
- <fileset dir="${argo.tests.reports}/junit/output">
+ <fileset dir="${tests.reports}">
<include name="TEST-*.xml"/>
<include name="TEST-*.txt"/>
</fileset>
@@ -853,47 +441,16 @@
</target>
<target name="junit-report-create">
- <junitreport todir="${argo.tests.reports}/junit/output">
- <fileset dir="${argo.tests.reports}/junit/output">
+ <junitreport todir="${tests.reports}">
+ <fileset dir="${tests.reports}">
<include name="TEST-*.xml"/>
</fileset>
- <report format="frames" todir="${argo.tests.reports}/junit/output/html"/>
+ <report format="frames" todir="${tests.reports}/html"/>
</junitreport>
</target>
<!-- =================================================================== -->
- <!-- Build MDR library - internal target which calls argouml-mdr build. -->
- <!-- =================================================================== -->
- <target name="build-mdr" depends="init,build-model">
- <!-- We build unconditionally because only the MDR build itself knows if
- everything is up to date -->
- <echo message="=== Calling MDR build ==="/>
- <copy file="${log4j.jar.path}" tofile="${argo.build.dir}/log4j.jar"/>
- <ant dir="${argo.mdr.dir}" target="install" inheritAll="false" >
- <propertyset dynamic="false">
- <propertyset refid="absolute-properties"/>
- </propertyset>
- </ant>
- </target>
-
- <!-- =================================================================== -->
- <!-- Build Eclipse UML2 library - internal target which calls argouml-euml build. -->
- <!-- =================================================================== -->
- <target name="build-euml" depends="init,build-model"
- description="Build eUML model subsystem - not built by default">
- <!-- We build unconditionally because only the eUML build itself knows if
- everything is up to date -->
- <echo message="=== Calling eUML build ==="/>
- <copy file="${log4j.jar.path}" tofile="${argo.build.dir}/log4j.jar"/>
- <ant dir="${argo.euml.dir}" target="install" inheritAll="false" >
- <propertyset dynamic="false">
- <propertyset refid="absolute-properties"/>
- </propertyset>
- </ant>
- </target>
-
- <!-- =================================================================== -->
<!-- Run the junit tests. -->
<!-- =================================================================== -->
<target name="tests-dont-fail"
@@ -905,26 +462,23 @@
haltonfailure="false"
maxmemory="48M" printsummary="${junit.printsummary}">
<sysproperty key="test.model.uml"
- value="${argo.mdr.dir}/src/org/argouml/model/mdr/mof/01-02-15.xml"/>
+ value="../model-mdr/src/org/argouml/model/mdr/mof/01-02-15.xml"/>
<sysproperty key="argouml.model.implementation"
value="${test.model.implementation}"/>
<sysproperty key="log4j.configuration" value="org/argouml/resource/default.lcf"/>
<sysproperty key="java.awt.headless" value="true"/>
- <sysproperty key="argouml.tests.dir" value="${argo.tests.src}"/>
+ <sysproperty key="argouml.tests.dir" value="tests"/>
<assertions>
<enable/>
</assertions>
<classpath>
- <path refid="ant.optional.classpath"/>
- <pathelement location="${argo.build.classes}"/>
- <pathelement location="${argo.tests.classes}"/>
- <path refid="argo.runtime.classpath"/>
- <pathelement location="${easymock.jar.path}"/>
- <pathelement location="${jdepend.jar.path}"/>
+ <pathelement location="${build.classes}"/>
+ <pathelement location="${tests.classes}"/>
+ <path refid="tests.run.classpath"/>
</classpath>
<formatter type="xml"/>
- <batchtest todir="${argo.tests.reports}/junit/output">
- <fileset dir="${argo.tests.src}">
+ <batchtest todir="${tests.reports}">
+ <fileset dir="tests">
<include name="org/argouml/**/Test*.java"/>
</fileset>
</batchtest>
@@ -952,20 +506,18 @@
haltonfailure="false"
maxmemory="160M" printsummary="${junit.printsummary}">
<sysproperty key="log4j.configuration" value="org/argouml/resource/default.lcf"/>
- <sysproperty key="argouml.tests.dir" value="${argo.tests.src}"/>
+ <sysproperty key="argouml.tests.dir" value="tests"/>
<assertions>
<enable/>
</assertions>
<classpath>
- <path refid="ant.optional.classpath"/>
- <pathelement location="${argo.build.classes}"/>
- <pathelement location="${argo.tests.classes}"/>
- <path refid="argo.runtime.classpath"/>
- <pathelement location="${easymock.jar.path}"/>
+ <pathelement location="${build.classes}"/>
+ <pathelement location="${tests.classes}"/>
+ <path refid="tests.run.classpath"/>
</classpath>
<formatter type="xml"/>
- <batchtest todir="${argo.tests.reports}/junit/output">
- <fileset dir="${argo.tests.src}">
+ <batchtest todir="${tests.reports}">
+ <fileset dir="tests">
<include name="org/argouml/**/GUITest*.java"/>
</fileset>
</batchtest>
@@ -991,8 +543,8 @@
<enable/>
</assertions>
<classpath>
- <pathelement location="${argo.build.classes}"/>
- <path refid="argo.runtime.classpath"/>
+ <pathelement location="${build.classes}"/>
+ <path refid="src.run.classpath"/>
</classpath>
<arg value="-batch"/>
</java>
@@ -1004,8 +556,8 @@
<enable/>
</assertions>
<classpath>
- <pathelement location="${argo.build.classes}"/>
- <path refid="argo.runtime.classpath"/>
+ <pathelement location="${build.classes}"/>
+ <path refid="src.run.classpath"/>
</classpath>
<arg value="-nosplash"/>
<arg value="-batch"/>
@@ -1032,226 +584,15 @@
<enable/>
</assertions>
<classpath>
- <pathelement location="${argo.build.dir}/argo_junit_tests.jar"/>
- <pathelement location="${argo.tests.classes}"/>
- <pathelement location="${argo.build.classes}"/>
+ <pathelement location="${build.dir}/argo_junit_tests.jar"/>
+ <pathelement location="${tests.classes}"/>
+ <pathelement location="${build.classes}"/>
<pathelement location="${junit.jar.path}"/>
<pathelement location="${easymock.jar.path}"/>
- <path refid="argo.runtime.classpath"/>
+ <path refid="src.run.classpath"/>
</classpath>
</java>
</target>
-
-
- <!-- ################################################################### -->
- <!-- Section with static analysis things. -->
- <!-- ################################################################### -->
-
- <!-- =================================================================== -->
- <!-- Perform JDepend to find about the structure in ArgoUML. -->
- <!-- =================================================================== -->
- <target name="jdepend" depends="init, ant.optional.init"
- description="Run jdepend to report static metrics.">
- <echo>
-CC - Concrete Class Count
-AC - Abstract Class (and Interface) Count
-Ca - Afferent Couplings (Ca)
-Ce - Efferent Couplings (Ce)
-A - Abstractness (0-1)
-I - Instability (0-1)
-D - Distance from the Main Sequence (0-1)
-Cyclic - If the package contains a dependency cycle
-
-For details see http://www.clarkware.com/software/JDepend.html.
- </echo>
- <java classname="jdepend.swingui.JDepend" failonerror="true" fork="true">
- <arg value="."/>
- <classpath>
- <path refid="ant.optional.classpath"/>
- </classpath>
- </java>
- </target>
-
-
- <!-- =================================================================== -->
- <!-- Perform javasrc to find about the structure in ArgoUML. -->
- <!-- =================================================================== -->
- <target name="javasrc" depends="init"
- description="Run javasrc on the source.">
- <java classname="javasrc.app.Pass1" failonerror="true" fork="true">
- <sysproperty key="recursive" value="yes"/>
- <sysproperty key="title" value="JavaSrc for ArgoUML"/>
- <sysproperty key="outdir" value="../build/javasrc"/>
- <sysproperty key="verbose" value="yes"/>
- <classpath>
- <pathelement location="${javasrc.jar.path}"/>
- <pathelement location="${antlrall.jar.path}"/>
- </classpath>
- <arg value="."/>
- </java>
- <java classname="javasrc.app.Pass2" failonerror="true" fork="true">
- <sysproperty key="recursive" value="yes"/>
- <sysproperty key="title" value="JavaSrc for ArgoUML"/>
- <sysproperty key="outdir" value="../build/javasrc"/>
- <sysproperty key="verbose" value="yes"/>
- <classpath>
- <pathelement location="${javasrc.jar.path}"/>
- <pathelement location="${antlrall.jar.path}"/>
- </classpath>
- <arg value="../build/javasrc"/>
- </java>
- </target>
-
-
- <!-- =================================================================== -->
- <!-- Runs checkstyle to find style problems in ArgoUML. -->
- <!-- =================================================================== -->
-
- <target name="checkstyle"
- description="Run Checkstyle on all sources (xml report)"
- depends="ant.optional.init">
-
- <echo>
- Running checkstyle on ${source.dir}.
- </echo>
-
- <property name="checkstyle.reports.dir" value="${argo.tests.reports}/checkstyle"/>
- <mkdir dir="${checkstyle.reports.dir}" />
- <delete>
- <fileset dir="${checkstyle.reports.dir}">
- <include name="*.xml" />
- </fileset>
- </delete>
-
- <checkstyle config="${argo.tools.dir}/checkstyle/checkstyle_argouml.xml">
- <property key="checkstyle.header.file"
- value="${argo.tools.dir}/checkstyle/java.header" />
- <formatter type="xml" toFile="${checkstyle.reports.dir}/checkstyle-report.xml" />
- <fileset dir="${argo.src.dir}/org" includes="**/*.java">
- <exclude name="**/JavaLexer.java" />
- <exclude name="**/JavaRecognizer.java" />
- <exclude name="**/JavaTokenTypes.java" />
- </fileset>
- </checkstyle>
-
- <!--
- <fileset dir="${argo.model.dir}/src" includes="**/*.java"/>
- <fileset dir="${argo.mdr.dir}/src" includes="**/*.java"/>
- <fileset dir="${argo.tests.dir}" includes="**/*.java"/>
- <fileset dir="../modules/classfile/src/org/argouml/uml/reveng/classfile">
- <exclude name="ClassfileParser.java" />
- <exclude name="ClassfileParserTokenTypes.java" />
- <exclude name="ClassfileTokenTypes.java" />
- <exclude name="ClassfileTreeParser.java" />
- </fileset>
- <fileset dir="../modules/cpp/src/org/argouml/language/cpp/reveng">
- <exclude name="CPPLexer.java" />
- <exclude name="CPPParser.java" />
- <exclude name="STDCTokenTypes.java" />
- </fileset>
- -->
-
- </target>
-
- <target name="pmd-init" depends="ant.optional.init">
- <taskdef name="pmd" classname="net.sourceforge.pmd.ant.PMDTask" classpath="${pmd.jar.path}"/>
- <taskdef name="cpd" classname="net.sourceforge.pmd.cpd.CPDTask" classpath="${pmd.jar.path}"/>
- <property name="pmd.reports.dir" value="${argo.tests.reports}/pmd"/>
- <mkdir dir="${pmd.reports.dir}"/>
- </target>
-
- <target name="pmd" depends="pmd-init">
-
- <delete>
- <fileset dir="${pmd.reports.dir}">
- <include name="*.xml, *.htm*"/>
- </fileset>
- </delete>
-
- <pmd shortFilenames="true">
- <ruleset>rulesets/favorites.xml</ruleset>
- <ruleset>basic</ruleset>
- <formatter type="html" toFile="${pmd.reports.dir}/pmd-report.html"
- linkPrefix="http://pmd.sourceforge.net/xref/"/>
- <fileset dir="${argo.src.dir}/org" includes="**/*.java">
- <exclude name="**/JavaLexer.java"/>
- <exclude name="**/JavaRecognizer.java"/>
- <exclude name="**/JavaTokenTypes.java"/>
- </fileset>
- </pmd>
- </target>
-
- <target name="cpd" depends="pmd-init">
- <property name="cpd.report.file" value="${pmd.reports.dir}/cpd-report"/>
-
- <mkdir dir="${pmd.reports.dir}"/>
- <delete file="${cpd.report.file}.*"/>
- <cpd minimumTokenCount="100" outputFile="${cpd.report.file}.xml"
- format="xml" encoding="UTF-8">
- <fileset dir="${argo.src.dir}">
- <include name="**/*.java"/>
- <exclude name="**/JavaLexer.java"/>
- <exclude name="**/JavaRecognizer.java"/>
- <exclude name="**/JavaTokenTypes.java"/>
- </fileset>
- </cpd>
-
- <xslt in="${cpd.report.file}.xml" style="${pmd.xslt.path}/cpdhtml.xslt"
- out="${cpd.report.file}.html"/>
-
- </target>
-
- <!-- Internal target to aggregate tasks for CruiseControl -->
- <target name="cruisecontrol" depends="tests,checkstyle" />
-
- <!-- ################################################################### -->
- <!-- Section with temporary targets and experiments. -->
- <!-- ################################################################### -->
-
- <!-- =================================================================== -->
- <!-- Finds undeclared tags in the code. -->
- <!-- Unluckily Linus doesn't know how to write this in a -->
- <!-- platform-independant way (i.e. with just ant-calls) so it will only -->
- <!-- be working for unix/shell enabled platforms. If you know how to -->
- <!-- solve this within ant, please go ahead. -->
- <!-- =================================================================== -->
-
- <target name="find-undeclared-tags"
- description="Scans through all source files and find all tags that are not in the corresponding properties files.">
- <exec executable="sh">
- <arg value="-c"/>
- <arg value="../tools/bin/i18n-find-undeclared-tags.sh"/>
- </exec>
- </target>
-
- <!-- =================================================================== -->
- <!-- Runs Classycle to find cyclic dependencies in ArgoUML. -->
- <!-- =================================================================== -->
- <target name="classycle" depends="compile"
- description="Analyze sources for cyclic dependencies using Classcycle">
- <echo>
- Running classcyle on ${source.dir}.
- </echo>
- <property name="classycle.output" value="${argo.build.dir}/classycle"/>
- <property name="classycle.dir" value="${argo.tools.dir}/Classycle"/>
- <mkdir dir="${classycle.output}"/>
- <java jar="${classycle.dir}/classycle.jar" failonerror="false"
- fork="true" maxmemory="32M">
- <arg value="-mergeInnerClasses"/>
- <arg value="-includingClasses=org.argouml.*"/>
- <arg value="-excludingClasses=java.*,javax.*"/>
- <arg value="-xmlFile=${classycle.output}/argouml-classcycles.xml"/>
- <arg value="-title=ArgoUML-${argo.build.version}"/>
- <arg value="${argo.build.classes}"/>
- </java>
- <copy todir="${classycle.output}">
- <fileset dir="${classycle.dir}">
- <include name="*.xsl"/>
- <include name="images/**"/>
- </fileset>
- </copy>
- </target>
-
</project>
<!-- End of file -->
Copied: trunk/src/app/default.properties (from r14091, /trunk/src_new/default.properties)
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/app/default.properties?view=diff&rev=14094&p1=/trunk/src_new/default.properties&p2=trunk/src/app/default.properties&r1=14091&r2=14094
==============================================================================
--- /trunk/src_new/default.properties (original)
+++ trunk/src/app/default.properties 2008-02-09 06:30:05-0800
@@ -30,97 +30,3 @@
#junit.printsummary=withOutAndErr
#
test.model.implementation=org.argouml.model.mdr.MDRModelImplementation
-#
-# Directory locations
-#
-# Do NOT set argo.root.dir here - it will be set by build.xml if not
-# set in one of the user's property files. It should be set to an absolute
-# path so that it works for subcomponent builds.
-#
-argo.tools.dir=${argo.root.dir}/tools
-argo.model.dir=${argo.root.dir}/src/model
-argo.mdr.dir=${argo.root.dir}/src/model-mdr
-argo.euml.dir=${argo.root.dir}/src/model-euml
-argo.tests.src=${argo.root.dir}/tests
-argo.lib.dir=${argo.root.dir}/lib
-argo.src.dir=${argo.root.dir}/src_new
-#
-argo.build.dir=${argo.root.dir}/build
-argo.tools.lib=${argo.tools.dir}/lib
-#
-argo.tests.dir=${argo.build.dir}/tests
-argo.tests.classes=${argo.tests.dir}/classes
-argo.tests.reports=${argo.tests.dir}/reports
-#
-# Build directory locations
-#
-argo.build.classes=${argo.build.dir}/classes
-argo.bin.dir=${argo.build.dir}/bin
-argo.javadocs.dir=${argo.build.dir}/javadocs/
-argo.api.dir=${argo.build.dir}/api/
-#
-# TODO: Move this back into the build.xml file
-#
-argo.build.manifest=${argo.build.classes}/${argo.manifest.name}
-#
-# Source directory locations
-#
-argo.bin.src=${argo.src.dir}/bin
-#
-# argo.manifest.src=${argo.src.dir}/org/${argo.manifest.name}
-#
-# Tools directory locations (redundant)
-# TODO: Remove this and use other definition
-argo.tools.lib.dir=${argo.tools.lib}
-#
-# Docbook directory locations
-#
-argo.docbook.dir=${argo.root.dir}/documentation/docbook-setup
-#
-# javadoc properties
-#
-javadoc.use=true
-javadoc.splitindex=true
-javadoc.author=false
-#
-# javadoc link properties
-# The defaults point to known on-line locations
-#
-jdk.javadoc.link=http://java.sun.com/j2se/1.5.0/docs/api
-jdk.javadoc.packagelist=../lib/javadocs/j2se150
-log4j.javadoc.link=http://jakarta.apache.org/log4j/docs/api
-log4j.javadoc.packagelist=../lib/javadocs/log4j
-xerces.javadoc.link=http://xml.apache.org/xerces-j/apiDocs
-xerces.javadoc.packagelist=../lib/javadocs/xerces
-xalan.javadoc.link=http://xml.apache.org/xalan-j/apiDocs
-xalan.javadoc.packagelist=../lib/javadocs/xalan
-jmi.javadoc.link=http://java.sun.com/products/jmi/jmi-1_0-fr-doc/
-jmi.javadoc.packagelist=../lib/javadocs/jmi
-gef.javadoc.link=http://gef.tigris.org/nonav/api/current
-gef.javadoc.packagelist=../lib/javadocs/gef
-
-#
-# The following paths can be overridden in build.properties
-# to point to a set of shared jar files to minimize file duplication
-#
-# JARs from Argo lib directory
-#
-antlrall.jar.path=${argo.lib.dir}/antlrall-2.7.2.jar
-commons-logging.jar.path=${argo.lib.dir}/commons-logging-1.0.2.jar
-gef.jar.path=${argo.lib.dir}/gef-0.12.4BETA.jar
-log4j.jar.path=${argo.lib.dir}/log4j-1.2.6.jar
-ocl-argo.jar.path=${argo.lib.dir}/ocl-argo-1.1.jar
-swidgets.jar.path=${argo.lib.dir}/swidgets-0.1.4.jar
-toolbar.jar.path=${argo.lib.dir}/toolbar-1.4.jar
-#
-# JARs from tools directory
-#
-checkstyle.jar.path=${argo.tools.dir}/checkstyle-4.3/checkstyle-all-4.3.jar
-javasrc.jar.path=${argo.tools.lib.dir}/javasrc-2001-beta.jar
-jdepend.jar.path=${argo.tools.dir}/jdepend-2.9/lib/jdepend-2.9.jar
-junit.jar.path=${argo.tools.dir}/junit-3.8.2/junit.jar
-#junit.jar.path=${argo.tools.dir}/junit-4.2/junit.jar
-easymock.jar.path=${argo.tools.dir}/lib/easymock12.jar
-pmd.dir=${argo.tools.dir}/pmd-4.0
-pmd.jar.path=${pmd.dir}/lib/pmd-4.0.jar
-pmd.xslt.path=${pmd.dir}/etc/xslt
Modified: trunk/src/app/src/org/argouml/application/events/ArgoDiagramAppearanceEventListener.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/app/src/org/argouml/application/events/ArgoDiagramAppearanceEventListener.java?view=diff&rev=14094&p1=/trunk/src_new/org/argouml/application/events/ArgoDiagramAppearanceEventListener.java&p2=trunk/src/app/src/org/argouml/application/events/ArgoDiagramAppearanceEventListener.java&r1=14091&r2=14094
==============================================================================
--- /trunk/src_new/org/argouml/application/events/ArgoDiagramAppearanceEventListener.java (original)
+++ trunk/src/app/src/org/argouml/application/events/ArgoDiagramAppearanceEventListener.java 2008-02-09 06:30:05-0800
@@ -1,43 +1,43 @@
-// $Id: ArgoDiagramAppearanceEventListener.java 13439 2007-08-24 14:48:08Z mvw $
-// Copyright (c) 2007 The Regents of the University of California. All
-// Rights Reserved. Permission to use, copy, modify, and distribute this
-// software and its documentation without fee, and without a written
-// agreement is hereby granted, provided that the above copyright notice
-// and this paragraph appear in all copies. This software program and
-// documentation are copyrighted by The Regents of the University of
-// California. The software program and documentation are supplied "AS
-// IS", without any accompanying services from The Regents. The Regents
-// does not warrant that the operation of the program will be
-// uninterrupted or error-free. The end-user understands that the program
-// was developed for research purposes and is advised not to rely
-// exclusively on the program for any reason. IN NO EVENT SHALL THE
-// UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
-// SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,
-// ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
-// THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
-// SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY
-// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
-// PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
-// CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,
-// UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
-
-package org.argouml.application.events;
-import org.argouml.application.api.ArgoEventListener;
-
-/**
- * An interface that objects interested in ArgoDiagramAppearanceEvent
- * notifications must extend.
- *
- * @author Aleksandar
- */
-
-public interface ArgoDiagramAppearanceEventListener extends ArgoEventListener {
-
- /**
- * Invoked when any aspect of the notation has been changed.
- * @param e <code>ArgoNotationEvent</code> describing the change.
- */
- public void diagramFontChanged(ArgoDiagramAppearanceEvent e);
-}
-
+// $Id$
+// Copyright (c) 2007 The Regents of the University of California. All
+// Rights Reserved. Permission to use, copy, modify, and distribute this
+// software and its documentation without fee, and without a written
+// agreement is hereby granted, provided that the above copyright notice
+// and this paragraph appear in all copies. This software program and
+// documentation are copyrighted by The Regents of the University of
+// California. The software program and documentation are supplied "AS
+// IS", without any accompanying services from The Regents. The Regents
+// does not warrant that the operation of the program will be
+// uninterrupted or error-free. The end-user understands that the program
+// was developed for research purposes and is advised not to rely
+// exclusively on the program for any reason. IN NO EVENT SHALL THE
+// UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
+// SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,
+// ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
+// THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
+// SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY
+// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
+// PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
+// CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,
+// UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
+
+package org.argouml.application.events;
+import org.argouml.application.api.ArgoEventListener;
+
+/**
+ * An interface that objects interested in ArgoDiagramAppearanceEvent
+ * notifications must extend.
+ *
+ * @author Aleksandar
+ */
+
+public interface ArgoDiagramAppearanceEventListener extends ArgoEventListener {
+
+ /**
+ * Invoked when any aspect of the notation has been changed.
+ * @param e <code>ArgoNotationEvent</code> describing the change.
+ */
+ public void diagramFontChanged(ArgoDiagramAppearanceEvent e);
+}
+
Modified: trunk/src/app/src/org/argouml/cognitive/Highlightable.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/app/src/org/argouml/cognitive/Highlightable.java?view=diff&rev=14094&p1=/trunk/src_new/org/argouml/cognitive/Highlightable.java&p2=trunk/src/app/src/org/argouml/cognitive/Highlightable.java&r1=14091&r2=14094
==============================================================================
--- /trunk/src_new/org/argouml/cognitive/Highlightable.java (original)
+++ trunk/src/app/src/org/argouml/cognitive/Highlightable.java 2008-02-09 06:30:05-0800
@@ -1,4 +1,4 @@
-// $Id:$
+// $Id$
// Copyright (c) 1996-99 The Regents of the University of California. All
// Rights Reserved. Permission to use, copy, modify, and distribute this
// software and its documentation without fee, and without a written
Copied: trunk/src/build.xml (from r14091, /trunk/src_new/build.xml)
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/build.xml?view=diff&rev=14094&p1=/trunk/src_new/build.xml&p2=trunk/src/build.xml&r1=14091&r2=14094
==============================================================================
--- /trunk/src_new/build.xml (original)
+++ trunk/src/build.xml 2008-02-09 06:30:05-0800
@@ -42,15 +42,30 @@
Refer to the Ant documentation and this file for other settings.
-Compilation instructions for ArgoUML
-====================================
-If you want to compile ArgoUML, you need to have following:
-- JAVA_HOME correctly set to where Java2 jdk is installed
-- the additional libraries (ocl-argo.jar, log4j.jar,
- gef.jar, antlrall.jar, toolbar.jar, swidgets.jar) in argouml/lib
- when these are right the command
- build compile
- will do the job.
+Roles of the different build.xml files
+======================================
+There is a build.xml for each subsystem i.e. in each subdirectory.
+They each have the following targets:
+ jar - to build everything and move all created and exported jars
+ to subdir/build
+ clean - to remove subdir/build
+ tests (optional) - to run all tests
+ compile, compile-tests (optional) (local to build.xml and used by
+ tests, and jar)
+The jar and tests target rely on the contents of subdir/build for other
+subdirectories i.e. they depend on jars exported from other subsystems.
+Circular dependencies is not allowed. This build.xml contains an ordered
+list defining in what order they are built (using the jar target). This
+order must be working with the dependencies set up in every
+subdir/build.xml.
+
+Paths are resolved by specifying every jar in subdir/build to avoid
+maintaining name changes of jars throughout the build.xml-files.
+
+This files is not used by the Eclipse setup. When building in Eclipse,
+the project dependencies are used and Eclipse will take care of the
+order. The subdir/build.xml files are used by the Eclipse setup.
+
-->
<project basedir="." default="compile" name="argouml">
@@ -64,6 +79,7 @@
<!-- Convenience target for locating property files. -->
<!-- =================================================================== -->
+ <!-- TODO: This target is not yet tested with the new structure. -->
<target name="list-property-files" depends="init"
description="List the property files read by the build.">
@@ -129,8 +145,6 @@
<format pattern="yyyy" property="year"/>
</tstamp>
- <property name="argo.dist.dir" value="../DIST"/>
-
<property name="local.build.properties" value="build.properties"/>
<property name="user.build.properties"
value="${user.home}/argouml.build.properties"/>
@@ -206,33 +220,8 @@
<property name="argo.build.version" value="${argo.core.version}"/>
- <property name="argo.timestamp.version"
- value="${argo.build.version}-${DSTAMP}-${TSTAMP}"/>
-
<property name="version.package" value="org/argouml/application"/>
- <available classname="org.tigris.gef.base.Globals"
- classpathref="argo.compile.classpath"
- property="has.gef"/>
- <available classname="org.tigris.gef.util.Localizer"
- classpathref="argo.compile.classpath"
- property="has.gef.localizer"/>
- <available classname="org.apache.log4j.Category"
- classpathref="argo.compile.classpath"
- property="has.log4j"/>
- <available classname="org.apache.commons.logging.LogFactory"
- classpathref="argo.compile.classpath"
- property="has.commons-logging"/>
- <available classname="org.tigris.toolbar.ToolBar"
- classpathref="argo.compile.classpath"
- property="has.toolbar"/>
- <available classname="org.tigris.swidgets.FlexiGridLayout"
- classpathref="argo.compile.classpath"
- property="has.swidgets"/>
- <available classname="antlr.ANTLRException"
- classpathref="argo.compile.classpath"
- property="has.antlr"/>
-
<!-- developer.lib.dir is the developer snapshot directory. -->
<!-- If it is not set, it defaults to build.dir, and "build install" -->
<!-- will not do anything. -->
@@ -258,6 +247,7 @@
<!-- =================================================================== -->
<!-- Initialization target for optional ant tasks -->
<!-- =================================================================== -->
+ <!-- TODO: This target is not yet tested with the new structure. -->
<target name="ant.optional.init" depends="init">
<path id="ant.optional.classpath">
<pathelement location="${ant.home}/libopt/ant-junit.jar"/>
@@ -285,268 +275,80 @@
</target>
- <!-- Note this file can only make Ant display values set in the
- file correctly, but external values in the environment or
- properties file will be operational.
- -->
-
- <!-- =================================================================== -->
- <!-- Prepares the build directory -->
- <!-- =================================================================== -->
-
- <target name="prepare" depends="init,check-version">
- <!-- create directories -->
- <echo message="Preparing the build directories"/>
- <mkdir dir="${argo.build.dir}"/>
- <mkdir dir="${argo.build.dir}/ext"/>
- <mkdir dir="${argo.build.classes}"/>
-
- <copy todir="${argo.build.classes}/org/argouml/Images">
- <fileset dir="${argo.src.dir}/org/argouml/Images" excludes="CVS/**" includes="**/**"/>
- </copy>
-
- <copy todir="${argo.build.classes}/org/argouml/i18n">
- <fileset dir="${argo.src.dir}/org/argouml/i18n" includes="*.properties"/>
- </copy>
-
- <copy todir="${argo.build.classes}/org/argouml/resource">
- <fileset dir="${argo.src.dir}/org/argouml/resource"
- excludes="CVS/**"
- includes="**/**"/>
- </copy>
- <!-- this should copy across all .tee files, dtds and xslt for persistence mechanism -->
- <copy todir="${argo.build.classes}/org/argouml/persistence">
- <fileset dir="${argo.src.dir}/org/argouml/persistence"
- excludes="CVS/**"
- includes="**/**"/>
- </copy>
-
- <copy todir="${argo.build.classes}/org/argouml/profile/profiles">
- <fileset dir="${argo.src.dir}/org/argouml/profile/profiles"
- includes="*.xmi,README.txt"/>
- </copy>
-
- <!-- The class that uses argo.ini was deprecated for 0.25.4. It can be
- removed when that class is removed after the release of 0.26 -->
- <copy todir="${argo.build.classes}/org/argouml">
- <fileset dir="${argo.src.dir}/org/argouml"
- includes="*argo.ini"/>
- </copy>
-
- <!-- copy test files -->
- <copy todir="${argo.tests.classes}/testmodels">
- <fileset dir="${argo.tests.src}/testmodels" excludes="CVS/**" includes="**/**"/>
- </copy>
- </target>
<!-- =================================================================== -->
- <!-- Generates the parsers from the grammars by using Antlr -->
+ <!-- Copies the complete set of jar files to the build directory. -->
<!-- =================================================================== -->
+ <target name="package" depends="init"
+ description="Prepare all jar files, both built and just delivered.">
- <target name="generateparser" depends="init"
- description="Generate the antlr parsers.">
- <echo message="Generate parsers"/>
-
- <uptodate property="parser1.is.current"
- targetfile="${argo.src.dir}/org/argouml/uml/reveng/java/JavaTokenTypes.txt">
- <srcfiles dir="${argo.src.dir}/org/argouml/uml/reveng/java">
- <include name="java.g"/>
- </srcfiles>
- </uptodate>
- <antcall target="generateparser1"/>
-
- <uptodate property="parser2.is.current"
- targetfile="${argo.src.dir}/org/argouml/language/java/generator/JavaTokenTypes.txt">
- <srcfiles dir="${argo.src.dir}/org/argouml/language/java/generator">
- <include name="java.g"/>
- </srcfiles>
- </uptodate>
- <antcall target="generateparser2"/>
-
- </target>
-
- <target name="generateparser1" unless="parser1.is.current" depends="init">
- <delete>
- <fileset dir="org/argouml/uml/reveng/java">
- <include name="JavaTokenTypes.txt"/>
- </fileset>
- </delete>
- <echo message="Antlr classpath is ${antlrall.jar.path}"/>
- <java classname="antlr.Tool" classpath="${antlrall.jar.path}" fork="yes"
- maxmemory="32M">
- <arg value="-o"/>
- <arg file="${argo.src.dir}/org/argouml/uml/reveng/java"/>
- <arg file="${argo.src.dir}/org/argouml/uml/reveng/java/java.g"/>
- </java>
- </target>
+ <!-- Build the subdirs in order. -->
+ <ant dir="infra" inheritAll="false" target="jar"/>
+ <ant dir="model" inheritAll="false" target="jar"/>
+ <ant dir="model-mdr" inheritAll="false" target="jar"/>
+<!-- <ant dir="model-euml" inheritAll="false" target="jar"/> -->
+ <ant dir="app" inheritAll="false" target="jar"/>
- <target name="generateparser2" unless="parser2.is.current" depends="init">
- <delete>
- <fileset dir="org/argouml/language/java/generator">
- <include name="JavaTokenTypes.txt"/>
- </fileset>
- </delete>
- <java classname="antlr.Tool" classpath="${antlrall.jar.path}" fork="yes"
- maxmemory="32M">
- <arg value="-o"/>
- <arg file="${argo.src.dir}/org/argouml/language/java/generator"/>
- <arg file="${argo.src.dir}/org/argouml/language/java/generator/java.g"/>
- </java>
- </target>
+ <!-- Copy everything to the build directory -->
+ <mkdir dir="${argo.build.dir}"/>
- <target name="cleanparser"
- description="Clean up the antlr parsers.">
- <delete>
- <fileset dir="org/argouml/uml/reveng/java">
- <include name="JavaLexer.java"/>
- <include name="JavaRecognizer.java"/>
- <include name="JavaTokenTypes.java"/>
- <include name="JavaTokenTypes.txt"/>
+ <copy todir="${argo.build.dir}">
+ <fileset dir="infra/build">
+ <include name="*"/>
+ </fileset>
+ <fileset dir="model/build">
+ <include name="*"/>
+ </fileset>
+ <fileset dir="model-mdr/build">
+ <include name="*"/>
+ </fileset>
+ <!-- model-euml Not currently included -->
+ <fileset dir="app/build">
+ <include name="*"/>
</fileset>
- <fileset dir="org/argouml/language/java/generator">
- <include name="JavaLexer.java"/>
- <include name="JavaRecognizer.java"/>
- <include name="JavaTokenTypes.java"/>
- <include name="JavaTokenTypes.txt"/>
- </fileset>
- </delete>
- </target>
-
- <!-- =================================================================== -->
- <!-- Checks for necessary libraries and correct versions of libraries -->
- <!-- =================================================================== -->
-
- <target name="prerequisites"
- depends="prepare,check.swidgets,check.gef.localizer,check.gef,check.toolbar,check.log4j,check.antlr" >
- </target>
-
- <target depends="prepare" name="check.toolbar" unless="has.toolbar">
- <fail message="toolbar library does not appear to be in the classpath."/>
- </target>
-
- <target depends="prepare" name="check.swidgets" unless="has.swidgets">
- <fail message="swidgets library does not appear to be in the classpath."/>
- </target>
-
- <target depends="prepare" name="check.gef" unless="has.gef">
- <fail message="gef library does not appear to be in the classpath."/>
- </target>
-
- <target depends="prepare, check.commons-logging" name="check.log4j" unless="has.log4j">
- <fail message="log4j library does not appear to be in the classpath."/>
- </target>
-
- <target depends="prepare" name="check.commons-logging" unless="has.commons-logging">
- <fail message="commons-logging library does not appear to be in the classpath."/>
- </target>
-
- <target depends="prepare, check.gef" name="check.gef.localizer" unless="has.gef.localizer">
- <fail message="Please install a more recent version of the gef library (minimum 0.9.5)"/>
+ </copy>
</target>
- <target depends="prepare" name="check.antlr" unless="has.antlr">
- <fail message="antlrall library does not appear to be in the classpath."/>
- </target>
<!-- =================================================================== -->
- <!-- Updates the version source file if necessary -->
+ <!-- Run tests in all subdirectories. -->
+ <!-- Order is important. -->
<!-- =================================================================== -->
- <target name="check-version" depends="init">
- <uptodate property="version.is.current"
- targetfile="${argo.src.dir}/${version.package}/ArgoVersion.java">
- <srcfiles dir="${argo.src.dir}/templates">
- <include name="ArgoVersion.template"/>
- </srcfiles>
- <srcfiles dir="${argo.src.dir}">
- <include name="default.properties"/>
- <include name="build.properties"/>
- </srcfiles>
- </uptodate>
- </target>
+ <target name="tests"
+ description="Run tests.">
- <target depends="check-version" name="update-version" unless="version.is.current">
- <echo message="Creating ArgoVersion.java for version ${argo.build.version}"/>
- <filter token="ARGO_RELEASE_VERSION" value="${argo.build.version}"/>
- <copy file="${argo.src.dir}/templates/ArgoVersion.template" filtering="on"
- overwrite="on" tofile="${argo.src.dir}/${version.package}/ArgoVersion.java"/>
- </target>
+ <!-- Build the subdirs in order. -->
+ <ant dir="infra" inheritAll="false" target="tests"/>
+ <ant dir="model" inheritAll="false" target="tests"/>
+ <ant dir="model-mdr" inheritAll="false" target="tests"/>
+<!-- <ant dir="model-euml" inheritAll="false" target="tests"/> -->
+ <ant dir="app" inheritAll="false" target="tests"/>
+ </target>
<!-- =================================================================== -->
- <!-- Compiles the source directory -->
+ <!-- Clean all subdirectories. -->
<!-- =================================================================== -->
- <target name="build-model" depends="prepare">
- <echo message="Building Model API"/>
- <ant dir="${argo.model.dir}" inheritAll="false" target="install">
- <propertyset dynamic="false">
- <propertyset refid="absolute-properties"/>
- </propertyset>
- </ant>
- </target>
-
- <target name="compile"
- depends="prepare,prerequisites,update-version,generateparser,build-model,build-mdr"
- description="Compile the sources.">
-
- <echo message="Compiling the sources"/>
+ <target name="clean" depends="init"
+ description="Clean out all built files.">
- <javac debug="${debug}"
- deprecation="${deprecation}"
- destdir="${argo.build.classes}"
- includes="org/argouml/**/*.java"
- excludes="org/argouml/model/uml/**"
- optimize="${optimize}"
- srcdir="${argo.src.dir}"
- source="1.5"
- target="1.5">
- <compilerarg compiler="javac1.5" line="-Xlint:unchecked"/>
- <classpath>
- <path refid="argo.compile.classpath"/>
- </classpath>
- </javac>
+ <!-- Delete the build directory -->
+ <delete dir="${argo.build.dir}"/>
- <available file="${argo.tests.src}" type="dir" property="has.tests"/>
- <antcall target="compile-tests-if-there"/>
- </target>
+ <!-- Build the subdirs in opposite order. -->
+ <ant dir="app" inheritAll="false" target="clean"/>
+ <ant dir="model-euml" inheritAll="false" target="clean"/>
+ <ant dir="model-mdr" inheritAll="false" target="clean"/>
+ <ant dir="model" inheritAll="false" target="clean"/>
+ <ant dir="infra" inheritAll="false" target="clean"/>
- <!-- =================================================================== -->
- <!-- Creates the jar file -->
- <!-- =================================================================== -->
- <target name="jar" depends="compile"
- description="Build the main jar file.">
- <filter token="version" value="${argo.build.version}"/>
- <copy file="${argo.src.dir}/templates/manifest.template" filtering="on"
- overwrite="on" tofile="${argo.build.manifest}"/>
- <jar basedir="${argo.build.classes}" excludes="*.txt,*.bat,*.xml,*.sh"
- includes="org/argouml/**" jarfile="${argo.build.dir}/${name}.jar"
- manifest="${argo.build.manifest}"/>
</target>
- <!-- =================================================================== -->
- <!-- Copies the complete set of jar files to the build directory. -->
- <!-- The purpose of this is to keep names here in synch with copied-to -->
- <!-- names in build and manifest.mf! -->
- <!-- =================================================================== -->
- <target name="package" depends="jar"
- description="Prepare all jar files, both built and just delivered.">
-
- <copy file="${antlrall.jar.path}" tofile="${argo.build.dir}/antlrall.jar"/>
- <copy file="${gef.jar.path}" tofile="${argo.build.dir}/gef.jar"/>
- <copy file="${log4j.jar.path}" tofile="${argo.build.dir}/log4j.jar"/>
- <copy file="${commons-logging.jar.path}" tofile="${argo.build.dir}/commons-logging.jar"/>
- <copy file="${swidgets.jar.path}" tofile="${argo.build.dir}/swidgets.jar"/>
- <copy file="${toolbar.jar.path}" tofile="${argo.build.dir}/toolbar.jar"/>
- <copy file="${ocl-argo.jar.path}" tofile="${argo.build.dir}/ocl-argo.jar"/>
- <!-- End of name synch area in this file. -->
-
- <copy file="${argo.src.dir}/README.txt" tofile="${argo.build.dir}/README.txt"/>
- <copy file="${argo.src.dir}/bin/argouml.sh" todir="${argo.build.dir}"/>
- <copy file="${argo.src.dir}/bin/argouml.bat" todir="${argo.build.dir}"/>
- </target>
<!-- =================================================================== -->
<!-- Prepares the Javadoc -->
<!-- =================================================================== -->
+ <!-- TODO: This target is not yet tested with the new structure. -->
<target name="prepare-docs" depends="init, javadocs, javadocs-api"
description="Build javadocs.">
</target>
@@ -601,6 +403,7 @@
</target>
+ <!-- TODO: This target is not yet tested with the new structure. -->
<target name="javadocs-api" depends="init">
<mkdir dir="${argo.api.dir}"/>
@@ -657,51 +460,10 @@
<!-- =================================================================== -->
- <!-- Clean targets -->
- <!-- =================================================================== -->
- <target name="clean" depends="init"
- description="Clean out all built files.">
-
- <ant dir="${argo.model.dir}" inheritAll="false" target="clean">
- <propertyset dynamic="false">
- <propertyset refid="absolute-properties"/>
- </propertyset>
- </ant>
- <ant dir="${argo.mdr.dir}" inheritAll="false" target="clean">
- <propertyset dynamic="false">
- <propertyset refid="absolute-properties"/>
- </propertyset>
- </ant>
- <ant dir="${argo.euml.dir}" inheritAll="false" target="clean">
- <propertyset dynamic="false">
- <propertyset refid="absolute-properties"/>
- </propertyset>
- </ant>
- <delete dir="${argo.build.dir}/tests"/>
- <delete dir="${argo.build.dir}/src_new"/>
- <delete dir="${argo.build.dir}/classes"/>
- <delete dir="${argo.build.dir}/bin"/>
- <delete file="${argo.src.dir}/${version.package}/ArgoVersion.java"/>
-
- <!-- TODO: Some of these are obsolete -->
- <delete>
- <fileset dir="${argo.build.dir}">
- <include name="*.jar"/>
- <include name="Fop.java"/>
- <include name="Fop.class"/>
- <include name="README.txt"/>
- <include name="argouml.sh"/>
- <include name="argouml.bat"/>
- </fileset>
- </delete>
-
- <antcall target="cleanparser"/>
- </target>
-
- <!-- =================================================================== -->
<!-- Run ArgoUML from compiled sources -->
<!-- =================================================================== -->
- <target name="run" depends="compile"
+ <!-- TODO: This target is not yet tested with the new structure. -->
+ <target name="run" depends="package"
description="Run the newly compiled ArgoUML.">
<java classname="org.argouml.application.Main"
fork="yes"
@@ -719,7 +481,8 @@
</java>
</target>
- <target name="debug" depends="compile"
+ <!-- TODO: This target is not yet tested with the new structure. -->
+ <target name="debug" depends="package"
description="Run ArgoUML with debug level logging.">
<java classname="org.argouml.application.Main"
fork="yes"
@@ -737,7 +500,8 @@
</java>
</target>
- <target name="info" depends="compile"
+ <!-- TODO: This target is not yet tested with the new structure. -->
+ <target name="info" depends="package"
description="Run ArgoUML with info level logging.">
<java classname="org.argouml.application.Main"
fork="yes"
@@ -761,227 +525,13 @@
<!-- =================================================================== -->
- <!-- Compiles the tests -->
- <!-- =================================================================== -->
-
- <target name="compile-tests" depends="prepare">
-
- <!-- create directories -->
- <mkdir dir="${argo.tests.classes}"/>
-
- <!-- There are classes/test that actually test deprecated methods. -->
- <!-- They are listed here. -->
- <!-- We want debug, optimize, deprecation to be non-modifiable here -->
- <javac debug="true"
- deprecation="false"
- optimize="false"
- destdir="${argo.tests.classes}"
- includes="**/GUITestProjectBrowser.java,**/MockUMLUserInterfaceContainer,**/*Deprecated.java"
- excludes="org/argouml/model/uml/**"
- srcdir="${argo.tests.src}"
- source="1.5"
- target="1.5">
- <compilerarg compiler="javac1.5" line="-Xlint:unchecked"/>
- <classpath>
- <pathelement location="${argo.build.classes}"/>
- <pathelement location="${junit.jar.path}"/>
- <pathelement location="${easymock.jar.path}"/>
- <pathelement location="${jdepend.jar.path}"/>
- <path refid="argo.compile.classpath"/>
- </classpath>
- </javac>
-
- <!-- We want debug, optimize, deprecation to be non-modifiable here -->
- <javac debug="true"
- deprecation="${deprecation}"
- optimize="false"
- destdir="${argo.tests.classes}"
- srcdir="${argo.tests.src}"
- includes="org/argouml/uml/reveng/TestJavaImportUnicode.java"
- excludes="org/argouml/model/uml/**"
- encoding="iso8859-1"
- source="1.5"
- target="1.5">
- <compilerarg compiler="javac1.5" line="-Xlint:unchecked"/>
- <classpath>
- <pathelement location="${argo.build.classes}"/>
- <pathelement location="${junit.jar.path}"/>
- <pathelement location="${easymock.jar.path}"/>
- <pathelement location="${jdepend.jar.path}"/>
- <path refid="argo.compile.classpath"/>
- </classpath>
- </javac>
-
- <!-- We want debug, optimize, deprecation to be non-modifiable here -->
- <javac debug="true"
- deprecation="${deprecation}"
- optimize="false"
- destdir="${argo.tests.classes}"
- srcdir="${argo.tests.src}"
- excludes="org/argouml/model/uml/**"
- source="1.5"
- target="1.5">
- <compilerarg compiler="javac1.5" line="-Xlint:unchecked"/>
- <classpath>
- <pathelement location="${argo.build.classes}"/>
- <pathelement location="${junit.jar.path}"/>
- <pathelement location="${easymock.jar.path}"/>
- <pathelement location="${jdepend.jar.path}"/>
- <path refid="argo.compile.classpath"/>
- </classpath>
- </javac>
- </target>
-
- <target name="compile-tests-if-there" if="has.tests">
- <antcall target="compile-tests"/>
- </target>
-
- <!-- =================================================================== -->
- <!-- Prepare for the junit tests. -->
- <!-- =================================================================== -->
- <target depends="compile-tests" name="junit-setup"/>
-
- <target name="junit-report-clean">
- <mkdir dir="${argo.tests.reports}/junit/output"/>
- <mkdir dir="${argo.tests.reports}/junit/output/html"/>
- <delete>
- <fileset dir="${argo.tests.reports}/junit/output">
- <include name="TEST-*.xml"/>
- <include name="TEST-*.txt"/>
- </fileset>
- </delete>
- </target>
-
- <target name="junit-report-create">
- <junitreport todir="${argo.tests.reports}/junit/output">
- <fileset dir="${argo.tests.reports}/junit/output">
- <include name="TEST-*.xml"/>
- </fileset>
- <report format="frames" todir="${argo.tests.reports}/junit/output/html"/>
- </junitreport>
-
- </target>
-
- <!-- =================================================================== -->
- <!-- Build MDR library - internal target which calls argouml-mdr build. -->
- <!-- =================================================================== -->
- <target name="build-mdr" depends="init,build-model">
- <!-- We build unconditionally because only the MDR build itself knows if
- everything is up to date -->
- <echo message="=== Calling MDR build ==="/>
- <copy file="${log4j.jar.path}" tofile="${argo.build.dir}/log4j.jar"/>
- <ant dir="${argo.mdr.dir}" target="install" inheritAll="false" >
- <propertyset dynamic="false">
- <propertyset refid="absolute-properties"/>
- </propertyset>
- </ant>
- </target>
-
- <!-- =================================================================== -->
- <!-- Build Eclipse UML2 library - internal target which calls argouml-euml build. -->
- <!-- =================================================================== -->
- <target name="build-euml" depends="init,build-model"
- description="Build eUML model subsystem - not built by default">
- <!-- We build unconditionally because only the eUML build itself knows if
- everything is up to date -->
- <echo message="=== Calling eUML build ==="/>
- <copy file="${log4j.jar.path}" tofile="${argo.build.dir}/log4j.jar"/>
- <ant dir="${argo.euml.dir}" target="install" inheritAll="false" >
- <propertyset dynamic="false">
- <propertyset refid="absolute-properties"/>
- </propertyset>
- </ant>
- </target>
-
- <!-- =================================================================== -->
- <!-- Run the junit tests. -->
- <!-- =================================================================== -->
- <target name="tests-dont-fail"
- depends="compile,junit-setup,junit-report-clean,
- ant.optional.init">
-
- <junit errorproperty="junit.failure" failureproperty="junit.failure"
- fork="yes" dir="${basedir}" forkmode="perTest"
- haltonfailure="false"
- maxmemory="48M" printsummary="${junit.printsummary}">
- <sysproperty key="test.model.uml"
- value="${argo.mdr.dir}/src/org/argouml/model/mdr/mof/01-02-15.xml"/>
- <sysproperty key="argouml.model.implementation"
- value="${test.model.implementation}"/>
- <sysproperty key="log4j.configuration" value="org/argouml/resource/default.lcf"/>
- <sysproperty key="java.awt.headless" value="true"/>
- <sysproperty key="argouml.tests.dir" value="${argo.tests.src}"/>
- <assertions>
- <enable/>
- </assertions>
- <classpath>
- <path refid="ant.optional.classpath"/>
- <pathelement location="${argo.build.classes}"/>
- <pathelement location="${argo.tests.classes}"/>
- <path refid="argo.runtime.classpath"/>
- <pathelement location="${easymock.jar.path}"/>
- <pathelement location="${jdepend.jar.path}"/>
- </classpath>
- <formatter type="xml"/>
- <batchtest todir="${argo.tests.reports}/junit/output">
- <fileset dir="${argo.tests.src}">
- <include name="org/argouml/**/Test*.java"/>
- </fileset>
- </batchtest>
- </junit>
-
- <antcall target="junit-report-create"/>
- </target>
-
- <target name="tests" depends="tests-dont-fail"
- description="Run all tests that don't require any GUI components in headleass mode.">
- <fail message="JUnit tests failed." if="junit.failure"/>
- </target>
-
-
- <!-- =================================================================== -->
- <!-- Run the junit tests, the ones that include GUI stuff. -->
- <!-- =================================================================== -->
- <target name="guitests"
- depends="compile,junit-setup,junit-report-clean,
- ant.optional.init"
- description="Run all tests that require the GUI components.">
-
- <junit errorproperty="junit.failure" failureproperty="junit.failure"
- fork="yes" dir="${basedir}" forkmode="perTest"
- haltonfailure="false"
- maxmemory="160M" printsummary="${junit.printsummary}">
- <sysproperty key="log4j.configuration" value="org/argouml/resource/default.lcf"/>
- <sysproperty key="argouml.tests.dir" value="${argo.tests.src}"/>
- <assertions>
- <enable/>
- </assertions>
- <classpath>
- <path refid="ant.optional.classpath"/>
- <pathelement location="${argo.build.classes}"/>
- <pathelement location="${argo.tests.classes}"/>
- <path refid="argo.runtime.classpath"/>
- <pathelement location="${easymock.jar.path}"/>
- </classpath>
- <formatter type="xml"/>
- <batchtest todir="${argo.tests.reports}/junit/output">
- <fileset dir="${argo.tests.src}">
- <include name="org/argouml/**/GUITest*.java"/>
- </fileset>
- </batchtest>
- </junit>
- <antcall target="junit-report-create"/>
- <fail message="JUnit tests failed." if="junit.failure"/>
- </target>
-
-
- <!-- =================================================================== -->
<!-- Run the tests that test the command line stuff. -->
<!-- These tests does not have error conditions to test against like the -->
<!-- JUnit test cases. Instead, if they hang or exit with error they -->
<!-- have failed. -->
<!-- =================================================================== -->
- <target name="clitests" depends="compile"
+ <!-- TODO: This target is not yet tested with the new structure. -->
+ <target name="clitests" depends="package"
description="Run tests that test the command line stuff.">
<!-- Don't do anything. -->
@@ -1016,16 +566,12 @@
</target>
<!-- =================================================================== -->
- <!-- Run the both kind of tests. -->
- <!-- =================================================================== -->
- <target name="alltests" depends="compile,junit-setup,tests,guitests"
- description="Run all tests, both with and without GUI."/>
-
- <!-- =================================================================== -->
<!-- Start ArgoUML with JUnit test cases from ../tests. -->
<!-- =================================================================== -->
- <target name="run-with-test-panel"
+ <!-- TODO: This target is not yet tested with the new structure.
depends="compile,junit-setup"
+-->
+ <target name="run-with-test-panel"
description="Start the TestRunner with all test cases from ../tests loaded.">
<java classname="junit.swingui.TestRunner" fork="yes" taskname="argouml">
<assertions>
@@ -1051,6 +597,7 @@
<!-- =================================================================== -->
<!-- Perform JDepend to find about the structure in ArgoUML. -->
<!-- =================================================================== -->
+ <!-- TODO: This target is not yet tested with the new structure. -->
<target name="jdepend" depends="init, ant.optional.init"
description="Run jdepend to report static metrics.">
<echo>
@@ -1077,6 +624,7 @@
<!-- =================================================================== -->
<!-- Perform javasrc to find about the structure in ArgoUML. -->
<!-- =================================================================== -->
+ <!-- TODO: This target is not yet tested with the new structure. -->
<target name="javasrc" depends="init"
description="Run javasrc on the source.">
<java classname="javasrc.app.Pass1" failonerror="true" fork="true">
@@ -1107,7 +655,7 @@
<!-- =================================================================== -->
<!-- Runs checkstyle to find style problems in ArgoUML. -->
<!-- =================================================================== -->
-
+ <!-- TODO: This target is not yet tested with the new structure. -->
<target name="checkstyle"
description="Run Checkstyle on all sources (xml report)"
depends="ant.optional.init">
@@ -1154,6 +702,8 @@
</target>
+
+ <!-- TODO: This target is not yet tested with the new structure. -->
<target name="pmd-init" depends="ant.optional.init">
<taskdef name="pmd" classname="net.sourceforge.pmd.ant.PMDTask" classpath="${pmd.jar.path}"/>
<taskdef name="cpd" classname="net.sourceforge.pmd.cpd.CPDTask" classpath="${pmd.jar.path}"/>
@@ -1161,6 +711,7 @@
<mkdir dir="${pmd.reports.dir}"/>
</target>
+ <!-- TODO: This target is not yet tested with the new structure. -->
<target name="pmd" depends="pmd-init">
<delete>
@@ -1182,6 +733,7 @@
</pmd>
</target>
+ <!-- TODO: This target is not yet tested with the new structure. -->
<target name="cpd" depends="pmd-init">
<property name="cpd.report.file" value="${pmd.reports.dir}/cpd-report"/>
@@ -1203,6 +755,7 @@
</target>
<!-- Internal target to aggregate tasks for CruiseControl -->
+ <!-- TODO: This target is not yet tested with the new structure. -->
<target name="cruisecontrol" depends="tests,checkstyle" />
<!-- ################################################################### -->
@@ -1217,6 +770,7 @@
<!-- solve this within ant, please go ahead. -->
<!-- =================================================================== -->
+ <!-- TODO: This target is not yet tested with the new structure. -->
<target name="find-undeclared-tags"
description="Scans through all source files and find all tags that are not in the corresponding properties files.">
<exec executable="sh">
@@ -1228,7 +782,10 @@
<!-- =================================================================== -->
<!-- Runs Classycle to find cyclic dependencies in ArgoUML. -->
<!-- =================================================================== -->
- <target name="classycle" depends="compile"
+ <!-- TODO: This target is not yet tested with the new structure.
+ depends="compile"
+ -->
+ <target name="classycle"
description="Analyze sources for cyclic dependencies using Classcycle">
<echo>
Running classcyle on ${source.dir}.
Copied: trunk/src/default.properties (from r14091, /trunk/src_new/default.properties)
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/default.properties?view=diff&rev=14094&p1=/trunk/src_new/default.properties&p2=trunk/src/default.properties&r1=14091&r2=14094
==============================================================================
--- /trunk/src_new/default.properties (original)
+++ trunk/src/default.properties 2008-02-09 06:30:05-0800
@@ -41,12 +41,12 @@
argo.model.dir=${argo.root.dir}/src/model
argo.mdr.dir=${argo.root.dir}/src/model-mdr
argo.euml.dir=${argo.root.dir}/src/model-euml
-argo.tests.src=${argo.root.dir}/tests
-argo.lib.dir=${argo.root.dir}/lib
-argo.src.dir=${argo.root.dir}/src_new
+argo.tests.src=${argo.root.dir}/src/rest/tests
+argo.lib.dir=${argo.root.dir}/src/rest/lib
+argo.src.dir=${argo.root.dir}/src/rest/src
#
argo.build.dir=${argo.root.dir}/build
-argo.tools.lib=${argo.tools.dir}/lib
+argo.tools.lib=${argo.tools.dir}/src/rest/lib
#
argo.tests.dir=${argo.build.dir}/tests
argo.tests.classes=${argo.tests.dir}/classes
@@ -121,6 +121,7 @@
junit.jar.path=${argo.tools.dir}/junit-3.8.2/junit.jar
#junit.jar.path=${argo.tools.dir}/junit-4.2/junit.jar
easymock.jar.path=${argo.tools.dir}/lib/easymock12.jar
+
pmd.dir=${argo.tools.dir}/pmd-4.0
pmd.jar.path=${pmd.dir}/lib/pmd-4.0.jar
pmd.xslt.path=${pmd.dir}/etc/xslt
Added: trunk/src/infra/build.xml
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/infra/build.xml?view=auto&rev=14094
==============================================================================
--- (empty file)
+++ trunk/src/infra/build.xml 2008-02-09 06:30:05-0800
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<project basedir="." default="jar" name="argouml infra subsystem">
+ <target name="init">
+ <property name="build.dir" value="build"/>
+ <property name="src.jar" value="log4j-1.2.6.jar"/>
+ </target>
+
+ <!-- =================================================================== -->
+ <!-- Copies the jar file -->
+ <!-- =================================================================== -->
+ <target name="jar" depends="init"
+ description="Copy the file.">
+ <mkdir dir="${build.dir}"/>
+ <copy file="lib/${src.jar}" todir="${build.dir}"/>
+ </target>
+
+ <!-- =================================================================== -->
+ <!-- Clean targets -->
+ <!-- =================================================================== -->
+ <target name="clean" depends="init"
+ description="Clean out all built files.">
+ <delete dir="${build.dir}" quiet="true"/>
+ </target>
+</project>
Modified: trunk/src/model-mdr/build.xml
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/model-mdr/build.xml?view=diff&rev=14094&p1=trunk/src/model-mdr/build.xml&p2=trunk/src/model-mdr/build.xml&r1=14093&r2=14094
==============================================================================
--- trunk/src/model-mdr/build.xml (original)
+++ trunk/src/model-mdr/build.xml 2008-02-09 06:30:05-0800
@@ -4,11 +4,18 @@
Build file for the MDR implementation of the Model subsystem.
This is designed to work in two different environments:
- - in a subdirectory of argouml, as stored in CVS
+ - in a subdirectory of argouml, as stored in the repository
(ie argouml/src/model-mdr)
+ Used when compiling, running tests from the command line.
- in a peer directory of argouml, as checked out for Eclipse
(ie argouml-core-model-mdr)
-
+ Used only to build the MDR specific things. Other Eclipse settings
+ take care of compiling, running tests.
+
+Building this requires:
+ infra
+ model
+
-->
<project default="compile" name="ArgoUML MDR Model subsystem">
@@ -20,7 +27,6 @@
<!-- argo.root.dir should be passed in to make sure it is correct -->
<property name="argo.root.dir" value="../.."/>
- <property name="argo.build.dir" value="${argo.root.dir}/build"/>
<property name="build.dir" value="build"/>
<property name="build.classes" value="${build.dir}/classes"/>
@@ -29,8 +35,6 @@
<property name="tests.classes" value="${build.dir}/tests/classes"/>
<property name="tests.reports" value="${build.dir}/tests/reports"/>
- <property name="lib.dir" value="lib" />
-
<property name="debug" value="yes"/>
<property name="deprecation" value="yes"/>
<property name="optimize" value="yes"/>
@@ -39,12 +43,12 @@
<property name="javainterfaces.jar" value="java-interfaces.jar"/>
<property name="mdrant.jar" value="tools/lib/mdrant-patched.jar" />
- <property name="mof.jar" value="${lib.dir}/mof.jar" />
- <property name="jmi.jar" value="${lib.dir}/jmi.jar" />
- <property name="mdrapi.jar" value="${lib.dir}/mdrapi.jar" />
- <property name="nbmdr.jar" value="${lib.dir}/nbmdr.jar" />
- <property name="jmiutils.jar" value="${lib.dir}/jmiutils.jar" />
- <property name="openide-lookup.jar" value="${lib.dir}/openide-util.jar" />
+ <property name="mof.jar" value="lib/mof.jar" />
+ <property name="jmi.jar" value="lib/jmi.jar" />
+ <property name="mdrapi.jar" value="lib/mdrapi.jar" />
+ <property name="nbmdr.jar" value="lib/nbmdr.jar" />
+ <property name="jmiutils.jar" value="lib/jmiutils.jar" />
+ <property name="openide-lookup.jar" value="lib/openide-util.jar" />
<path id="mdr.generate.classpath">
<pathelement location="${mdrant.jar}" />
@@ -66,12 +70,15 @@
</path>
<path id="compile.classpath">
- <pathelement location="${argo.build.dir}/log4j.jar"/>
- <pathelement location="${argo.build.dir}/argouml-model.jar"/>
+ <fileset dir="../infra/build/">
+ <include name="*.jar"/>
+ </fileset>
+ <fileset dir="../model/build/">
+ <include name="*.jar"/>
+ </fileset>
<path refid="mdr.compile.classpath"/>
</path>
-
<!-- Define a few places we can find Junit -->
<path id="junit.classpath">
<pathelement location="${junit.jar.path}"/>
@@ -79,9 +86,14 @@
<pathelement location="${argo.root.dir}/tools/junit-3.8.2/junit.jar"/>
</path>
- <path id="run.classpath">
- <fileset dir="${argo.build.dir}" includes="*.jar"/>
- <path refid="mdr.run.classpath"/>
+ <path id="tests.compile.classpath">
+ <pathelement location="${build.classes}"/>
+ <path refid="compile.classpath"/>
+ <path refid="junit.classpath"/>
+ </path>
+
+ <path id="tests.run.classpath">
+ <path refid="tests.compile.classpath"/>
</path>
<property name="profile.file.dir" value="org/argouml/model/mdr/profiles"/>
@@ -209,39 +221,19 @@
</target>
- <!-- =================================================================== -->
- <!-- Run from classes -->
- <!-- =================================================================== -->
- <target name="run" depends="compile"
- description="Run ArgoUML with MDR model implementation.">
- <java classname="org.argouml.application.Main"
- fork="yes"
- taskname="argouml"
- maxmemory="500M">
- <sysproperty key="log4j.configuration"
- value="org/argouml/resource/warn_console.lcf"/>
- <!-- the following is redundant since it's the default, but leave for now -->
- <sysproperty key="argouml.model.implementation"
- value="org.argouml.model.mdr.MDRModelImplementation"/>
- <sysproperty key="org.netbeans.lib.jmi.Logger"
- value="0"/>
- <classpath>
- <pathelement location="${build.classes}"/>
- <path refid="run.classpath"/>
- </classpath>
- </java>
+
+ <target name="create-dirs">
+ <mkdir dir="${build.dir}"/>
+ <mkdir dir="${build.classes}"/>
+ <mkdir dir="${build.javas}"/>
</target>
<!-- =================================================================== -->
<!-- Compiles the source directory -->
<!-- =================================================================== -->
<target name="compile"
- depends="init,generate"
+ depends="init,create-dirs,generate"
description="Compile the sources.">
- <!-- create directories -->
- <mkdir dir="${build.dir}"/>
- <mkdir dir="${build.classes}"/>
-
<javac srcdir="src"
destdir="${build.classes}"
includes="org/argouml/**/*.java"
@@ -274,16 +266,8 @@
includes="org/argouml/**"
manifest="src/manifest.mf"
jarfile="${build.dir}/${result.jar}"/>
- </target>
-
- <!-- =================================================================== -->
- <!-- Install the jar file -->
- <!-- =================================================================== -->
- <target name="install" depends="jar"
- description="Copy the ${result.jar} file to the ArgoUML directory.">
- <copy todir="${argo.build.dir}">
- <fileset dir="${build.dir}" includes="*.jar"/>
- <fileset dir="${lib.dir}" includes="*.jar"/>
+ <copy todir="${build.dir}">
+ <fileset dir="lib" includes="*.jar"/>
</copy>
</target>
@@ -306,14 +290,14 @@
>
<compilerarg compiler="javac1.5" line="-Xlint:unchecked"/>
<classpath>
- <path refid="junit.classpath"/>
- <path>
- <fileset dir="${argo.build.dir}">
- <include name="*.jar"/>
- </fileset>
- </path>
+ <path refid="tests.compile.classpath"/>
</classpath>
</javac>
+ <copy todir="${tests.classes}">
+ <fileset dir="tests">
+ <include name="**/*.lcf"/>
+ </fileset>
+ </copy>
</target>
@@ -357,10 +341,9 @@
value="org/argouml/resource/info_console.lcf"/>
<sysproperty key="argouml.model.implementation"
value="org.argouml.model.mdr.MDRModelImplementation"/>
- <classpath>
+ <classpath>
<pathelement location="${tests.classes}"/>
- <path refid="junit.classpath"/>
- <path refid="run.classpath"/>
+ <path refid="tests.run.classpath"/>
</classpath>
<formatter type="xml"/>
<batchtest todir="${tests.reports}/junit/output">
@@ -377,13 +360,7 @@
<!-- =================================================================== -->
<target name="clean" depends="init"
description="Clean out all built files.">
- <delete includeemptydirs="true">
- <fileset dir="${build.dir}">
- <exclude name="**/.cvsignore"/>
- <exclude name="**/readme-build-java.txt"/>
- <exclude name="**/CVS/*"/>
- </fileset>
- </delete>
+ <delete dir="${build.dir}"/>
</target>
</project>
Modified: trunk/src/model-mdr/tests/org/argouml/model/mdr/AbstractMDRModelImplementationTestCase.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/model-mdr/tests/org/argouml/model/mdr/AbstractMDRModelImplementationTestCase.java?view=diff&rev=14094&p1=trunk/src/model-mdr/tests/org/argouml/model/mdr/AbstractMDRModelImplementationTestCase.java&p2=trunk/src/model-mdr/tests/org/argouml/model/mdr/AbstractMDRModelImplementationTestCase.java&r1=14093&r2=14094
==============================================================================
--- trunk/src/model-mdr/tests/org/argouml/model/mdr/AbstractMDRModelImplementationTestCase.java (original)
+++ trunk/src/model-mdr/tests/org/argouml/model/mdr/AbstractMDRModelImplementationTestCase.java 2008-02-09 06:30:05-0800
@@ -51,7 +51,7 @@
protected void init() {
try {
PropertyConfigurator.configure(
- Thread.currentThread().getContextClassLoader().getResource(
+ getClass().getClassLoader().getResource(
"org/argouml/resource/info_console.lcf")
);
System.setProperty(
Added: trunk/src/model-mdr/tests/org/argouml/resource/info_console.lcf
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/model-mdr/tests/org/argouml/resource/info_console.lcf?view=auto&rev=14094
==============================================================================
--- (empty file)
+++ trunk/src/model-mdr/tests/org/argouml/resource/info_console.lcf 2008-02-09 06:30:05-0800
@@ -0,0 +1,10 @@
+#
+log4j.rootCategory=DEBUG, FULL
+#
+log4j.category.org.argouml=INFO
+log4j.category.org.tigris.gef=INFO
+#
+log4j.appender.FULL=org.apache.log4j.ConsoleAppender
+log4j.appender.FULL.layout=org.apache.log4j.PatternLayout
+log4j.appender.FULL.layout.ConversionPattern=%5p: %m (%F:%L)%n
+log4j.appender.FULL.Threshold=DEBUG
Modified: trunk/src/model/build.xml
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/model/build.xml?view=diff&rev=14094&p1=trunk/src/model/build.xml&p2=trunk/src/model/build.xml&r1=14093&r2=14094
==============================================================================
--- trunk/src/model/build.xml (original)
+++ trunk/src/model/build.xml 2008-02-09 06:30:05-0800
@@ -24,14 +24,6 @@
<property file="${local.build.properties}"/>
<property file="${user.build.properties}"/>
- <!-- Make sure argo.root.dir is set before loading default properties -->
- <property name="argo.root.dir" value="../.."/>
- <property file="${argo.src.dir}/default.properties"/>
-
- <!-- These should already be set, but set some basics just in case -->
- <property name="argo.build.dir" value="${argo.root.dir}/build"/>
- <property name="argo.lib.dir" value="${argo.root.dir}/lib"/>
-
<property name="build.dir" value="build"/>
<property name="build.classes" value="${build.dir}/classes"/>
@@ -48,12 +40,9 @@
<target name="compile"
depends="init"
description="Compile the sources.">
- <!-- create directories -->
<mkdir dir="${build.dir}"/>
<mkdir dir="${build.classes}"/>
-<echo message="Compiling with debug=${debug}"/>
-
<javac debug="${debug}"
deprecation="${deprecation}"
destdir="${build.classes}"
@@ -71,18 +60,10 @@
<!-- =================================================================== -->
<target name="jar" depends="compile"
description="Build the ${name}.jar file.">
- <jar basedir="${build.classes}" excludes="*.txt,*.bat,*.xml,*.sh" includes="org/argouml/**" jarfile="${build.dir}/${name}.jar"/>
- </target>
-
- <!-- =================================================================== -->
- <!-- Install the jar file -->
- <!-- =================================================================== -->
- <target name="install" depends="jar"
- description="Copy the ${name}.jar file to the ArgoUML directory.">
- <echo message="Copying ${name}.jar to ${argo.build.dir}"/>
- <copy todir="${argo.build.dir}">
- <fileset dir="${build.dir}" includes="${name}.jar"/>
- </copy>
+ <jar basedir="${build.classes}"
+ excludes="*.txt,*.bat,*.xml,*.sh"
+ includes="org/argouml/**"
+ jarfile="${build.dir}/${name}.jar"/>
</target>
<!-- =================================================================== -->
@@ -91,8 +72,5 @@
<target name="clean" depends="init"
description="Clean out all built files.">
<delete dir="${build.dir}" quiet="true"/>
- <delete quiet="true">
- <fileset dir="${build.dir}" includes="${name}.jar"/>
- </delete>
</target>
</project>
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.