tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r893744 - in /tomcat/trunk/java/org/apache: catalina/startup/LocalStrings.properties jasper/resources/LocalStrings.properties tomcat/util/scan/Constants.java tomcat/util/scan/DefaultJarScanner.java tomcat/util/scan/LocalStrings.properties
Date Thu, 24 Dec 2009 12:49:47 GMT
Author: markt
Date: Thu Dec 24 12:49:46 2009
New Revision: 893744

URL: http://svn.apache.org/viewvc?rev=893744&view=rev
Log:
Clean up i18n resources after JarScanner changes

Added:
    tomcat/trunk/java/org/apache/tomcat/util/scan/Constants.java   (with props)
    tomcat/trunk/java/org/apache/tomcat/util/scan/LocalStrings.properties   (with props)
Modified:
    tomcat/trunk/java/org/apache/catalina/startup/LocalStrings.properties
    tomcat/trunk/java/org/apache/jasper/resources/LocalStrings.properties
    tomcat/trunk/java/org/apache/tomcat/util/scan/DefaultJarScanner.java

Modified: tomcat/trunk/java/org/apache/catalina/startup/LocalStrings.properties
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/startup/LocalStrings.properties?rev=893744&r1=893743&r2=893744&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/startup/LocalStrings.properties (original)
+++ tomcat/trunk/java/org/apache/catalina/startup/LocalStrings.properties Thu Dec 24 12:49:46
2009
@@ -97,11 +97,6 @@
 hostConfig.undeploy=Undeploying context [{0}]
 hostConfig.undeploy.error=Error undeploying web application at context path {0}
 hostConfig.undeploying=Undeploying deployed web applications
-jarScan.classloaderFail=Failed to scan [{0}] from classloader hierarchy
-jarScan.classloaderStart=Scanning for JARs in classloader hierarchy
-jarScan.jarUrlStart=Scanning JAR at URL [{0}]
-jarScan.webinflibFail=Failed to scan JAR [{0}] from WEB-INF/lib
-jarScan.webinflibStart=Scanning WEB-INF/lib for JARs
 tldConfig.addListeners=Adding {0} listeners from TLD files
 tldConfig.cce=Lifecycle event data object {0} is not a Context
 tldConfig.dirFail=Failed to process directory [{0}] for TLD files

Modified: tomcat/trunk/java/org/apache/jasper/resources/LocalStrings.properties
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/resources/LocalStrings.properties?rev=893744&r1=893743&r2=893744&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/jasper/resources/LocalStrings.properties (original)
+++ tomcat/trunk/java/org/apache/jasper/resources/LocalStrings.properties Thu Dec 24 12:49:46
2009
@@ -456,9 +456,4 @@
 jsp.error.tag.conflict.trimdirectivewhitespaces=Tag directive: illegal to have multiple occurrences
of 'trimDirectiveWhitespaces' with different values (old: {0}, new: {1})
 
 # JarScanner
-jsp.warning.noJarScanner=Warning: No org.apache.tomcat.JarScanner set in ServletContext.
Falling back to internal JarScanner implementation.
-jsp.jarScan.webinflibStart=Scanning WEB-INF/lib for JARs
-jsp.jarScan.webinflibFail=Failed to scan JAR [{0}] from WEB-INF/lib
-jsp.jarScan.classloaderStart=Scanning for JARs in classloader hierarchy
-jsp.jarScan.classloaderFail=Failed to scan [{0}] from classloader hierarchy
-jsp.jarScan.jarUrlStart=Scanning JAR at URL [{0}]
+jsp.warning.noJarScanner=Warning: No org.apache.tomcat.JarScanner set in ServletContext.
Falling back to default JarScanner implementation.

Added: tomcat/trunk/java/org/apache/tomcat/util/scan/Constants.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/scan/Constants.java?rev=893744&view=auto
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/util/scan/Constants.java (added)
+++ tomcat/trunk/java/org/apache/tomcat/util/scan/Constants.java Thu Dec 24 12:49:46 2009
@@ -0,0 +1,34 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.tomcat.util.scan;
+
+/**
+ * String constants for the scan package.
+ */
+public final class Constants {
+
+    public static final String Package = "org.apache.tomcat.util.scan";
+
+    public static final String SKIP_JARS_PROPERTY =
+        "tomcat.util.scan.DefaultJarScanner.jarsToSkip";
+
+    public static final String JAR_EXT = ".jar";
+    public static final String WEB_INF_LIB = "/WEB-INF/lib/";
+
+
+}

Propchange: tomcat/trunk/java/org/apache/tomcat/util/scan/Constants.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: tomcat/trunk/java/org/apache/tomcat/util/scan/Constants.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision

Modified: tomcat/trunk/java/org/apache/tomcat/util/scan/DefaultJarScanner.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/scan/DefaultJarScanner.java?rev=893744&r1=893743&r2=893744&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/util/scan/DefaultJarScanner.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/scan/DefaultJarScanner.java Thu Dec 24 12:49:46
2009
@@ -31,7 +31,6 @@
 
 import javax.servlet.ServletContext;
 
-import org.apache.catalina.startup.Constants;
 import org.apache.juli.logging.Log;
 import org.apache.juli.logging.LogFactory;
 import org.apache.tomcat.JarScanner;
@@ -54,12 +53,6 @@
  */
 public class DefaultJarScanner implements JarScanner {
 
-    public static final String SKIP_JARS_PROPERTY =
-        "tomcat.util.scan.DefaultJarScanner.jarsToSkip";
-
-    private static final String JAR_EXT = ".jar";
-    private static final String WEB_INF_LIB = "/WEB-INF/lib/";
-
     private static final Log log = LogFactory.getLog(DefaultJarScanner.class);
 
     private static final Set<String> defaultJarsToSkip = new HashSet<String>();
@@ -71,7 +64,7 @@
         StringManager.getManager(Constants.Package);
 
     static {
-        String jarList = System.getProperty(SKIP_JARS_PROPERTY);
+        String jarList = System.getProperty(Constants.SKIP_JARS_PROPERTY);
         if (jarList != null) {
             StringTokenizer tokenizer = new StringTokenizer(jarList, ",");
             while (tokenizer.hasMoreElements()) {
@@ -143,12 +136,12 @@
         }
 
         // Scan WEB-INF/lib
-        Set<String> dirList = context.getResourcePaths(WEB_INF_LIB);
+        Set<String> dirList = context.getResourcePaths(Constants.WEB_INF_LIB);
         if (dirList != null) {
             Iterator<String> it = dirList.iterator();
             while (it.hasNext()) {
                 String path = it.next();
-                if (path.endsWith(JAR_EXT) &&
+                if (path.endsWith(Constants.JAR_EXT) &&
                         !ignoredJars.contains(
                                 path.substring(path.lastIndexOf('/')+1))) {
                     // Need to scan this JAR
@@ -183,7 +176,7 @@
                         // in WEB-INF/lib we have already scanned
                         if (!(ignoredJars.contains(jarName) ||
                                 urls[i].toString().contains(
-                                        WEB_INF_LIB + jarName))) {
+                                        Constants.WEB_INF_LIB + jarName))) {
                             try {
                                 process(callback, urls[i]);
                             } catch (IOException ioe) {
@@ -216,7 +209,7 @@
         } else {
             String urlStr = url.toString();
             if (urlStr.startsWith("file:") || urlStr.startsWith("jndi:")) {
-                if (urlStr.endsWith(JAR_EXT)) {
+                if (urlStr.endsWith(Constants.JAR_EXT)) {
                     URL jarURL = new URL("jar:" + urlStr + "!/");
                     callback.scan((JarURLConnection) jarURL.openConnection());
                 } else {
@@ -254,7 +247,7 @@
         String name = null;
         
         String path = url.getPath();
-        int end = path.indexOf(JAR_EXT);
+        int end = path.indexOf(Constants.JAR_EXT);
         if (end != -1) {
             int start = path.lastIndexOf('/', end);
             name = path.substring(start + 1, end + 4);

Added: tomcat/trunk/java/org/apache/tomcat/util/scan/LocalStrings.properties
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/scan/LocalStrings.properties?rev=893744&view=auto
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/util/scan/LocalStrings.properties (added)
+++ tomcat/trunk/java/org/apache/tomcat/util/scan/LocalStrings.properties Thu Dec 24 12:49:46
2009
@@ -0,0 +1,20 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+jarScan.classloaderFail=Failed to scan [{0}] from classloader hierarchy
+jarScan.classloaderStart=Scanning for JARs in classloader hierarchy
+jarScan.jarUrlStart=Scanning JAR at URL [{0}]
+jarScan.webinflibFail=Failed to scan JAR [{0}] from WEB-INF/lib
+jarScan.webinflibStart=Scanning WEB-INF/lib for JARs

Propchange: tomcat/trunk/java/org/apache/tomcat/util/scan/LocalStrings.properties
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: tomcat/trunk/java/org/apache/tomcat/util/scan/LocalStrings.properties
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message