[jsword-svn] r2278 - in trunk: bibledesktop bibledesktop/etc/installer/macosx/BibleDesktop.app/Contents bibledesktop/etc/jnlp bibledesktop/src/main/java/org/crosswire/bibledesktop/book bibledesktop/src/main/java/org/crosswire/bibledesktop/book/install bibledesktop/src/main/java/org/crosswire/bibledesktop/desktop bibledesktop/src/main/java/org/crosswire/bibledesktop/display/basic bibledesktop/src/main/java/org/crosswire/bibledesktop/passage bibledesktop-web common-swing common-swing/src/main/java/org/crosswire/common/config/swing common-swing/src/main/java/org/crosswire/common/progress/swing common-swing/src/main/java/org/crosswire/common/swing jsword-web jsword-web/src/main/java/org/crosswire/jsword/view/web

dmsmith at crosswire.org dmsmith at crosswire.org
Mon Feb 25 19:41:40 MST 2013


Author: dmsmith
Date: 2013-02-25 19:41:39 -0700 (Mon, 25 Feb 2013)
New Revision: 2278

Modified:
   trunk/bibledesktop-web/build.xml
   trunk/bibledesktop/build.xml
   trunk/bibledesktop/etc/installer/macosx/BibleDesktop.app/Contents/Info.plist
   trunk/bibledesktop/etc/jnlp/bibledesktop.jnlp
   trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/book/BibleComboBoxModel.java
   trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/book/BooksListModel.java
   trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/book/install/SiteEditorFactory.java
   trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/desktop/Desktop.java
   trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/desktop/DesktopActions.java
   trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/display/basic/SplitBookDataDisplay.java
   trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/passage/KeyTreeCellRenderer.java
   trunk/common-swing/build.xml
   trunk/common-swing/src/main/java/org/crosswire/common/config/swing/AbstractConfigEditor.java
   trunk/common-swing/src/main/java/org/crosswire/common/config/swing/FieldMap.java
   trunk/common-swing/src/main/java/org/crosswire/common/config/swing/MappedOptionsField.java
   trunk/common-swing/src/main/java/org/crosswire/common/config/swing/OptionsField.java
   trunk/common-swing/src/main/java/org/crosswire/common/progress/swing/JobsProgressBar.java
   trunk/common-swing/src/main/java/org/crosswire/common/swing/ActionFactory.java
   trunk/common-swing/src/main/java/org/crosswire/common/swing/FontStore.java
   trunk/common-swing/src/main/java/org/crosswire/common/swing/GuiConvert.java
   trunk/common-swing/src/main/java/org/crosswire/common/swing/GuiUtil.java
   trunk/jsword-web/build.xml
   trunk/jsword-web/src/main/java/org/crosswire/jsword/view/web/DownloadSet.java
Log:
Build changes

Modified: trunk/bibledesktop/build.xml
===================================================================
--- trunk/bibledesktop/build.xml	2013-02-25 15:51:23 UTC (rev 2277)
+++ trunk/bibledesktop/build.xml	2013-02-26 02:41:39 UTC (rev 2278)
@@ -3,7 +3,6 @@
   <!-- This build uses the core build targets -->
   <import file="../jsword/core.xml"/>
   <property name="dependency"       value="common-swing"/>
-  <property name="dependency.jar"   value="../${dependency}/${target.jar}"/>
 
   <!--=======================================================================-->
   <property name="jnlp.homepage"     value="file:///${basedir}/${target.installed}"/> <!-- override -->

Modified: trunk/bibledesktop/etc/installer/macosx/BibleDesktop.app/Contents/Info.plist
===================================================================
--- trunk/bibledesktop/etc/installer/macosx/BibleDesktop.app/Contents/Info.plist	2013-02-25 15:51:23 UTC (rev 2277)
+++ trunk/bibledesktop/etc/installer/macosx/BibleDesktop.app/Contents/Info.plist	2013-02-26 02:41:39 UTC (rev 2278)
@@ -48,7 +48,9 @@
 			<string>$JAVAROOT/commons-codec-1.7.jar</string>
 			<string>$JAVAROOT/httpcore-4.2.3.jar</string>
 			<string>$JAVAROOT/httpclient-4.2.3.jar</string>
-			<string>$JAVAROOT/commons-logging-1.1.1.jar</string>
+			<string>$JAVAROOT/slf4j-api-172.jar</string>
+			<string>$JAVAROOT/slf4j-jdk14-172.jar</string>
+			<string>$JAVAROOT/jcl-over-slf4j-172.jar</string>
 			<string>$JAVAROOT/commons-net-3.2.jar</string>
 			<string>$JAVAROOT/javatar-2.5.jar</string>
 			<string>$JAVAROOT/jlfgr-1_0.jar</string>

Modified: trunk/bibledesktop/etc/jnlp/bibledesktop.jnlp
===================================================================
--- trunk/bibledesktop/etc/jnlp/bibledesktop.jnlp	2013-02-25 15:51:23 UTC (rev 2277)
+++ trunk/bibledesktop/etc/jnlp/bibledesktop.jnlp	2013-02-26 02:41:39 UTC (rev 2278)
@@ -37,7 +37,9 @@
     <jar href="commons-codec-1.7.jar"/>
     <jar href="httpcore-4.2.3.jar"/>
     <jar href="httpclient-4.2.3.jar"/>
-    <jar href="commons-logging-1.1.1.jar"/>
+	<jar href="slf4j-api-172.jar"/>
+	<jar href="slf4j-jdk14-172.jar"/>
+	<sjar href="jcl-over-slf4j-172.jar"/>
     <jar href="commons-net-3.2.jar"/>
     <jar href="lucene-core-3.0.3.jar"/>
     <jar href="lucene-snowball-3.0.3.jar"/>

Modified: trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/book/BibleComboBoxModel.java
===================================================================
--- trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/book/BibleComboBoxModel.java	2013-02-25 15:51:23 UTC (rev 2277)
+++ trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/book/BibleComboBoxModel.java	2013-02-26 02:41:39 UTC (rev 2278)
@@ -98,7 +98,7 @@
      * @see javax.swing.ComboBoxModel#setSelectedItem(java.lang.Object)
      */
     public void setSelectedItem(Object selected) {
-        log.debug("setSelectedItem(" + selected + ") level=" + level);
+        log.debug("setSelectedItem({}) level={}", selected, level);
 
         switch (level) {
         case BOOK:

Modified: trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/book/BooksListModel.java
===================================================================
--- trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/book/BooksListModel.java	2013-02-25 15:51:23 UTC (rev 2277)
+++ trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/book/BooksListModel.java	2013-02-26 02:41:39 UTC (rev 2278)
@@ -97,7 +97,7 @@
     public synchronized Object getElementAt(int index) {
         // PARANOIA(joe): this check shouldn't be needed
         if (index > books.size()) {
-            log.error("trying to get book at " + index + " when there are only " + books.size() + " known books.");
+            log.error("trying to get book at {} when there are only {} known books.", Integer.toString(index), Integer.toString(books.size()));
             return null;
         }
 

Modified: trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/book/install/SiteEditorFactory.java
===================================================================
--- trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/book/install/SiteEditorFactory.java	2013-02-25 15:51:23 UTC (rev 2277)
+++ trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/book/install/SiteEditorFactory.java	2013-02-26 02:41:39 UTC (rev 2278)
@@ -55,7 +55,7 @@
                 editor = clazz.newInstance();
                 editor.setInstaller(installer);
             } else {
-                log.warn("SiteEditor type (" + installer.getType() + ") unregistered.");
+                log.warn("SiteEditor type ({}) unregistered.", installer.getType());
             }
             return editor;
         } catch (MissingResourceException e) {

Modified: trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/desktop/Desktop.java
===================================================================
--- trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/desktop/Desktop.java	2013-02-25 15:51:23 UTC (rev 2277)
+++ trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/desktop/Desktop.java	2013-02-26 02:41:39 UTC (rev 2278)
@@ -745,7 +745,7 @@
         Container contentPane = getContentPane();
         if (contentPane instanceof JComponent) {
             ((JComponent) contentPane).setPreferredSize(contentPane.getSize());
-            //log.warn("The size of the contentpane is: " + contentPane.getSize());
+            //log.warn("The size of the contentpane is: {}", Integer.toString(contentPane.getSize()));
         }
     }
 

Modified: trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/desktop/DesktopActions.java
===================================================================
--- trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/desktop/DesktopActions.java	2013-02-25 15:51:23 UTC (rev 2277)
+++ trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/desktop/DesktopActions.java	2013-02-26 02:41:39 UTC (rev 2278)
@@ -120,10 +120,10 @@
                 return true;
             } catch (NoClassDefFoundError e) {
                 // This is thrown when EAWT or MacOSXadapter is not present.
-                log.error("This version of Mac OS X does not support the Apple EAWT.  Application Menu handling has been disabled (" + e + ")");
+                log.error("This version of Mac OS X does not support the Apple EAWT.  Application Menu handling has been disabled.", e);
             } catch (ClassNotFoundException e) {
                 // Should not happen
-                log.error("This version of Mac OS X does not support the Apple EAWT.  Application Menu handling has been disabled (" + e + ")");
+                log.error("This version of Mac OS X does not support the Apple EAWT.  Application Menu handling has been disabled.", e);
             } catch (Exception e) {
                 // Everything else.
                 log.error("Exception while loading the OSXAdapter:", e);

Modified: trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/display/basic/SplitBookDataDisplay.java
===================================================================
--- trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/display/basic/SplitBookDataDisplay.java	2013-02-25 15:51:23 UTC (rev 2277)
+++ trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/display/basic/SplitBookDataDisplay.java	2013-02-26 02:41:39 UTC (rev 2278)
@@ -98,11 +98,11 @@
 
         // Only set the passage if it has changed
         if (keyChanged) {
-            log.debug("new passage chosen: " + key.getName());
+            log.debug("new passage chosen: {}", key.getName());
         }
 
         if (bookChanged) {
-            log.debug("new book(s) chosen: " + Arrays.toString(books));
+            log.debug("new book(s) chosen: {}", Arrays.toString(books));
         }
 
         if (bookChanged || keyChanged) {

Modified: trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/passage/KeyTreeCellRenderer.java
===================================================================
--- trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/passage/KeyTreeCellRenderer.java	2013-02-25 15:51:23 UTC (rev 2277)
+++ trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/passage/KeyTreeCellRenderer.java	2013-02-26 02:41:39 UTC (rev 2278)
@@ -53,7 +53,7 @@
                 setText(key.getName());
             }
         } else { // if (value != null)
-            log.warn("value is not a key: " + value.getClass().getName());
+            log.warn("value is not a key: {}", value.getClass().getName());
         }
 
         return this;

Modified: trunk/bibledesktop-web/build.xml
===================================================================
--- trunk/bibledesktop-web/build.xml	2013-02-25 15:51:23 UTC (rev 2277)
+++ trunk/bibledesktop-web/build.xml	2013-02-26 02:41:39 UTC (rev 2278)
@@ -2,7 +2,6 @@
 
   <import file="../jsword/core.xml"/>
   <property name="dependency"         value="bibledesktop"/>
-  <property name="dependency.jar"     value="../${dependency}/${target.jar}"/>
   <property name="dependency.install" value="../${dependency}/${target.root}/${dependency}"/>
 
   <!--=======================================================================-->
@@ -37,9 +36,7 @@
     == Override targets that should do nothing
     =======================================================================-->
   <!-- It is necessary to build and prepare the dependencies -->
-  <target name="prepare"
-          depends="prepare.dependency"
-          description="Prepare the build by copying needed jars and files">
+  <target name="prepare" description="Prepare the build by copying needed jars and files">
     <!-- There are no jars to copy -->
   </target>
 

Modified: trunk/common-swing/build.xml
===================================================================
--- trunk/common-swing/build.xml	2013-02-25 15:51:23 UTC (rev 2277)
+++ trunk/common-swing/build.xml	2013-02-26 02:41:39 UTC (rev 2278)
@@ -3,6 +3,5 @@
   <!-- This build uses the core build targets -->
   <import file="../jsword/core.xml"/>
   <property name="dependency" value="jsword"/>
-  <property name="dependency.jar" value="../${dependency}/${target.jar}"/>
 
 </project>

Modified: trunk/common-swing/src/main/java/org/crosswire/common/config/swing/AbstractConfigEditor.java
===================================================================
--- trunk/common-swing/src/main/java/org/crosswire/common/config/swing/AbstractConfigEditor.java	2013-02-25 15:51:23 UTC (rev 2277)
+++ trunk/common-swing/src/main/java/org/crosswire/common/config/swing/AbstractConfigEditor.java	2013-02-26 02:41:39 UTC (rev 2278)
@@ -266,7 +266,7 @@
             String value = field.getValue();
 
             if (value == null) {
-                log.error("null value from key=" + key);
+                log.error("null value from key={}", key);
             }
 
             config.setLocal(key, value);
@@ -288,7 +288,7 @@
             String value = config.getLocal(key);
 
             if (field == null) {
-                log.error("Null field from key=" + key + ", skipping setting value=" + value);
+                log.error("Null field from key={}, skipping setting value={}", key, value);
             } else {
                 field.setValue(value);
             }

Modified: trunk/common-swing/src/main/java/org/crosswire/common/config/swing/FieldMap.java
===================================================================
--- trunk/common-swing/src/main/java/org/crosswire/common/config/swing/FieldMap.java	2013-02-25 15:51:23 UTC (rev 2277)
+++ trunk/common-swing/src/main/java/org/crosswire/common/config/swing/FieldMap.java	2013-02-26 02:41:39 UTC (rev 2278)
@@ -68,7 +68,7 @@
                 if (clazz != null) {
                     field = clazz.newInstance();
                 } else {
-                    log.warn("field type (" + type + ") unregistered.");
+                    log.warn("field type ({}) unregistered.", type);
                     field = new TextField();
                 }
             }
@@ -80,10 +80,10 @@
         }
 
         if (ex != null) {
-            log.warn("field type (" + type + ") initialization failed:", ex);
+            log.warn("field type ({}) initialization failed:", type, ex);
             Reporter.informUser(type, ex);
 
-            log.warn("field type (" + type + ") unregistered.");
+            log.warn("field type ({}) unregistered.", type);
             field = new TextField();
             field.setChoice(type);
         }

Modified: trunk/common-swing/src/main/java/org/crosswire/common/config/swing/MappedOptionsField.java
===================================================================
--- trunk/common-swing/src/main/java/org/crosswire/common/config/swing/MappedOptionsField.java	2013-02-25 15:51:23 UTC (rev 2277)
+++ trunk/common-swing/src/main/java/org/crosswire/common/config/swing/MappedOptionsField.java	2013-02-26 02:41:39 UTC (rev 2278)
@@ -116,7 +116,7 @@
         // Equate null and empty string
         Object selected = combo.getSelectedItem();
         if (value.length() > 0 && selected != null) {
-            log.warn("Checked for options without finding: '" + value + "'. Defaulting to first option: " + selected);
+            log.warn("Checked for options without finding: '{}. Defaulting to first option: {}", value, selected);
         }
     }
 

Modified: trunk/common-swing/src/main/java/org/crosswire/common/config/swing/OptionsField.java
===================================================================
--- trunk/common-swing/src/main/java/org/crosswire/common/config/swing/OptionsField.java	2013-02-25 15:51:23 UTC (rev 2277)
+++ trunk/common-swing/src/main/java/org/crosswire/common/config/swing/OptionsField.java	2013-02-26 02:41:39 UTC (rev 2278)
@@ -127,7 +127,7 @@
 
             combo.setSelectedItem(list[bestMatch]);
             if (bestMatch > 0) {
-                log.warn("Checked for options without finding exact match: '" + value + "'. Best match is: " + combo.getSelectedItem());
+                log.warn("Checked for options without finding exact match: '{}'. Best match is: {}", value, combo.getSelectedItem());
                 return;
             }
         }
@@ -135,7 +135,7 @@
         // Equate null and empty string
         Object selected = combo.getSelectedItem();
         if (value.length() > 0 && selected != null) {
-            log.warn("Checked for options without finding: '" + value + "'. Defaulting to first option: " + selected);
+            log.warn("Checked for options without finding: '{}'. Defaulting to first option: ", value, selected);
         }
     }
 

Modified: trunk/common-swing/src/main/java/org/crosswire/common/progress/swing/JobsProgressBar.java
===================================================================
--- trunk/common-swing/src/main/java/org/crosswire/common/progress/swing/JobsProgressBar.java	2013-02-25 15:51:23 UTC (rev 2277)
+++ trunk/common-swing/src/main/java/org/crosswire/common/progress/swing/JobsProgressBar.java	2013-02-26 02:41:39 UTC (rev 2278)
@@ -145,7 +145,7 @@
         ((Job) job).addWorkListener(this);
 
         int i = findEmptyPosition();
-        log.debug("adding job to panel at " + i + ": " + job.getJobName());
+        log.debug("adding job to panel at {}: {}", Integer.toString(i), job.getJobName());
 
         JProgressBar progress = new JProgressBar();
 //        if (job.getProgressMode() == ProgressMode.UNKNOWN) {
@@ -207,7 +207,7 @@
 
         positions.set(jobdata.getIndex(), null);
         jobs.remove(job);
-        log.debug("removing job from panel: " + jobdata.getJob().getJobName());
+        log.debug("removing job from panel: {}", jobdata.getJob().getJobName());
 
         this.remove(jobdata.getComponent());
         GuiUtil.refresh(this);

Modified: trunk/common-swing/src/main/java/org/crosswire/common/swing/ActionFactory.java
===================================================================
--- trunk/common-swing/src/main/java/org/crosswire/common/swing/ActionFactory.java	2013-02-25 15:51:23 UTC (rev 2277)
+++ trunk/common-swing/src/main/java/org/crosswire/common/swing/ActionFactory.java	2013-02-26 02:41:39 UTC (rev 2278)
@@ -166,7 +166,7 @@
 
         if (action == null || action.length() == 0) {
             // There's nothing to do.
-            log.error("No action available for: " + bean.getClass().getName());
+            log.error("No action available for: {}", bean.getClass().getName());
             return;
         }
 
@@ -193,7 +193,7 @@
         }
 
         if (ex != null) {
-            log.error("Could not execute method " + bean.getClass().getName() + "." + methodName + "()", ex);
+            log.error("Could not execute method {}.{}()", bean.getClass().getName(), methodName, ex);
         }
     }
 
@@ -208,7 +208,7 @@
         CWAction action = actions.get(key);
 
         if (action == null) {
-            log.info("Missing key: '" + key + "'. Known keys are: " + StringUtil.join(actions.keySet().toArray(), ", "));
+            log.info("Missing key: '{}'. Known keys are: {}", key, StringUtil.join(actions.keySet().toArray(), ", "));
             action = new CWAction();
             action.putValue(Action.NAME, key);
             action.putValue(Action.SHORT_DESCRIPTION, MISSING_RESOURCE);

Modified: trunk/common-swing/src/main/java/org/crosswire/common/swing/FontStore.java
===================================================================
--- trunk/common-swing/src/main/java/org/crosswire/common/swing/FontStore.java	2013-02-25 15:51:23 UTC (rev 2277)
+++ trunk/common-swing/src/main/java/org/crosswire/common/swing/FontStore.java	2013-02-26 02:41:39 UTC (rev 2278)
@@ -275,7 +275,7 @@
             fontMap = ResourceUtil.getProperties(storeName);
             loaded = true;
         } catch (IOException e) {
-            log.error("Unable to load the font store: " + fontStore);
+            log.error("Unable to load the font store: {}", fontStore);
             fontMap = new PropertyMap();
         }
     }

Modified: trunk/common-swing/src/main/java/org/crosswire/common/swing/GuiConvert.java
===================================================================
--- trunk/common-swing/src/main/java/org/crosswire/common/swing/GuiConvert.java	2013-02-25 15:51:23 UTC (rev 2277)
+++ trunk/common-swing/src/main/java/org/crosswire/common/swing/GuiConvert.java	2013-02-26 02:41:39 UTC (rev 2278)
@@ -67,7 +67,7 @@
         // old way
         String[] values = StringUtil.split(value, ",");
         if (values.length != 3) {
-            log.warn("Illegal font name: " + value);
+            log.warn("Illegal font name: {}", value);
             return null;
         }
         return new Font(values[0], Integer.parseInt(values[1]), Integer.parseInt(values[2]));
@@ -129,7 +129,7 @@
         }
 
         if (value.length() != 7) {
-            log.warn("Illegal colour name: " + value);
+            log.warn("Illegal colour name: {}", value);
             return null;
         }
 

Modified: trunk/common-swing/src/main/java/org/crosswire/common/swing/GuiUtil.java
===================================================================
--- trunk/common-swing/src/main/java/org/crosswire/common/swing/GuiUtil.java	2013-02-25 15:51:23 UTC (rev 2277)
+++ trunk/common-swing/src/main/java/org/crosswire/common/swing/GuiUtil.java	2013-02-26 02:41:39 UTC (rev 2278)
@@ -87,7 +87,7 @@
             URL url = ResourceUtil.getResource(name);
             return new ImageIcon(url);
         } catch (MissingResourceException ex) {
-            log.error("Failed to find icon name='" + name + "'", ex);
+            log.error("Failed to find icon name='{}'", name, ex);
             return null;
         }
     }
@@ -288,7 +288,7 @@
         honoredDim.width = finalDim.width;
         honoredDim.height = finalDim.height;
 
-        log.warn("Window size was: " + requestedDim + " is: " + honoredDim);
+        log.warn("Window size was: {} is: {}", requestedDim, honoredDim);
 
         return honoredState;
     }

Modified: trunk/jsword-web/build.xml
===================================================================
--- trunk/jsword-web/build.xml	2013-02-25 15:51:23 UTC (rev 2277)
+++ trunk/jsword-web/build.xml	2013-02-26 02:41:39 UTC (rev 2278)
@@ -1,102 +1,98 @@
 <project name="jsword-web" default="all">
 
-  <property name="target.installed" value="../bibledesktop/target/installed"/> <!-- override -->
+	<property name="target.installed" value="../bibledesktop/target/installed"/>
+	<!-- override -->
 
-  <import file="../jsword/core.xml"/>
+	<import file="../jsword/core.xml"/>
 
-  <property name="dependency"         value="bibledesktop-web"/>
-  <property name="dependency.jar"     value="../bibledesktop/${target.jar}"/>
+	<property name="dependency"         value="bibledesktop-web"/>
 
-  <!--=======================================================================-->
-  <property name="source.web"       value="${source.root}/main/webapp"/>
+	<!--=======================================================================-->
+	<property name="source.web"       value="${source.root}/main/webapp"/>
 
-  <property name="webapp.jsword"    value="${target.root}/webapp"/> <!-- override -->
-  <property name="jnlp.hostname"    value="localhost:8080"/> <!-- override -->
-  <property name="ftp.base"         value="${basedir}/${target.root}/download"/> <!-- override -->
-  <property name="ftp.prefix"       value="../download"/> <!-- override -->
+	<property name="webapp.jsword"    value="${target.root}/webapp"/>
+	<!-- override -->
+	<property name="jnlp.hostname"    value="localhost:8080"/>
+	<!-- override -->
+	<property name="ftp.base"         value="${basedir}/${target.root}/download"/>
+	<!-- override -->
+	<property name="ftp.prefix"       value="../download"/>
+	<!-- override -->
 
-  <property name="nightly.dir"      value="${ftp.base}/nightly"/>
-  <property name="release.dir"      value="${ftp.base}/release"/>
-  <property name="target.web"       value="${webapp.jsword}"/>
+	<property name="nightly.dir"      value="${ftp.base}/nightly"/>
+	<property name="release.dir"      value="${ftp.base}/release"/>
+	<property name="target.web"       value="${webapp.jsword}"/>
 
-  <!--=======================================================================-->
-  <path id="path.alljava">
-    <pathelement path="../common-swing/src/main/java"/>
-    <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="common-swing/src/main/java/**/*.java"/>
-    <include name="jsword/src/main/java/**/*.java"/>
-    <include name="bibledesktop/src/main/java/**/*.java"/>
-    <include name="jsword-web/src/main/java/**/*.java"/>
-  </patternset>
-  <fileset id="fileset.alljava" dir="..">
-    <patternset refid="pattern.alljava"/>
-  </fileset>
-  <path id="path.allclasses">
-    <pathelement path="../common-swing/${target.classes}"/>
-    <pathelement path="../jsword/${target.classes}"/>
-    <pathelement path="../bibledesktop/${target.classes}"/>
-    <pathelement path="../jsword-web/${target.classes}"/>
-  </path>
+	<!--=======================================================================-->
+	<path id="path.alljava">
+		<pathelement path="../common-swing/src/main/java"/>
+		<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="common-swing/src/main/java/**/*.java"/>
+		<include name="jsword/src/main/java/**/*.java"/>
+		<include name="bibledesktop/src/main/java/**/*.java"/>
+		<include name="jsword-web/src/main/java/**/*.java"/>
+	</patternset>
+	<fileset id="fileset.alljava" dir="..">
+		<patternset refid="pattern.alljava"/>
+	</fileset>
+	<path id="path.allclasses">
+		<pathelement path="../common-swing/${target.classes}"/>
+		<pathelement path="../jsword/${target.classes}"/>
+		<pathelement path="../bibledesktop/${target.classes}"/>
+		<pathelement path="../jsword-web/${target.classes}"/>
+	</path>
 
-  <property name="support.tools" value="../jsword-support/tools"/>
-  <import file="${support.tools}/java2html/build.xml"/>
-  <import file="${support.tools}/javancss/build.xml"/>
-  <import file="${support.tools}/jcoverage/build.xml"/>
-  <import file="${support.tools}/jdepend/build.xml"/>
-  <import file="${support.tools}/pmd/build.xml"/>	
+	<property name="support.tools" value="../jsword-support/tools"/>
+	<import file="${support.tools}/java2html/build.xml"/>
+	<import file="${support.tools}/javancss/build.xml"/>
+	<import file="${support.tools}/jcoverage/build.xml"/>
+	<import file="${support.tools}/jdepend/build.xml"/>
+	<import file="${support.tools}/pmd/build.xml"/>
 
-	  <target name="findbugs" depends="build,findbugs.task">
-	    <mkdir dir="${target.web}/findbugs"/>
-	    <findbugs home="${findbugs.home}"
+	<target name="findbugs" depends="build,findbugs.task">
+		<mkdir dir="${target.web}/findbugs"/>
+		<findbugs home="${findbugs.home}"
 	    	projectName="JSword/BibleDesktop"
 	    	output="html"
 	        outputFile="${target.web}/findbugs/index.html"
 	        reportLevel="low"
 	        workHard="true"
 	        jvmargs="-Xmx512m">
-	      <class location="${target.jar}/bibledesktop-${release.version}.jar"/>
-	      <class location="${target.jar}/jsword-${release.version}.jar"/>
-	      <class location="${target.jar}/jsword-common-swing-${release.version}.jar"/>
-	      <sourcePath>
-	        <dirset dir=".." includes="**/${source.java}"/>
-	      </sourcePath>
-		  <auxClasspath>
-			<fileset dir="${target.jar}" includes="*.jar" />
-		  </auxClasspath>
-	    </findbugs>
-	  </target>
+			<class location="${target.jar}/bibledesktop-${release.version}.jar"/>
+			<class location="${target.jar}/jsword-${release.version}.jar"/>
+			<class location="${target.jar}/jsword-common-swing-${release.version}.jar"/>
+			<sourcePath>
+				<dirset dir=".." includes="**/${source.java}"/>
+			</sourcePath>
+			<auxClasspath>
+				<fileset dir="${target.jar}" includes="*.jar" />
+			</auxClasspath>
+		</findbugs>
+	</target>
 
-	  <target name="checkstyle" depends="checkstyle.task">
-	    <mkdir dir="${target.web}/checkstyle"/>
-	    <copy file="${checkstyle.config}" overwrite="true"
-	        tofile="${target.web}/checkstyle/custom.xml">
-	      <filterset>
-	        <filter token="source.java" value="${basedir}/${source.java}"/>
-	        <filter token="target.checkstyle" value="${webapp.jsword}/checkstyle"/>
-	      </filterset>
-	    </copy>
-	    <checkstyle config="${checkstyle.config}" failOnViolation="${checkstyle.fail}">
-	      <fileset refid="fileset.alljava"/>
-	      <formatter type="plain"/>
-	      <formatter type="xml" toFile="${target.web}/checkstyle/checkstyle_errors.xml"/>
-	    </checkstyle>
-	    <xslt
-	        in="${target.web}/checkstyle/checkstyle_errors.xml"
-	        out="${target.web}/checkstyle/index.html"
-	        style="${checkstyle.home}/contrib/checkstyle-simple.xsl">
-	      <xmlcatalog refid="commonDTDs"/>
-	    </xslt>
-	  </target>
+	<target name="checkstyle" depends="checkstyle.task">
+		<mkdir dir="${target.web}/checkstyle"/>
+		<checkstyle config="${checkstyle.config}" failOnViolation="${checkstyle.fail}">
+			<property key="checkstyle.basedir" file="${source.java}" />
+			<property key="checkstyle.cache.file" file="${target.root}/checkstyle.cache.dat" />
+			<fileset refid="fileset.alljava" />
+			<formatter type="plain" />
+			<formatter type="xml" toFile="${target.web}/checkstyle/checkstyle_errors.xml" />
+		</checkstyle>
+		<xslt in="${target.web}/checkstyle/checkstyle_errors.xml" out="${target.web}/checkstyle/index.html" style="${checkstyle.home}/contrib/checkstyle-simple.xsl">
+			<xmlcatalog refid="commonDTDs"/>
+		</xslt>
+	</target>
 
-  <target name="javadoc" description="Create JavaDoc">
-    <!-- This is not incremental. Empty it so it can remove unused docs. -->
-    <delete dir="${target.web}/api"/>
-    <mkdir dir="${target.web}/api"/>
-    <javadoc
+	<target name="javadoc" description="Create JavaDoc">
+		<!-- This is not incremental. Empty it so it can remove unused docs. -->
+		<delete dir="${target.web}/api"/>
+		<mkdir dir="${target.web}/api"/>
+		<javadoc
         sourcepathref="path.alljava"
         packagenames="org.crosswire.*,gnu.gpl.*,gnu.lgpl.*"
         classpathref="runtime.jarpath"
@@ -110,157 +106,157 @@
         version="true"
         source="1.5"
         failonerror="false">
-      <footer>Copyright &#168; 2003-2011</footer>
-      <link offline="true" href="http://download.oracle.com/javase/1.5.0/docs/api/" packagelistLoc="${source.etc}/javadoc"/>
-    </javadoc>
-  </target>
+			<footer>Copyright &#168; 2003-2011</footer>
+			<link offline="true" href="http://download.oracle.com/javase/1.5.0/docs/api/" packagelistLoc="${source.etc}/javadoc"/>
+		</javadoc>
+	</target>
 
-  <!--=======================================================================-->
-  <target name="tools" depends="java2html,checkstyle,javancss,findbugs,pmd,cpd,jdepend"/>
+	<!--=======================================================================-->
+	<target name="tools" depends="java2html,checkstyle,javancss,findbugs,pmd,cpd,jdepend"/>
 
-  <!--=======================================================================-->
-  <target name="install"
+	<!--=======================================================================-->
+	<target name="install"
           depends="install.dependency, install.check"
           unless="release.uptodate"
           description="Install all the files">
-    <antcall target="do.install"/>
-  </target>
-  <target name="do.install"
+		<antcall target="do.install"/>
+	</target>
+	<target name="do.install"
           depends="webapp, tools, release.nightly">
-    <!-- Create a flag file used to determine whether this task finished successfully -->
-    <touch file="${target.root}/.flagfile"/>
-  </target>
-  <target name="install.check">
-    <uptodate property="release.uptodate"
+		<!-- Create a flag file used to determine whether this task finished successfully -->
+		<touch file="${target.root}/.flagfile"/>
+	</target>
+	<target name="install.check">
+		<uptodate property="release.uptodate"
         targetfile="${target.root}/.flagfile">
-      <srcfiles dir="${target.jar}" includes="*"/>
-    </uptodate>
-    <echo message="release.uptodate result: ${release.uptodate}"/>
-  </target>
+			<srcfiles dir="${target.jar}" includes="*"/>
+		</uptodate>
+		<echo message="release.uptodate result: ${release.uptodate}"/>
+	</target>
 
-  <!--=======================================================================-->
-  <target name="webapp" description="Build an unpacked war file">
-    <mkdir dir="${target.web}"/>
-    <xslt basedir="${source.web}" extension=".html" style="${source.web}/template.xsl" destdir="${target.web}">
-      <include name="**/*.html"/>
-      <xmlcatalog refid="commonDTDs"/>
-    </xslt>
-    <xslt basedir="${source.web}" extension=".jsp" style="${source.web}/template.xsl" destdir="${target.web}">
-      <include name="*.jsp"/>
-      <xmlcatalog refid="commonDTDs"/>
-    </xslt>
-    <mkdir dir="${target.web}/WEB-INF"/>
-    <copy todir="${target.web}/WEB-INF" filtering="true">
-      <filterset>
-        <filter token="ftp.base" value="${ftp.base}"/>
-        <filter token="ftp.prefix" value="${ftp.prefix}"/>
-      </filterset>
-      <fileset dir="${source.web}/WEB-INF"/>
-    </copy>
-    <copy todir="${target.web}">
-      <fileset dir="${source.web}">
-        <exclude name="*.jsp"/>
-        <exclude name="*.html"/>
-        <exclude name="*.xsl"/>
-        <exclude name="WEB-INF/**"/>
-      </fileset>
-    </copy>
-    <mkdir dir="${target.web}/WEB-INF/classes"/>
-    <mkdir dir="${target.web}/WEB-INF/lib"/>
-    <copy todir="${target.web}/WEB-INF/lib">
-      <fileset dir="${target.jar}" includes="*.jar"/>
-    </copy>
-    <!-- needed by the download servlet -->
-    <mkdir dir="${nightly.dir}"/>
-    <mkdir dir="${release.dir}"/>
-    <!-- build the iBD servlet -->
-    <xslt basedir="${source.web}/iBD" extension=".html" style="${source.web}/template.xsl" destdir="${target.web}">
-      <include name="**/tutorial.html"/>
-      <xmlcatalog refid="commonDTDs"/>
-    </xslt>
-    <copy todir="${target.web}/WEB-INF">
-      <fileset dir="${source.web}/iBD/WEB-INF">
-        <!-- This is what it would be if it were a stand-alone servlet -->
-        <!-- But we have included a different web.xml with this already defined -->
-        <exclude name="web.xml"/>
-      </fileset>
-    </copy>
-    <copy todir="${target.web}/WEB-INF/lib">
-      <fileset dir="${source.web}/iBD/WEB-INF/lib" includes="*.jar"/>
-    </copy>
-    <copy todir="${target.web}">
-      <fileset dir="${source.web}/iBD">
-        <include name="*.js"/>
-        <include name="iBD.*"/>
-        <exclude name="WEB-INF/**"/>
-      </fileset>
-    </copy>
-  </target>
+	<!--=======================================================================-->
+	<target name="webapp" description="Build an unpacked war file">
+		<mkdir dir="${target.web}"/>
+		<xslt basedir="${source.web}" extension=".html" style="${source.web}/template.xsl" destdir="${target.web}">
+			<include name="**/*.html"/>
+			<xmlcatalog refid="commonDTDs"/>
+		</xslt>
+		<xslt basedir="${source.web}" extension=".jsp" style="${source.web}/template.xsl" destdir="${target.web}">
+			<include name="*.jsp"/>
+			<xmlcatalog refid="commonDTDs"/>
+		</xslt>
+		<mkdir dir="${target.web}/WEB-INF"/>
+		<copy todir="${target.web}/WEB-INF" filtering="true">
+			<filterset>
+				<filter token="ftp.base" value="${ftp.base}"/>
+				<filter token="ftp.prefix" value="${ftp.prefix}"/>
+			</filterset>
+			<fileset dir="${source.web}/WEB-INF"/>
+		</copy>
+		<copy todir="${target.web}">
+			<fileset dir="${source.web}">
+				<exclude name="*.jsp"/>
+				<exclude name="*.html"/>
+				<exclude name="*.xsl"/>
+				<exclude name="WEB-INF/**"/>
+			</fileset>
+		</copy>
+		<mkdir dir="${target.web}/WEB-INF/classes"/>
+		<mkdir dir="${target.web}/WEB-INF/lib"/>
+		<copy todir="${target.web}/WEB-INF/lib">
+			<fileset dir="${target.jar}" includes="*.jar"/>
+		</copy>
+		<!-- needed by the download servlet -->
+		<mkdir dir="${nightly.dir}"/>
+		<mkdir dir="${release.dir}"/>
+		<!-- build the iBD servlet -->
+		<xslt basedir="${source.web}/iBD" extension=".html" style="${source.web}/template.xsl" destdir="${target.web}">
+			<include name="**/tutorial.html"/>
+			<xmlcatalog refid="commonDTDs"/>
+		</xslt>
+		<copy todir="${target.web}/WEB-INF">
+			<fileset dir="${source.web}/iBD/WEB-INF">
+				<!-- This is what it would be if it were a stand-alone servlet -->
+				<!-- But we have included a different web.xml with this already defined -->
+				<exclude name="web.xml"/>
+			</fileset>
+		</copy>
+		<copy todir="${target.web}/WEB-INF/lib">
+			<fileset dir="${source.web}/iBD/WEB-INF/lib" includes="*.jar"/>
+		</copy>
+		<copy todir="${target.web}">
+			<fileset dir="${source.web}/iBD">
+				<include name="*.js"/>
+				<include name="iBD.*"/>
+				<exclude name="WEB-INF/**"/>
+			</fileset>
+		</copy>
+	</target>
 
 
-  <!--=======================================================================-->
-  <target name="release.nightly" description="Build a nightly release fileset">
-    <tstamp>
-      <format property="today" pattern="yyyyMMdd"/>
-    </tstamp>
-    <antcall target="release.version">
-      <param name="version" value="${release.version}-${today}"/>
-      <param name="directory" value="${nightly.dir}"/>
-    </antcall>
-  </target>
+	<!--=======================================================================-->
+	<target name="release.nightly" description="Build a nightly release fileset">
+		<tstamp>
+			<format property="today" pattern="yyyyMMdd"/>
+		</tstamp>
+		<antcall target="release.version">
+			<param name="version" value="${release.version}-${today}"/>
+			<param name="directory" value="${nightly.dir}"/>
+		</antcall>
+	</target>
 
-  <!--=======================================================================-->
-  <target name="release.final">
-    <antcall target="release.version">
-      <param name="version" value="${release.version}"/>
-      <param name="directory" value="${release.dir}"/>
-    </antcall>
-  </target>
+	<!--=======================================================================-->
+	<target name="release.final">
+		<antcall target="release.version">
+			<param name="version" value="${release.version}"/>
+			<param name="directory" value="${release.dir}"/>
+		</antcall>
+	</target>
 
-  <!--=======================================================================-->
-  <target name="release.version" depends="javadoc">
-    <echo message="Building release ${version} to ${directory}"/>
-    <echo message="Target.installed is ${target.installed}"/>
-    <!-- source packages -->
-    <mkdir dir="${directory}"/>
-    <zip zipfile="${directory}/jsword-${version}-src.zip">
-      <zipfileset prefix="jsword-${version}/jsword"       dir="../jsword/src/main/java"/>
-      <zipfileset prefix="jsword-${version}/jsword"       dir="../jsword/src/main/resources"/>
-      <zipfileset prefix="jsword-${version}/common-swing" dir="../common-swing/src/main/java"/>
-      <!-- <zipfileset prefix="jsword-${version}/common-swing" dir="../common-swing/src/main/resources"/> -->
-      <zipfileset prefix="jsword-${version}/bibledesktop" dir="../bibledesktop/src/main/java"/>
-      <zipfileset prefix="jsword-${version}/bibledesktop" dir="../bibledesktop/src/main/resources"/>
-    </zip>
-    <tar tarfile="${directory}/jsword-${version}-src.tar.gz" compression="gzip">
-      <tarfileset prefix="jsword-${version}/jsword"       dir="../jsword/src/main/java"/>
-      <tarfileset prefix="jsword-${version}/jsword"       dir="../jsword/src/main/resources"/>
-      <tarfileset prefix="jsword-${version}/common-swing" dir="../common-swing/src/main/java"/>
-      <!-- <tarfileset prefix="jsword-${version}/common-swing" dir="../common-swing/src/main/resources"/> -->
-      <tarfileset prefix="jsword-${version}/bibledesktop" dir="../bibledesktop/src/main/java"/>
-      <tarfileset prefix="jsword-${version}/bibledesktop" dir="../bibledesktop/src/main/resources"/>
-    </tar>
-    <!-- binary packages -->
-    <zip zipfile="${directory}/jsword-${version}-bin.zip">
-      <zipfileset prefix="jsword-${version}" dir="${target.installed}" excludes="BibleDesktop.app.zip,BibleDesktopSetup.exe"/>
-    </zip>
-    <tar tarfile="${directory}/jsword-${version}-bin.tar.gz" compression="gzip">
-      <tarfileset prefix="jsword-${version}" dir="${target.installed}" excludes="BibleDesktop.app.zip,BibleDesktopSetup.exe"/>
-    </tar>
-    <symlink link="${directory}/jsword-latest-bin.tar.gz"
+	<!--=======================================================================-->
+	<target name="release.version" depends="javadoc">
+		<echo message="Building release ${version} to ${directory}"/>
+		<echo message="Target.installed is ${target.installed}"/>
+		<!-- source packages -->
+		<mkdir dir="${directory}"/>
+		<zip zipfile="${directory}/jsword-${version}-src.zip">
+			<zipfileset prefix="jsword-${version}/jsword"       dir="../jsword/src/main/java"/>
+			<zipfileset prefix="jsword-${version}/jsword"       dir="../jsword/src/main/resources"/>
+			<zipfileset prefix="jsword-${version}/common-swing" dir="../common-swing/src/main/java"/>
+			<!-- <zipfileset prefix="jsword-${version}/common-swing" dir="../common-swing/src/main/resources"/> -->
+			<zipfileset prefix="jsword-${version}/bibledesktop" dir="../bibledesktop/src/main/java"/>
+			<zipfileset prefix="jsword-${version}/bibledesktop" dir="../bibledesktop/src/main/resources"/>
+		</zip>
+		<tar tarfile="${directory}/jsword-${version}-src.tar.gz" compression="gzip">
+			<tarfileset prefix="jsword-${version}/jsword"       dir="../jsword/src/main/java"/>
+			<tarfileset prefix="jsword-${version}/jsword"       dir="../jsword/src/main/resources"/>
+			<tarfileset prefix="jsword-${version}/common-swing" dir="../common-swing/src/main/java"/>
+			<!-- <tarfileset prefix="jsword-${version}/common-swing" dir="../common-swing/src/main/resources"/> -->
+			<tarfileset prefix="jsword-${version}/bibledesktop" dir="../bibledesktop/src/main/java"/>
+			<tarfileset prefix="jsword-${version}/bibledesktop" dir="../bibledesktop/src/main/resources"/>
+		</tar>
+		<!-- binary packages -->
+		<zip zipfile="${directory}/jsword-${version}-bin.zip">
+			<zipfileset prefix="jsword-${version}" dir="${target.installed}" excludes="BibleDesktop.app.zip,BibleDesktopSetup.exe"/>
+		</zip>
+		<tar tarfile="${directory}/jsword-${version}-bin.tar.gz" compression="gzip">
+			<tarfileset prefix="jsword-${version}" dir="${target.installed}" excludes="BibleDesktop.app.zip,BibleDesktopSetup.exe"/>
+		</tar>
+		<symlink link="${directory}/jsword-latest-bin.tar.gz"
              resource="${directory}/jsword-${version}-bin.tar.gz"
              overwrite="true"
              failonerror="false"
     />
-    <!-- documentation packages -->
-    <zip zipfile="${directory}/jsword-${version}-doc.zip">
-      <zipfileset prefix="jsword-${version}" dir="${target.web}/api"/>
-    </zip>
-    <tar tarfile="${directory}/jsword-${version}-doc.tar.gz" compression="gzip">
-      <tarfileset prefix="jsword-${version}" dir="${target.web}/api"/>
-    </tar>
-  </target>
+		<!-- documentation packages -->
+		<zip zipfile="${directory}/jsword-${version}-doc.zip">
+			<zipfileset prefix="jsword-${version}" dir="${target.web}/api"/>
+		</zip>
+		<tar tarfile="${directory}/jsword-${version}-doc.tar.gz" compression="gzip">
+			<tarfileset prefix="jsword-${version}" dir="${target.web}/api"/>
+		</tar>
+	</target>
 
-  <!--=======================================================================
+	<!--=======================================================================
   <target name="test.suite" depends="alltests" description="Run a full test suite">
   </target>
 -->

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-02-25 15:51:23 UTC (rev 2277)
+++ trunk/jsword-web/src/main/java/org/crosswire/jsword/view/web/DownloadSet.java	2013-02-26 02:41:39 UTC (rev 2278)
@@ -38,11 +38,11 @@
             throw new IOException(Msg.lookupText("{0} is not a directory", localprefix));
         }
 
-        log.debug("dig " + localprefix);
+        log.debug("dig {}", localprefix);
         File[] files = dir.listFiles(new FileFilter() {
             public boolean accept(File file) {
                 String name = file.getName();
-                log.debug("found " + name);
+                log.debug("found {}", name);
                 return file.canRead() && name.startsWith(TEST_PREFIX) && name.endsWith(TEST_SUFFIX);
             }
         });
@@ -50,7 +50,7 @@
         SortedSet<DownloadSet> reply = new TreeSet<DownloadSet>();
         for (int i = 0; i < files.length; i++) {
             String name = files[i].getName();
-            log.debug("adding " + name);
+            log.debug("adding {}", name);
             String sets = name.substring(TEST_PREFIX.length(), name.length() - TEST_SUFFIX.length());
             reply.add(new DownloadSet(localprefix, webprefix, sets, datesort));
         }
@@ -67,7 +67,7 @@
         this.setname = setname;
         this.datesort = datesort;
 
-        log.debug("ctor " + webprefix);
+        log.debug("ctor {}", webprefix);
     }
 
     /*
@@ -123,7 +123,7 @@
         String size = NF.format(file.length() / (1024.0F * 1024.0F));
         String reply = "<a href='" + webprefix + '/' + TEST_PREFIX + setname + extension + "'>" + size + " Mb</a>";
 
-        log.debug("link=" + reply);
+        log.debug("link={}", reply);
 
         return reply;
     }




More information about the jsword-svn mailing list