TomEE: A war without dependencies?


TomEE already supports to enrich an application with dependencies through ClassLoaderConfigurer configuration or using VirtualWebAppClassLoader of Tomcat. The first one has the drawback to be configured in the container and the second to not be very configurable/extensible.

That’s why we now have jars.txt!

The idea is simple: add jars.txt file to WEB-INF. The content will list dependencies. It can be file paths or urls (http, mvn by default).

Here a sample:

mvn:org.apache.deltaspike.core:deltaspike-core-api:0.3-incubating
mvn:org.apache.deltaspike.core:deltaspike-core-impl:0.3-incubating

Note: if you are not using the provisining module of OpenEJB (using aether) mvn resolution will be done downloading from repo1 or a specified repo (mvn:http://myrepo.com!org.foo:bar:1.0).

Next step can be to get a maven plugin supporting or helping with the generation of such a file.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s