[prev in list] [next in list] [prev in thread] [next in thread]
List: selenium-commits
Subject: [Selenium-commits] [625] trunk/code/java/build.xml: Refactor the
From: mdub () codehaus ! org
Date: 2005-09-23 11:57:51
Message-ID: 20050923115751.10086.qmail () codehaus ! org
[Download RAW message or body]
[Attachment #2 (text/html)]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><style type="text/css"><!--
body {background:#ffffff;font-family:Verdana,Helvetica,Arial,sans-serif;}
h3 {margin:15px 0;padding:0;line-height:0;}
#msg {margin: 0 0 2em 0;}
#msg dl, #msg ul, #msg pre {padding:1em;border:1px dashed black;margin: 10px 0 30px \
0;} #msg dl {background:#ccccff;}
#msg pre {background:#ffffcc;}
#msg ul {background:#cc99ff;list-style:none;}
#msg dt {font-weight:bold;float:left;width: 6em;}
#msg dt:after { content:':';}
#patch h4 {padding: 0 \
10px;line-height:1.5em;margin:0;background:#ccffff;border-bottom:1px solid \
black;margin:0 0 10px 0;} #patch .propset h4, #patch .binary h4 {margin: 0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {background:#eeeeee;padding: 0 0 10px 0;}
#patch .propset .diff, #patch .binary .diff {padding: 10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary \
{border:1px solid black;margin:10px 0;} #patch .add {background:#ddffdd;}
#patch .rem {background:#ffdddd;}
#patch .lines, .info {color:#888888;background:#ffffff;}
--></style>
<title>[625] trunk/code/java/build.xml: Refactor the targets a little.</title>
</head>
<body>
<div id="msg">
<dl>
<dt>Revision</dt> <dd>625</dd>
<dt>Author</dt> <dd>mdub</dd>
<dt>Date</dt> <dd>2005-09-23 07:57:51 -0400 (Fri, 23 Sep 2005)</dd>
</dl>
<h3>Log Message</h3>
<pre>Refactor the targets a little.
In particular, tests are part of the default target, but not part of \
"dist".</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkcodejavabuildxml">trunk/code/java/build.xml</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkcodejavabuildxml"></a>
<div class="modfile"><h4>Modified: trunk/code/java/build.xml (624 => 625)</h4>
<pre class="diff">
<span class="info">--- trunk/code/java/build.xml 2005-09-17 11:51:50 UTC (rev 624)
+++ trunk/code/java/build.xml 2005-09-23 11:57:51 UTC (rev 625)
</span><span class="lines">@@ -1,4 +1,5 @@
</span><span class="cx"> <project name="selenium" \
default="all"> </span><span class="add">+
</span><span class="cx"> <property name="version" \
value="unreleased"/>
<property environment="env"/>
</span><span class="lines">@@ -46,10 +47,17 @@
</span><span class="cx"> <pathelement \
location="${ant.home}/lib"/> </path>
</span><span class="rem">- <target name="all" depends="clean, \
init, compile, test, integration-test, checkstyle, report, \
jar"/>
- <target name="make" depends="clean, init, compile, test, \
integration-test, jar"/> </span><span class="add">+ <target \
name="build" + description="build the software"
+ depends="init, compile, jar"/>
</span><span class="cx">
</span><span class="rem">- <target name="dist" \
depends="make"> </span><span class="add">+ <target \
name="all" + description="default target"
+ depends="build, test, integration-test, report"/>
+
+ <target name="dist"
+ description="prepare the distribution"
+ depends="clean, build">
</span><span class="cx">
<mkdir dir="dist"/>
</span><span class="lines">@@ -124,7 +132,7 @@
</span><span class="cx"> <mkdir \
dir="${integration.test.logs.dir}"/> </target>
</span><span class="rem">- <target name="compile-main" \
description="Compile java source"> </span><span class="add">+ \
<target name="compile" description="Compile java source"> \
</span><span class="cx"> <mkdir \
dir="${classes.dir}"/>
<javac destdir="${classes.dir}" \
classpathref="classpath" debug="on"> <src \
location="${main.dir}"/> </span><span class="lines">@@ -141,9 +149,7 @@
</span><span class="cx"> </javac>
</target>
</span><span class="rem">- <target name="compile" \
depends="compile-main, -instrument-main"/>
-
- <target name="test" depends="compile-main">
</span><span class="add">+ <target name="test" \
depends="jcoverage-instrument"> </span><span class="cx"> \
<junit fork="yes" forkmode="once" printsummary="yes" \
failureproperty="tests.failed"> <classpath \
refid="instrumented.classpath"/> <formatter \
type="xml"/> </span><span class="lines">@@ -169,7 +175,7 @@
</span><span class="cx"> </target>
<!-- could be refactored -->
</span><span class="rem">- <target name="integration-test-mac" \
depends="compile-main" if="isMac"> </span><span class="add">+ \
<target name="integration-test-mac" depends="compile" \
if="isMac"> </span><span class="cx">
<echo>Integration Tests for Embedded Jettu Web Container</echo>
</span><span class="lines">@@ -213,7 +219,7 @@
</span><span class="cx">
</target>
</span><span class="rem">- <target name="integration-test-windows" \
depends="compile-main" if="isWindows"> </span><span \
class="add">+ <target name="integration-test-windows" \
depends="compile" if="isWindows"> </span><span class="cx">
<echo>Integration Tests for Embedded Web Container</echo>
</span><span class="lines">@@ -256,7 +262,7 @@
</span><span class="cx"> </junit>
</target>
</span><span class="rem">- <target name="integration-test-unix" \
depends="compile-main" if="isUnix" unless="isMac"> \
</span><span class="add">+ <target name="integration-test-unix" \
depends="compile" if="isUnix" unless="isMac"> \
</span><span class="cx">
<echo>Integration Tests for Embedded Web Container</echo>
</span><span class="lines">@@ -314,7 +320,7 @@
</span><span class="cx">
</target>
</span><span class="rem">- <target name="integration-test" \
depends="compile-main, integration-test-os-test, integration-test-unix, \
integration-test-mac, integration-test-windows" > </span><span class="add">+ \
<target name="integration-test" depends="compile, \
integration-test-os-test, integration-test-unix, integration-test-mac, \
integration-test-windows" > </span><span class="cx">
<junitreport todir="${integration.test.reports.dir}">
<fileset dir="${integration.test.logs.dir}">
</span><span class="lines">@@ -326,17 +332,28 @@
</span><span class="cx">
</target>
</span><span class="rem">- <target name="jar" \
depends="compile-main" description="Jar java classes"> \
</span><span class="add">+ <target name="jar" \
depends="compile" description="Jar java classes"> </span><span \
class="cx"> <jar basedir="target/classes" \
destfile="target/${ant.project.name}-${version}.jar"/> </target>
</span><span class="rem">- <target name="report" \
depends="-checkstyle-tests,-simian,-coverage-report"/> </span><span \
class="add">+ <target name="report" + \
description="generate code-quality reports" + \
depends="checkstyle, simian, jcoverage"/> </span><span class="cx">
<!-- ================== Checkstyle target Definitions ======================= \
--> </span><span class="rem">- <target name="checkstyle" \
depends="init" description="Validate code against coding \
standards"> </span><span class="add">+
+ <target name="checkstyle"
+ description="Validate code against coding standards"
+ depends="checkstyle-main, checkstyle-tests" />
+
+ <target name="checkstyle-main"
+ depends="init" >
+
</span><span class="cx"> <taskdef \
resource="checkstyletask.properties" \
classpathref="report.classpath"/>
</span><span class="rem">- <checkstyle \
config="${etc.dir}/checkstyle-main.xml" \
failureProperty="checkstyle.failed" failonviolation="false"> \
</span><span class="add">+ <checkstyle \
config="${etc.dir}/checkstyle-main.xml" + \
failureProperty="checkstyle.failed" + \
failonviolation="false"> </span><span class="cx"> \
<fileset dir="${main.dir}"> <exclude \
name="Acme/**"/> <include name="**/*.java"/>
</span><span class="lines">@@ -351,10 +368,14 @@
</span><span class="cx"> <!-- <fail \
if="checkstyle.failed" message="Checkstyle failed - see report for \
details"/>--> </target>
</span><span class="rem">- <target name="-checkstyle-tests" \
depends="init" description="Validate test code against coding \
standards"> </span><span class="add">+ <target \
name="checkstyle-tests" + depends="init">
+
</span><span class="cx"> <taskdef \
resource="checkstyletask.properties" \
classpathref="report.classpath"/>
</span><span class="rem">- <checkstyle \
config="${etc.dir}/checkstyle-tests.xml" \
failureProperty="checkstyle.failed" failonviolation="false"> \
</span><span class="add">+ <checkstyle \
config="${etc.dir}/checkstyle-tests.xml" + \
failureProperty="checkstyle.failed" + \
failonviolation="false"> </span><span class="cx"> \
<fileset dir="${test.dir}" \
includes="**/*.java"/>
<fileset dir="${integration.test.dir}" \
includes="**/*.java"/>
<formatter type="xml" \
tofile="${checkstyle-tests.reports.dir}/checkstyle-errors.xml"/> \
</span><span class="lines">@@ -368,7 +389,8 @@ </span><span class="cx"> \
</target>
<!-- ================== Simian target Definitions ======================= \
--> </span><span class="rem">- <target name="-simian" \
depends="init" description="Do code duplication analysis" > \
</span><span class="add">+ <target name="simian" \
depends="init" + description="Do code duplication \
analysis" > </span><span class="cx"> <taskdef \
resource="simiantask.properties" \
classpathref="report.classpath"/>
<simian threshold="6" failOnDuplication="false">
</span><span class="lines">@@ -384,7 +406,9 @@
</span><span class="cx"> </target>
<!-- ================== Coverage target Definitions ======================= \
--> </span><span class="rem">- <target name="-instrument-main" \
description="Add JCoverage Instumentation"> </span><span class="add">+
+ <!-- Add JCoverage Instumentation -->
+ <target name="jcoverage-instrument" depends="compile">
</span><span class="cx"> <taskdef name="instrument" \
classname="com.jcoverage.ant.InstrumentTask" \
classpathref="report.classpath"/>
<instrument todir="${instrumented.classes.dir}" \
classpathref="report.classpath"> <fileset \
dir="${classes.dir}"> </span><span class="lines">@@ -393,30 +417,31 @@
</span><span class="cx"> </instrument>
</target>
</span><span class="rem">- <target name="-coverage-report" \
depends="test" description="Generate jCoverage report"> \
</span><span class="add">+ <target name="jcoverage" \
depends="test" description="Generate jCoverage report"> \
</span><span class="cx"> <available file="jcoverage.ser" \
property="jcoverage.ser.available"/>
<fail unless="jcoverage.ser.available" \
message="jcoverage.ser does not exist. The instrument task must be ran \
first."/>
<taskdef name="report" \
classname="com.jcoverage.ant.CoverageReportTask" \
classpathref="report.classpath"/>
<report srcdir="${main.dir}" \
destdir="${jcoverage.reports.dir}"/> </target>
</span><span class="rem">- <target name="set">
- <property name="mac.os" value="true"/>
- <property name="win.os" value="true"/>
-
- </target>
- <target name="cond" depends="set, cond-if"/>
</span><span class="add">+ <target name="set">
+ <property name="mac.os" value="true"/>
+ <property name="win.os" value="true"/>
+
+ </target>
</span><span class="cx">
</span><span class="rem">- <target name="cond-if" \
if="mac.os">
- <antcall target="cond-if-2"/>
- </target>
-
- <target name="cond-if-2" if="win.os">
- <antcall target="cond-if-3"/>
- </target>
-
- <target name="cond-if-3" unless="linux.os">
- <echo message="yes"/>
- </target>
</span><span class="add">+ <target name="cond" depends="set, \
cond-if"/> +
+ <target name="cond-if" if="mac.os">
+ <antcall target="cond-if-2"/>
+ </target>
+
+ <target name="cond-if-2" if="win.os">
+ <antcall target="cond-if-3"/>
+ </target>
+
+ <target name="cond-if-3" unless="linux.os">
+ <echo message="yes"/>
+ </target>
</span><span class="cx">
</project>
</span>
</pre>
</div>
</div>
</body>
</html>
_______________________________________________
Selenium-commits mailing list
Selenium-commits@lists.public.thoughtworks.org
http://lists.public.thoughtworks.org/mailman/listinfo/selenium-commits
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic