Sekhar
Sekhar

Reputation: 1001

archiva repository jars usage in multiple projects

I have 2 projects one in JDK 1.5 and other one in JDK 1.6 .

Can both the projects use the same archiva repository ? Will there be any issues in commonly used jars . Like for example my understanding is that some jar files will be compiled with JDK 1.6 and some with JDK 1.5.

Please kindly clarify . I am new to archiva MAVEN repo implementation.

Upvotes: 0

Views: 56

Answers (1)

Brett Porter
Brett Porter

Reputation: 5867

Yes, they can use the same repository. Archiva won't worry about the contents of the JARs.

If you have dependencies that are shared among multiple projects, you should target them at the lowest JVM features that they need to be used on (in this case, Java 5 features). These can then be used on both Java 5 and Java 6+.

If there is a particular case where a library needs to offer specific features to higher JDKs, and you can't separate them, you can build two different versions of the libraries targeting different features. These libraries can use Maven classifiers to distinguish between the artifacts. However, the necessity for this is very rare.

Upvotes: 1

Related Questions