From a21b876ecb4f5893ce79c8e92db1f69f7e7d2f89 Mon Sep 17 00:00:00 2001 From: Geoffrey De Smet Date: Tue, 6 Nov 2012 12:57:43 +0100 Subject: [PATCH] JBRULES-3679 drools-compiler should work in any CDI container --- drools-compiler/pom.xml | 4 ++-- .../src/main/java/org/drools/cdi/KProjectExtension.java | 5 ++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/drools-compiler/pom.xml b/drools-compiler/pom.xml index f0a17605466..392c8a4a260 100644 --- a/drools-compiler/pom.xml +++ b/drools-compiler/pom.xml @@ -140,10 +140,10 @@ cdi-api provided - + org.jboss.weld.se weld-se-core - provided + test diff --git a/drools-compiler/src/main/java/org/drools/cdi/KProjectExtension.java b/drools-compiler/src/main/java/org/drools/cdi/KProjectExtension.java index 075d01a8f1f..51615e2f0b3 100644 --- a/drools-compiler/src/main/java/org/drools/cdi/KProjectExtension.java +++ b/drools-compiler/src/main/java/org/drools/cdi/KProjectExtension.java @@ -43,7 +43,6 @@ import org.drools.kproject.KSessionImpl; import org.drools.runtime.StatefulKnowledgeSession; import org.drools.runtime.StatelessKnowledgeSession; -import org.jboss.weld.environment.se.discovery.url.ClasspathScanningException; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -530,8 +529,8 @@ private String fixURL(URL url) { try { urlPath = URLDecoder.decode( urlPath, "UTF-8" ); - } catch ( UnsupportedEncodingException ex ) { - throw new ClasspathScanningException( "Error decoding URL using UTF-8" ); + } catch ( UnsupportedEncodingException e ) { + throw new IllegalArgumentException( "Error decoding URL (" + url + ") using UTF-8", e ); } log.debug( "KProject URL Type + URL: " + urlType + ":" + urlPath );