I am trying to figure out what is the best way to handle dependencies in app servers. We are considering maven to build the apps, but we found a problem. It appears when we need to update a proprietary shared library that doesn't have version number.This happens once a month and we are using Websphere shared library function in the following way:
- For each shared library in Websphere we create an alias without version. For example: db-component-1.2.1 receives the alias db-component. During the first deployment, we associate the app with the required libraries using the aliases. As we ignore the version, all apps must use the same version, creating some restrictions. But when we need to upgrade a shared library, we just upload the new library in WS and then, all apps uses the updated version.
We have more than 70 apps that rely on proprietary shared libraries. These libraries change constantly, and this solution makes the management easier. But it seems a bit odd that the dependencies are changed outside the application's build process. The dependency control isn't reliable anymore, because the info in app's POM may be false. In addition, all apps must use the same versions.
I think that a better solution may exist.
We've considered another model. Include the dependencies in every war. This allows us to use different versions of libraries in each application without restriction. But there is one problem: when a change is made in a proprietary shared library, we need to rebuild and redeploy all apps.
I have thought about our proprietary shared library being so instable or using a solution that mixes both ideas, but I am not sure how to solve this problem. OSGI looks like a better way to handle dependencies, but we would have the same problem upgrading many apps.
Should we use WS's shared library function? Is there a better way to solve this problem? Tips are highly appreciated.
Thanks