OpenEJB: How to exclude jar from module search?

Todd Chambery

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?

mmey

You might need to set openejb.deployments.classpath.filter.descriptors to true as well. See http://tomee.apache.org/application-discovery-via-the-classpath.html

Otherwise, filters will not be applied to resources that contain a descriptor file (ejb-jar.xml).

If you still have problems, you can debug through org.apache.openejb.config.DeploymentsResolves and see why your resources aren't excluded.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

OpenEJB - exclude single beans

From Dev

Gradle: How to exclude a particular package from a jar?

From Dev

How to really & fully exclude a package from a jar?

From Dev

How to exclude modules or groups in a jar from Gradle?

From Dev

How to exclude a package from a jar (with maven)

From Dev

Maven - How to exclude dependencies from generated JAR

From Dev

maven - how to exclude an entire module on from war

From Dev

How to exclude webstorm files from search results

From Dev

How to exclude html links from WordPress search?

From Dev

How to Exclude Multiple Values from Search Results

From Dev

How to exclude a folder from a string search

From Dev

how to exclude a string from php regex search

From Dev

How to exclude some word from regexp search?

From Dev

In an Android Gradle build, how to exclude dependencies from an included jar file?

From Dev

How to use maven assembly plugin to exclude a package from dependency jar?

From Dev

How to exclude resource file from spring boot jar?

From Dev

Maven assembly or shade plugin - How to exclude sources from jar?

From Dev

How do I exclude a package from an imported JAR for a project in Eclipse?

From Dev

How to attach classes from another module into jar?

From Dev

maven: exclude jar from JDK

From Dev

Exclude resources from dependency jar

From Dev

how to exclude nested node_module folders from a loader in webpack

From Dev

How to exclude module-info.java from checkstyle plugin checks?

From Java

How to exclude a file extension from IntelliJ IDEA search?

From Dev

How to exclude large number of IDs from an Elastic Search query

From Dev

How to exclude .class files from file search in Eclipse?

From Dev

How to exclude some words from the search in a regular expression?

From Dev

How to exclude some words from the search in a regular expression?

From Dev

How to exclude the folders proc and sys from search with find command ?

Related Related

  1. 1

    OpenEJB - exclude single beans

  2. 2

    Gradle: How to exclude a particular package from a jar?

  3. 3

    How to really & fully exclude a package from a jar?

  4. 4

    How to exclude modules or groups in a jar from Gradle?

  5. 5

    How to exclude a package from a jar (with maven)

  6. 6

    Maven - How to exclude dependencies from generated JAR

  7. 7

    maven - how to exclude an entire module on from war

  8. 8

    How to exclude webstorm files from search results

  9. 9

    How to exclude html links from WordPress search?

  10. 10

    How to Exclude Multiple Values from Search Results

  11. 11

    How to exclude a folder from a string search

  12. 12

    how to exclude a string from php regex search

  13. 13

    How to exclude some word from regexp search?

  14. 14

    In an Android Gradle build, how to exclude dependencies from an included jar file?

  15. 15

    How to use maven assembly plugin to exclude a package from dependency jar?

  16. 16

    How to exclude resource file from spring boot jar?

  17. 17

    Maven assembly or shade plugin - How to exclude sources from jar?

  18. 18

    How do I exclude a package from an imported JAR for a project in Eclipse?

  19. 19

    How to attach classes from another module into jar?

  20. 20

    maven: exclude jar from JDK

  21. 21

    Exclude resources from dependency jar

  22. 22

    how to exclude nested node_module folders from a loader in webpack

  23. 23

    How to exclude module-info.java from checkstyle plugin checks?

  24. 24

    How to exclude a file extension from IntelliJ IDEA search?

  25. 25

    How to exclude large number of IDs from an Elastic Search query

  26. 26

    How to exclude .class files from file search in Eclipse?

  27. 27

    How to exclude some words from the search in a regular expression?

  28. 28

    How to exclude some words from the search in a regular expression?

  29. 29

    How to exclude the folders proc and sys from search with find command ?

HotTag

Archive