Return-Path: Delivered-To: apmail-struts-commits-archive@minotaur.apache.org Received: (qmail 73010 invoked from network); 12 Feb 2009 18:45:51 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 12 Feb 2009 18:45:51 -0000 Received: (qmail 71103 invoked by uid 500); 12 Feb 2009 18:45:40 -0000 Delivered-To: apmail-struts-commits-archive@struts.apache.org Received: (qmail 71072 invoked by uid 500); 12 Feb 2009 18:45:40 -0000 Mailing-List: contact commits-help@struts.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@struts.apache.org Delivered-To: mailing list commits@struts.apache.org Received: (qmail 70780 invoked by uid 99); 12 Feb 2009 18:45:39 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 12 Feb 2009 10:45:39 -0800 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 12 Feb 2009 18:45:36 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id F3E0A23888CA; Thu, 12 Feb 2009 18:45:14 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r743831 - in /struts/struts2/trunk/plugins/convention/src/main: java/org/apache/struts2/convention/PackageBasedActionConfigBuilder.java resources/struts-plugin.xml Date: Thu, 12 Feb 2009 18:45:14 -0000 To: commits@struts.apache.org From: musachy@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20090212184514.F3E0A23888CA@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: musachy Date: Thu Feb 12 18:45:14 2009 New Revision: 743831 URL: http://svn.apache.org/viewvc?rev=743831&view=rev Log: Add a setting so file protocols can be set by a constant Modified: struts/struts2/trunk/plugins/convention/src/main/java/org/apache/struts2/convention/PackageBasedActionConfigBuilder.java struts/struts2/trunk/plugins/convention/src/main/resources/struts-plugin.xml Modified: struts/struts2/trunk/plugins/convention/src/main/java/org/apache/struts2/convention/PackageBasedActionConfigBuilder.java URL: http://svn.apache.org/viewvc/struts/struts2/trunk/plugins/convention/src/main/java/org/apache/struts2/convention/PackageBasedActionConfigBuilder.java?rev=743831&r1=743830&r2=743831&view=diff ============================================================================== --- struts/struts2/trunk/plugins/convention/src/main/java/org/apache/struts2/convention/PackageBasedActionConfigBuilder.java (original) +++ struts/struts2/trunk/plugins/convention/src/main/java/org/apache/struts2/convention/PackageBasedActionConfigBuilder.java Thu Feb 12 18:45:14 2009 @@ -63,6 +63,7 @@ import com.opensymphony.xwork2.util.logging.LoggerFactory; import com.opensymphony.xwork2.util.FileManager; import com.opensymphony.xwork2.util.TextUtils; +import com.opensymphony.xwork2.util.TextParseUtil; /** *

@@ -92,6 +93,7 @@ private boolean devMode; private ReloadingClassLoader reloadingClassLoader; private boolean reload; + private Set fileProtocols; /** * Constructs actions based on a list of packages. @@ -137,6 +139,17 @@ } /** + * Comma separated list of file protocols that will be considered as jar files and scanned + * @param fileProtocols + */ + @Inject("struts.convention.action.fileProtocols") + public void setFileProtocols(String fileProtocols) { + if (!StringTools.isTrimmedEmpty(fileProtocols)) { + this.fileProtocols = TextParseUtil.commaDelimitedStringToSet(fileProtocols); + } + } + + /** * @param disableActionScanning Disable scanning for actions */ @Inject(value = "struts.convention.action.disableScanning", required = false) @@ -332,7 +345,7 @@ boolean[] patternUsed = new boolean[includeJars.length]; for (URL url : rawIncludedUrls) { - if ("jar".equalsIgnoreCase(url.getProtocol())) { + if (fileProtocols.contains(url.getProtocol())) { //it is a jar file, make sure it macthes at least a url regex for (int i = 0; i < includeJars.length; i++) { String includeJar = includeJars[i]; Modified: struts/struts2/trunk/plugins/convention/src/main/resources/struts-plugin.xml URL: http://svn.apache.org/viewvc/struts/struts2/trunk/plugins/convention/src/main/resources/struts-plugin.xml?rev=743831&r1=743830&r2=743831&view=diff ============================================================================== --- struts/struts2/trunk/plugins/convention/src/main/resources/struts-plugin.xml (original) +++ struts/struts2/trunk/plugins/convention/src/main/resources/struts-plugin.xml Thu Feb 12 18:45:14 2009 @@ -60,7 +60,8 @@ - + +