War with no jars!

In my previous post I spoke about jars.txt and how to add a jar in a WAR virtually and from several sources (mvn, http, file…).

Now to use it in a more enterprise environment you can use the dedicated maven plugin.

Its usage is pretty obvious:


This way it will generate a file with the list of maven dependencies. For instance for the following dependencies in your pom.xml:


      <!-- slf4j needs to be provided with an impl or not provided -->

it will generate the following jars.txt:


If you want more validation of the dependencies you can activate the hash computation by dependency:

    <hashAlgo>MD5</hashAlgo> <!-- MessageDigest algo -->

And here you get:


Some final notes:


  • default location of jars.txt is WEB-INF but you can configure it with outputFile parameter
  • In very last TomEE (trunk) the maven dependencies are resolved locally first, if your maven repo is not the default one configure the repo location through openejb.m2.home variable in conf/system.properties

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 )

Connecting to %s