You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tomee.apache.org by rm...@apache.org on 2012/01/25 19:33:00 UTC
svn commit: r1235863 -
/openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/config/NewLoaderLogic.java
Author: rmannibucau
Date: Wed Jan 25 18:32:59 2012
New Revision: 1235863
URL: http://svn.apache.org/viewvc?rev=1235863&view=rev
Log:
OPENEJB-1758 exclusion on myfaces- makes codi not work out of the box (you need to rename codi jars in somthing not starting with myfaces) - adding openejb.additional.exclude and openejb.additional.include system properties to be able to change a bit the scanned jars
Modified:
openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/config/NewLoaderLogic.java
Modified: openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/config/NewLoaderLogic.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/config/NewLoaderLogic.java?rev=1235863&r1=1235862&r2=1235863&view=diff
==============================================================================
--- openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/config/NewLoaderLogic.java (original)
+++ openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/config/NewLoaderLogic.java Wed Jan 25 18:32:59 2012
@@ -50,6 +50,8 @@ import java.util.Set;
* @version $Rev$ $Date$
*/
public class NewLoaderLogic {
+ public static final String ADDITIONAL_EXCLUDES = System.getProperty("openejb.additional.exclude");
+ public static final String ADDITIONAL_INCLUDE = System.getProperty("openejb.additional.include");
private static final Logger logger = DeploymentLoader.logger;
@@ -146,8 +148,7 @@ public class NewLoaderLogic {
}
public static UrlSet applyBuiltinExcludes(UrlSet urlSet) throws MalformedURLException {
-
- Filter filter = Filters.prefixes(
+ final List<String> excludes = Arrays.asList(
"ApacheJMeter",
"XmlSchema-",
"aether-",
@@ -222,7 +223,8 @@ public class NewLoaderLogic {
"logkit-",
"maven-",
"mbean-annotation-api-",
- "myfaces-",
+ "myfaces-api",
+ "myfaces-core",
"neethi-",
"nekohtml-",
"openejb-api",
@@ -268,8 +270,26 @@ public class NewLoaderLogic {
"xml-resolver-",
"xmlrpc-",
"xmlsec-",
- "xmlunit-"
- );
+ "xmlunit-");
+ if (ADDITIONAL_EXCLUDES != null) {
+ for (String exclude : ADDITIONAL_EXCLUDES.split(",")) {
+ excludes.add(exclude.trim());
+ }
+ }
+ if (ADDITIONAL_INCLUDE != null) { // include = not excluded
+ for (String rawInclude : ADDITIONAL_INCLUDE.split(",")) {
+ final String include = rawInclude.trim();
+ final Iterator<String> excluded = excludes.iterator();
+ while (excluded.hasNext()) {
+ if (excluded.next().startsWith(include)) {
+ excluded.remove();
+ }
+ }
+ }
+ }
+
+ final Filter filter = Filters.prefixes(excludes.toArray(new String[excludes.size()]));
+
// filter = Filters.optimize(filter, new PatternFilter(".*/openejb-.*"));
List<URL> urls = urlSet.getUrls();