You would need a multi-module project, with separate modules for the code that depends on the different versions av det dependency "jar" (artifact). You would then, typically, have one or more moduoles for the common code and then one module for each of the version of the dependency with incompatible API.
/Anders On Tue, Nov 29, 2016 at 4:14 AM, big data <[email protected]> wrote: > Dear all, > > How to depend on the same jars with different versions in one project? > Our project is used to deploy on different customer side, which has > different jar version environments. The codes depends the jar, which has > two different version 1.0 and 2.0, these two versions are not compatible > (eash one has own unique API), so our code should support these two > versions, and can build to different release package to support 1.0 or 2.0. > > how to configure pom to support this situation? > > Thanks. >
