[jsword-svn] r2295 - in trunk: bibledesktop-web jsword-web jsword-web/etc jsword-web/src/main/java/org/crosswire/jsword/view/web

dmsmith at crosswire.org dmsmith at crosswire.org
Sun Mar 10 15:36:29 MST 2013


Author: dmsmith
Date: 2013-03-10 15:36:29 -0700 (Sun, 10 Mar 2013)
New Revision: 2295

Removed:
   trunk/jsword-web/etc/javadoc/
   trunk/jsword-web/src/main/java/org/crosswire/jsword/view/web/Msg.java
Modified:
   trunk/bibledesktop-web/build.xml
   trunk/jsword-web/build.xml
   trunk/jsword-web/src/main/java/org/crosswire/jsword/view/web/DownloadSet.java
Log:
build improvements

Modified: trunk/bibledesktop-web/build.xml
===================================================================
--- trunk/bibledesktop-web/build.xml	2013-03-10 20:57:06 UTC (rev 2294)
+++ trunk/bibledesktop-web/build.xml	2013-03-10 22:36:29 UTC (rev 2295)
@@ -1,15 +1,19 @@
-<project name="jsword-web" default="all">
+<project name="bibledesktop" default="all">
+	<!-- We're cheating by naming this project "bibledesktop"
+	 == This allows this package to add on to the bibledesktop installation
+	 -->
 
 	<import file="../jsword/core.xml"/>
 	<property name="dependency"				value="bibledesktop"/>
 
 	<!--=======================================================================-->
 	<!-- override -->
-	<property name="website.bd.dir"			value="${website.bd.dir}"/>
-	<property name="website.bd.dir"	value="${website.bd.dir}"/>
+	<property name="website.bd.dir"			value="${dest.install.web.dir}"/>
+	<!-- override -->
+	<property name="package.bd.dir"			value="${dest.install.pkg.dir}"/>
 
 	<!--=======================================================================-->
-	<target name="webapp" description="Build an unpacked war file">
+	<target name="package.extra" description="Build an unpacked war file">
 		<mkdir dir="${website.bd.dir}" />
 		<xslt basedir="${src.main.web.dir}" extension=".html" style="${src.main.web.dir}/template.xsl" destdir="${website.bd.dir}">
 			<outputproperty name="method" value="html" />
@@ -28,10 +32,6 @@
 		<mkdir dir="${website.bd.dir}/WEB-INF/lib" />
 	</target>
 
-	<!--=======================================================================-->
-	<target name="install" depends="webapp" description="Install all the files" >
-	</target>
-
 	<!--=======================================================================
 	  == Override targets that should do nothing
 	  =======================================================================-->

Modified: trunk/jsword-web/build.xml
===================================================================
--- trunk/jsword-web/build.xml	2013-03-10 20:57:06 UTC (rev 2294)
+++ trunk/jsword-web/build.xml	2013-03-10 22:36:29 UTC (rev 2295)
@@ -1,4 +1,7 @@
-<project name="jsword-web" default="all">
+<project name="jsword" default="all">
+	<!-- We're cheating by naming this project "jsword"
+	 == This allows this package to add on to the jsword installation
+	 -->
 
 	<import file="../jsword/core.xml"/>
 
@@ -14,26 +17,11 @@
 	<!--=======================================================================-->
 	<!-- override -->
 	<property name="website.jsword.dir"		value="${dest.install.web.dir}"/>
-	<property name="dest.install.web.dir"	value="${website.jsword.dir}"/>
 	<!-- override -->
 	<property name="package.jsword.dir"		value="${dest.install.pkg.dir}"/>
-	<property name="dest.install.pkg.dir"		value="${package.jsword.dir}"/>
 
-
 	<property name="release.dir"      value="${ftp.base}/release"/>
 
-	<!--=======================================================================-->
-	<path id="path.alljava">
-		<pathelement path="../jsword/src/main/java"/>
-		<pathelement path="../bibledesktop/src/main/java"/>
-		<pathelement path="../jsword-web/src/main/java"/>
-	</path>
-	<patternset id="pattern.alljava">
-		<include name="jsword/src/main/java/**/*.java"/>
-		<include name="bibledesktop/src/main/java/**/*.java"/>
-		<include name="jsword-web/src/main/java/**/*.java"/>
-	</patternset>
-
 	<!--=======================================================================
 	  == Override targets that should do nothing
 	  =======================================================================-->
@@ -53,7 +41,15 @@
 	</target>
 
 	<!--=======================================================================-->
-	<target name="package" description="Build an unpacked war file">
+	<target	name="build"
+			description="Run a full build"
+			depends="compile">
+		<jar jarfile="${lib.dir}/jsword-web-${release.version}.jar">
+			<fileset dir="${dest.main.classes.dir}" />
+		</jar>
+	</target>
+
+	<target name="package.extra" description="Build an unpacked war file">
 		<mkdir dir="${dest.install.web.dir}"/>
 		<xslt basedir="${src.main.web.dir}" extension=".html" style="${src.main.web.dir}/template.xsl" destdir="${dest.install.web.dir}">
 			<include name="**/*.html"/>
@@ -82,7 +78,7 @@
 		<mkdir dir="${dest.install.web.dir}/WEB-INF/classes"/>
 		<mkdir dir="${dest.install.web.dir}/WEB-INF/lib"/>
 		<copy todir="${dest.install.web.dir}/WEB-INF/lib">
-			<fileset dir="${lib.dir}" includes="*.jar"/>
+			<fileset dir="${lib.dir}" includes="jsword-web*.jar"/>
 		</copy>
 		<!-- needed by the download servlet -->
 		<mkdir dir="${dest.install.pkg.dir}"/>

Modified: trunk/jsword-web/src/main/java/org/crosswire/jsword/view/web/DownloadSet.java
===================================================================
--- trunk/jsword-web/src/main/java/org/crosswire/jsword/view/web/DownloadSet.java	2013-03-10 20:57:06 UTC (rev 2294)
+++ trunk/jsword-web/src/main/java/org/crosswire/jsword/view/web/DownloadSet.java	2013-03-10 22:36:29 UTC (rev 2295)
@@ -25,6 +25,7 @@
 import java.io.FileFilter;
 import java.io.IOException;
 import java.text.DateFormat;
+import java.text.MessageFormat;
 import java.text.NumberFormat;
 import java.text.ParseException;
 import java.text.SimpleDateFormat;
@@ -56,7 +57,7 @@
     public static DownloadSet[] getDownloadSets(String localprefix, String webprefix, boolean datesort) throws IOException {
         File dir = new File(localprefix);
         if (!dir.isDirectory()) {
-            throw new IOException(Msg.lookupText("{0} is not a directory", localprefix));
+            throw new IOException(MessageFormat.format("{0} is not a directory", localprefix));
         }
 
         log.debug("dig {}", localprefix);
@@ -129,7 +130,7 @@
      * What is the version number (using the file name string)
      */
     public String getVersionString() {
-        return Msg.lookupText("Version {0}", setname);
+        return MessageFormat.format("Version {0}", setname);
     }
 
     /**

Deleted: trunk/jsword-web/src/main/java/org/crosswire/jsword/view/web/Msg.java
===================================================================
--- trunk/jsword-web/src/main/java/org/crosswire/jsword/view/web/Msg.java	2013-03-10 20:57:06 UTC (rev 2294)
+++ trunk/jsword-web/src/main/java/org/crosswire/jsword/view/web/Msg.java	2013-03-10 22:36:29 UTC (rev 2295)
@@ -1,47 +0,0 @@
-/**
- * Distribution License:
- * JSword is free software; you can redistribute it and/or modify it under
- * the terms of the GNU Lesser General Public License, version 2.1 or later
- * as published by the Free Software Foundation. This program is distributed
- * in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
- * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- * See the GNU Lesser General Public License for more details.
- *
- * The License is available on the internet at:
- *       http://www.gnu.org/copyleft/lgpl.html
- * or by writing to:
- *      Free Software Foundation, Inc.
- *      59 Temple Place - Suite 330
- *      Boston, MA 02111-1307, USA
- *
- * Copyright: 2005
- *     The copyright to this program is held by it's authors.
- *
- * ID: $Id$
- */
-package org.crosswire.jsword.view.web;
-
-import org.crosswire.common.util.MsgBase;
-
-/**
- * Compile safe Msg resource settings.
- * 
- * @see gnu.gpl.License for license details.<br>
- *      The copyright to this program is held by it's authors.
- * @author DM Smith [dmsmith555 at yahoo dot com]
- */
-final class Msg extends MsgBase {
-    /**
-     * Get the internationalized text, but return key if key is unknown.
-     * The text requires one or more parameters to be passed.
-     * 
-     * @param key
-     * @param params
-     * @return the formatted, internationalized text
-     */
-    public static String lookupText(String key, Object... params) {
-        return msg.lookup(key, params);
-    }
-
-    private static MsgBase msg = new Msg();
-}




More information about the jsword-svn mailing list