Hi

I recommand you to add a META-INF/scan.xml with:

<scan>
<packages>
<package>org.package.to.scan1</package>
<package>org.package.to.scan2</package>
</packages>
</scan>

And ensure you ignore scan.xml from your dependencies if it exists

Romain Manni-Bucau
Twitter: @rmannibucau
Blog: http://rmannibucau.wordpress.com/
LinkedIn: http://fr.linkedin.com/in/rmannibucau
Github: https://github.com/rmannibucau



2014-10-13 9:50 GMT+02:00 Ƹ̵̡Ӝ̵̨̄Ʒ Charms Styler <charmssty...@gmail.com>:
> Greetings Devs,
>
> I tried using openejb on my embedded application, while it does seems
> to work when I ran on eclipse when I packaged it to a
> jar-with-dependencies with maven, On Console when I tried run the
> jar-with-dependencies the openejb container tries to scan unwanted
> dependencies since it consists not just app content but every other
> dependency and fail miserably. So I am guessing we could filter via
> package name ? but couldn't get it to work.
>
> Would appreciate if you could suggest any alternatives , as I have
> tried the below settings
>
>        String appContent =
> MyClass.class.getProtectionDomain().getCodeSource().getLocation().toURI().toString()
>
>        
> prop.setProperty(DeploymentFilterable.SEARCH_CLASSPATH_FOR_DEPLOYMENTS_PROPERTY,
> "true");
>         prop.setProperty(DeploymentFilterable.CLASSPATH_FILTER_DESCRIPTORS,
> "true");
>         prop.setProperty(DeploymentFilterable.CLASSPATH_FILTER_SYSTEMAPPS,
> "false");
>
>         prop.setProperty(DeploymentFilterable.CLASSPATH_INCLUDE,
> protectedDomain);
>         prop.setProperty(DeploymentFilterable.PACKAGE_INCLUDE,
> ".*/com/mypackage/ejb.*");
>         prop.setProperty(DeploymentFilterable.CLASSPATH_EXCLUDE, ".*");
>         prop.setProperty(DeploymentFilterable.PACKAGE_EXCLUDE, ".*");
>
> Please advice as I couldn't find a material to resolve. Thanks.
>
> Application discovery via the classpath
> [http://tomee.apache.org/application-discovery-via-the-classpath.html]
>
> Thanks
>
> Charms

Reply via email to