I tried both. Something weired is happening. Basically, I am writing a
maven plugin to load JPA entities and create tables. I am doing this
through OpenEJB in order to process persistence.xml identically to
when deployed.
I have added a test EJB class to the maven plugin jar, and I have some
EJBs in the current JPA project I am working on.
If I don't include/exclude anything, EJBs are loaded from anywhere
(the plugin and the current project). I do this:
properties.put("openejb.exclude-include.order", "exclude-include");
properties.put("openejb.deployments.classpath.include", "");
properties.put("openejb.deployments.classpath.exclude", ".*");
Then Only EJBs in the current project are loaded. I tried all other
options like:
properties.put("openejb.exclude-include.order", "exclude-include");
properties.put("openejb.deployments.classpath.include", "");
properties.put("openejb.deployments.classpath.exclude", ".*");
properties.put("openejb.deployments.classpath ", false);
properties.put("openejb.deployments.classpath.filter.descriptors", true);
properties.put("openejb.additional.exclude", "classpath.ear");
But nothing did the trick. The reason I need to prevent auto-deploy
EJBs in the current project is performance, and to avoid compilation
issues while still developing the EJB.
It's not critical now, but I may hit a point where I need to find a solution.
Thank you.
On Fri, Nov 21, 2014 at 4:22 AM, Andy Gumbrecht
<[email protected]> wrote:
> Maybe try reversing the order,
>
> openejb.exclude-include.order=exclude-include
>
> And to exclude even when no descriptors are found,
>
> openejb.deployments.classpath.filter.descriptors=true
>
> But try one at a time, so if it works you know which one.
>
> Andy.
>
>
> On 21/11/2014 06:20, Mansour Al Akeel wrote:
>>
>> I need to start EJB container in embedded mode to load JPA Entities
>> and create tables. The problem I am facing is that it loads any EJBs
>> in the classpath. I am trying to prevent loading and deploying these
>> EJBs by the following:
>>
>> properties.put("openejb.exclude-include.order", "include-exclude");
>> properties.put("openejb.deployments.classpath.include", "");
>> properties.put("openejb.deployments.classpath.exclude", ".*");
>> properties.put("openejb.deployments.classpath ", false);
>>
>>
>>
>> Still no luck. Is there a way to prevent auto deployment ??
>>
>> Thank you.
>
>
> --
> Andy Gumbrecht
> https://twitter.com/AndyGeeDe
> http://www.tomitribe.com
>