Author: Maital Ashkenazi
Date: 2010-11-21 06:35:20 -0800 (Sun, 21 Nov 2010)
New Revision: 22966
Modified:
csplugins/trunk/soc/maital/EnhancedSearch2/build.xml
Log:
edited for compiling with java 1.5
Modified: csplugins/trunk/soc/maital/EnhancedSearch2/build.xml
===================================================================
--- csplugins/trunk/soc/maital/EnhancedSearch2/build.xml 2010-11-21
00:58:13 UTC (rev 22965)
+++ csplugins/trunk/soc/maital/EnhancedSearch2/build.xml 2010-11-21
14:35:20 UTC (rev 22966)
@@ -26,22 +26,15 @@
<property name="root.dir" value="." />
<property name="resources.dir" value="${root.dir}/resources" />
<property name="src.dir" value="${root.dir}/src" />
- <property name="tests.dir" value="${root.dir}/tests" />
<property name="build.dir" value="${root.dir}/build" />
<property name="lib.dir" value="${root.dir}/lib" />
<property name="log.dir" value="${build.dir}/logs" />
+ <property name="cytoscape.dir" value="../cytoscape" />
<property name="junit.report.dir"
value="${log.dir}/junit-reports" />
<!-- Define the relevant files -->
<property name="project.jar" value="${name}.jar" />
- <property name="test.jar" value="${name}-tests.jar" />
- <artifact:remoteRepository id="cytoscape_releases"
url="http://cytoscape.wodaklab.org/nexus/content/repositories/releases/" />
- <artifact:remoteRepository id="cytoscape_snapshots"
url="http://cytoscape.wodaklab.org/nexus/content/repositories/snapshots/" />
- <artifact:dependencies pathId="dependency.classpath">
- <dependency groupId="cytoscape"
artifactId="application" version="2.8.0-SNAPSHOT" />
- </artifact:dependencies>
-
<!-- Define the class path -->
<path id="project.class.path">
<fileset dir="/usr/share/ant/lib">
@@ -50,7 +43,9 @@
<fileset dir="${lib.dir}">
<include name="*.jar" />
</fileset>
- <path refid="dependency.classpath" />
+ <fileset dir="${cytoscape.dir}">
+ <include name="*.jar" />
+ </fileset>
</path>
<!-- Define the junit class path - It needs to find what we
just built -->
@@ -64,16 +59,11 @@
<fileset dir="${lib.dir}">
<include name="*.jar" />
</fileset>
- <path refid="dependency.classpath" />
+ <fileset dir="${cytoscape.dir}">
+ <include name="*.jar" />
+ </fileset>
</path>
- <!-- Make sure tests is in the right place -->
- <condition property="tests.ok">
- <and>
- <available file="${tests.dir}" />
- </and>
- </condition>
-
</target>
<!--
=================================================================== -->
@@ -82,11 +72,8 @@
<target name="compile" depends="init">
<mkdir dir="${build.dir}" />
<mkdir dir="${log.dir}" />
- <javac srcdir="${src.dir}" classpathref="project.class.path"
destdir="${build.dir}" debug="${debug}" deprecation="${deprecation}"
optimize="${optimize}" fork="${fork}">
+ <javac srcdir="${src.dir}" classpathref="project.class.path"
destdir="${build.dir}" debug="${debug}" deprecation="${deprecation}"
compiler="javac1.5" optimize="${optimize}" fork="${fork}">
<compilerarg line="-Xlint:unchecked"/>
- <!--
- <compilerarg line="-Xlint:all -Xlint:-path"/>
- -->
</javac>
<echo message="Successfully ran compile task!" />
</target>
@@ -97,7 +84,7 @@
<!--
=================================================================== -->
<target name="jar" depends="compile">
- <!--copy file="${resources.dir}/plugin.props"
todir="${build.dir}/org/cytoscape/equations/internal/googlechart" /-->
+ <copy todir="build/csplugins/enhanced/search/"
file="resources/plugin.props"/>
<unjar dest="${build.dir}">
<fileset dir="${lib.dir}">
<include name="*.jar" />
@@ -113,27 +100,7 @@
<echo message="Successfully ran jar task!" />
</target>
- <!--
=================================================================== -->
- <!-- Compiles the tests
-->
- <!-- Note that this compilation occurs AFTER the distribution jar has
-->
- <!-- been created, so that the tests aren't distributed.
-->
- <!--
=================================================================== -->
- <target name="compile-tests" depends="jar" if="tests.ok">
- <javac srcdir="${tests.dir}" classpathref="junit.class.path"
destdir="${build.dir}" debug="${debug}" deprecation="${deprecation}"
optimize="${optimize}" fork="${fork}">
- <compilerarg line="-Xlint:all -Xlint:-path" />
- </javac>
- <echo message="Successfully ran compile-tests task!" />
- </target>
- <!--
=================================================================== -->
- <!-- Creates the project-tests.jar file
-->
- <!--
=================================================================== -->
- <target name="jar-tests" depends="compile-tests" if="tests.ok">
- <jar jarfile="${test.jar}" basedir="${build.dir}">
- </jar>
- <echo message="Successfully ran jar-tests task!" />
- </target>
-
<!-- ==================== Run Target ================================= -->
<target description="Runs Latest Version of Cytoscape with EnhancedSearch
Plugin"
name="run">
@@ -145,32 +112,8 @@
-
- <!--
=================================================================== -->
- <!-- Runs the unit tests.
-->
- <!--
=================================================================== -->
- <target name="test" depends="jar-tests" if="tests.ok">
- <junit printsummary="yes" haltonfailure="no" maxmemory="256m">
- <classpath refid="junit.class.path" />
- <formatter type="plain" usefile="true" />
- <formatter type="xml" usefile="true" />
- <batchtest fork="yes" todir="${log.dir}"
failureProperty="junit.test.failure" errorProperty="junit.test.failure">
- <fileset dir="${tests.dir}"
includes="**/*Test.java" excludes="**/AllTests.java" />
- </batchtest>
- </junit>
- <mkdir dir="${junit.report.dir}" />
- <junitreport todir="${junit.report.dir}">
- <fileset dir="${log.dir}">
- <include name="TEST-*.xml" />
- </fileset>
- <report format="frames" todir="${junit.report.dir}" />
- </junitreport>
- <fail message="TEST FAILURE!!! Details:
${junit.report.dir}/index.html" if="junit.test.failure" />
- <echo message="Successfully ran test task!" />
- </target>
-
<!-- ==================== JUnit Test Target ===========================
-->
- <target name="old-test" description="Runs all JUnit tests"
depends="compile">
+ <target name="test" description="Runs all JUnit tests"
depends="compile">
<junit printsummary="yes" fork="yes" haltonfailure="yes">
<formatter type="plain" usefile="false" />
<test
name="csplugins.enhanced.search.TestEnhancedSearch" />
@@ -181,7 +124,7 @@
<!--
=================================================================== -->
<!-- Do everything
-->
<!--
=================================================================== -->
- <target name="all" depends="jar,old-test,run" />
+ <target name="all" depends="clean,compile,jar,test" />
<!--
=================================================================== -->
<!-- Clean up, get back to original state
-->
--
You received this message because you are subscribed to the Google Groups
"cytoscape-cvs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/cytoscape-cvs?hl=en.