[svn-upgrade] Integrating new upstream version, jabref (2.3)
[debian/jabref.git] / build.xml
index 2c8a2ae..4855062 100644 (file)
--- a/build.xml
+++ b/build.xml
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
 <!--++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   Filename: $RCSfile: build.xml,v $
+   Filename: $RCSfile$
    Purpose:  Ant build file for Jabref.
 
              Ant-Download: http://jakarta.apache.org/ant
                help mailing list:      must be inserted
 
    Precondition: 1. Ant should be installed.
-                 2. JAVA_HOME environment variable contains the path to JDK1.4 or higher
+                 2. JAVA_HOME environment variable contains the path to JDK1.5 or higher
                  3. ANT_HOME environment variable contains the path to ant's home directory
 
    Language: XML
    Compiler: Ant
    Authors:  Joerg K. Wegner, wegnerj@informatik.uni-tuebingen.de
              Morten O. Alver
-   Version:  $Revision: 1.78 $
-             $Date: 2006/11/29 00:51:22 $
-             $Author: coezbek $
+   Version:  $Revision: 2460 $
+             $Date: 2007-11-04 16:58:28 +0100 (Sun, 04 Nov 2007) $
+             $Author: mortenalver $
 
    modified:
              23.11.2006 c.oezbek
@@ -47,7 +47,7 @@
      ========================================================================================== -->
 
        <!-- some version information -->
-       <property name="jabref.version" value="2.2" />
+       <property name="jabref.version" value="2.3" />
        <property name="jabref.placeholder.version" value="@version@" />
        <!-- used by replace task -->
 
                <and>
                        <os family="windows" />
                        <isset property="nsis.executable" />
-<!--                   <available file="${nsis.executable}" /> -->
                </and>
        </condition>
 
                <pathelement location="${library.directory}/antlr.jar" />
                <pathelement location="${library.directory}/antlr-3.0b5.jar" />
                <pathelement location="${library.directory}/looks-2.0.4.jar" />
-               <pathelement location="${library.directory}/forms-1.0.4.jar" />
+               <pathelement location="${library.directory}/forms-1.1.0.jar" />
                <pathelement location="${library.directory}/spin.jar" />
-               <pathelement location="${library.directory}/glazedlists-1.7.0_java14.jar" />
+               <pathelement location="${library.directory}/glazedlists-1.7.0_java15.jar" />
                <pathelement location="${library.directory}/microba.jar" />
                <pathelement location="${library.directory}/PDFBox-0.7.3-dev-reduced.jar" />
                <pathelement location="${library.directory}/JempBox-0.1.0-dev.jar" />
        </path>
 
        <target name="run" depends="build">
-               <java classname="net.sf.jabref.JabRef" fork="true">
+               <java classname="net.sf.jabref.JabRefMain" fork="true">
                        <classpath refid="classpath" />
                </java>
        </target>
 
        <!-- Runs project -->
        <target name="runFromJar" depends="jars">
-               <java classname="net.sf.jabref.JabRef" fork="true">
+               <java classname="net.sf.jabref.JabRefMain" fork="true">
                        <classpath>
                                <pathelement location="${build.lib}/${build.jar}" />
                        </classpath>
        <!-- Compiles project -->
        <target name="compile">
                <mkdir dir="${build.classes}" />
-               <javac debug="off" deprecation="on" destdir="${build.classes}" source="1.4" target="1.4">
+               <javac debug="off" deprecation="on" destdir="${build.classes}" source="1.5" target="1.5">
                        <src path="${java.dir}" />
                        <exclude name="tests/**" />
+                       <exclude name="**/JabRefMain.java" />
                        <classpath refid="classpath" />
                </javac>
+               <javac debug="off" deprecation="on" destdir="${build.classes}" source="1.4" target="1.4">
+                  <src path="${java.dir}" />
+                  <include name="**/JabRefMain.java" />
+                </javac>
+
        </target>
 
        <!-- Compiles only the tests -->
        <target name="compiletest">
                <mkdir dir="${build.classes}" />
                <!--deprecation="on"-->
-               <javac srcdir="${java.dir}/tests" debug="off" destdir="${build.classes}" source="1.4" target="1.4">
+               <javac srcdir="${java.dir}/tests" debug="off" destdir="${build.classes}" source="1.5" target="1.5">
                        <classpath refid="classpath" />
                </javac>
        </target>
        <target name="osx">
                <mkdir dir="${build.classes}" />
 
-               <javac srcdir="${osx.dir}" debug="on" destdir="${build.classes}" target="1.4">
+               <javac srcdir="${osx.dir}" debug="on" destdir="${build.classes}" target="1.5">
                </javac>
        </target>
 
                                <include name="README" />
                        </fileset>
                        <manifest>
-                               <attribute name="Main-Class" value="net.sf.jabref.JabRef" />
+                               <attribute name="Main-Class" value="net.sf.jabref.JabRefMain" />
                        </manifest>
                </jar>
 
@@ -360,9 +365,9 @@ version=${jabref.version}</echo>
                <unjar src="${library.directory}/antlr.jar" dest="${build.tmp}" />
                <unjar src="${library.directory}/antlr-3.0b5.jar" dest="${build.tmp}" />
                <unjar src="${library.directory}/looks-2.0.4.jar" dest="${build.tmp}" />
-               <unjar src="${library.directory}/forms-1.0.4.jar" dest="${build.tmp}" />
+               <unjar src="${library.directory}/forms-1.1.0.jar" dest="${build.tmp}" />
                <unjar src="${library.directory}/spin.jar" dest="${build.tmp}" />
-               <unjar src="${library.directory}/glazedlists-1.7.0_java14.jar" dest="${build.tmp}" />
+               <unjar src="${library.directory}/glazedlists-1.7.0_java15.jar" dest="${build.tmp}" />
                <unjar src="${library.directory}/microba.jar" dest="${build.tmp}" />
                <unjar src="${library.directory}/PDFBox-0.7.3-dev-reduced.jar" dest="${build.tmp}" />
                <unjar src="${library.directory}/JempBox-0.1.0-dev.jar" dest="${build.tmp}" />
@@ -384,17 +389,19 @@ version=${jabref.version}</echo>
        <!--++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-->
 
        <target name="win.installer.clean" description="Delete Installer and Exe-Wrapper + Temp-files">
-               <delete dir="${win.installer.dir}/dist" />
+               <delete failonerror="false" dir="${win.installer.dir}/dist" />
                <delete file="${win.installer.dir}/JabRefSetup.exe" />
        </target>
 
-       <target name="win.installer" if="is.windows" description="Copy files in place to be used by the installer">
+       <target name="win.installer" description="Copy files in place to be used by the installer" depends="jars">
 
+               <fail unless="is.windows" message="Not running on windows or NSIS not found. Please make sure that user.properties exists"/>
+               
                <!-- Gather everything that will go into the installer in dist -->
                <mkdir dir="${win.installer.dir}/dist" />
 
-               <!--            <copy file="${build.lib}/${jabref.bin}.jar
-               todir="${win.installer.dir}/dist" /> -->
+               <copy file="${build.lib}/${build.jar}
+               todir="${win.installer.dir}/dist" />
 
                <available property="win.installer.jar.available" file="${win.installer.dir}/dist/${build.jar}"/>
                
@@ -417,6 +424,9 @@ version=${jabref.version}</echo>
                <exec dir="." executable="${nsis.executable}" failonerror="true">
                        <arg line="'/DVERSION=${jabref.version}' ${win.installer.dir}/setup.nsi" />
                </exec>
+               
+               <delete dir="${win.installer.dir}/dist" />
+               
        </target>
 
        <!--++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++