Hi,

I posted the below question to StackOverflow 
(http://stackoverflow.com/questions/25187808/openejb-how-to-exclude-jar-from-module-search),
 but maybe I have a better chance to get a response here:


I use OpenEJB to run unit tests for applications ultimately deployed to 
WebSphere Application Server. My problem is a(n unavoidable) dependency on the 
WAS runtime jar. I've added an expression to the exclude property (I've also 
tried the physical path):

    p.put("openejb.deployments.classpath.exclude", ".*?runtime-6.1.*?");
    // p.put("openejb.deployments.classpath.exclude", 
"C:/Users/user/.m3/repository/was/runtime/6.1/runtime-6.1.jar");
    p.put("openejb.exclude-include.order", "include-exclude");

This value is confirmed in the logs:

OpenEJB.options-2014-08-07-main--INFO -OpenEJB.options:Using 
'openejb.exclude-include.order=include-exclude'
OpenEJB.options-2014-08-07-main--INFO -OpenEJB.options:Using 
'openejb.deployments.classpath.include=.*eed-jar.*'
OpenEJB.options-2014-08-07-main--INFO -OpenEJB.options:Using 
'openejb.deployments.classpath.exclude=.*?runtime-6.1.*?'

but the jar is still being inspected for loadable modules:

OpenEJB.startup.config-2014-08-07-main--INFO -OpenEJB.startup.config:Found 
EjbModule in classpath: 
C:\Users\user\.m3\repository\was\runtime\6.1\runtime-6.1.jar

The result is startup failure for OpenEJB:

org.apache.openejb.OpenEjbContainer$InvalidApplicationException: 
org.apache.openejb.config.ValidationFailedException: Module failed validation. 
AppModule(name=)
and
WARNING: can't load com.ibm.ws.management.j2ee.ManagementBean
org.apache.openejb.OpenEJBRuntimeException: Management

I've been creating a 0-length dummy file and renaming runtime-6.1.jar to 
execute the tests in Eclipse, but I need to restore the jar to run the Maven 
build (which Eclipse will then bind to, necessitating a restart to rename the 
jar).

What's the right way to exclude this jar?

Thanks,
Todd

----------------------------------------------------------------------
This message, and any attachments, is for the intended recipient(s) only, may 
contain information that is privileged, confidential and/or proprietary and 
subject to important terms and conditions available at 
http://www.bankofamerica.com/emaildisclaimer.   If you are not the intended 
recipient, please delete this message.

Reply via email to