-2

I've developed an OSS framework (Podam) and I'm using Spring to do some of the functionality. Some users are lamenting the fact that my framework introduces Spring dependencies in their code. How could I avoid this in Maven so that my framework works correctly without forcing users to "live" with my dependencies? For example my framework depends on Spring 4.1.6 and users depend on Spring 3. There might be some conflicts between the two Spring versions.

Podam pom can be found here:

https://github.com/mtedone/podam/blob/master/pom.xml

Marco Tedone
  • 592
  • 4
  • 13
  • You might have to be a bit more specific about which bits of Spring your framework uses. – Alex Barnes Oct 06 '15 at 05:05
  • Could you explain what your Podam framework is for and which user group is targeted? If it is end user I do not see where they would have a problem, if they are developers, that use your framework as a maven dependency it is a different story. Through there are still other variants. – hotzst Oct 06 '15 at 05:51

2 Answers2

1

I've decided to remove Spring from my framework and leave users free to implement what they want

Marco Tedone
  • 592
  • 4
  • 13
0

You can try to repackage Spring with maven shade plugin and relocate the packages but you have very little chance to succeed unless you'll rewrite Spring partially (see Spring with maven-shade-plugin).

As an author of a framework, you usually choose between locking users to some library (or a certain version at least) or not using the library at all.

That's Java classloading.

Community
  • 1
  • 1
Stepan Vavra
  • 3,884
  • 5
  • 29
  • 40