简体   繁体   中英

A way to download only java 1.6 compatible libraries

How I can make maven to download only java 1.6 compatible libraries? I have tomcat 6 and java 1.6.0_38. Or how I can find incompatible libs?

http://pastebin.com/WnwZL2RX list of dependencies.

If it's a one-time task which you have to run over the list your have provided then I would propose a manual approach described here:

What version of javac built my jar?

As for automatic check then you would have to implement your own maven plugin which will use similar approach to the one described above or drill into JAR manifest in order to get the Java version.

A very interesting question i hope to be able to check back for a more satisfying answer.

Maven is not able to perform such a task - and as faar as i know (i only checked back with a 5 minute websearch) there is no plugin available for this task.

In the end Maven supports with the dependency management by resolving dependencies of dependencies and has default approaches when it comes to versions of the same dependency ( "the closest version wins" ) - regardless of this you will be in charge when it comes to compatibility between your own source and third party source.

Especially when talking about runtime incompatibility this could be a quite hard task to find out about issues.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM