问题
So I've been using various Apache commons
libraries for a while and all was fine until suddenly when using the mvn versions:use-latest-versions
command or the LATEST
version tag uses/places a very old version of various Apache libraries into the <version>
tag:
<dependency>
<groupId>commons-net</groupId>
<artifactId>commons-net</artifactId>
<version>20030805.205232</version> <!-- Note: 2003! -->
</dependency>
If we take a look at the maven repository of commons-net
, we can tell that this is one of the first releases of the library. Why am I not getting the latest version as requested anymore? What happened? This is annoying because my code of course fails to compile with such an old version and I have to manually go through my dependencies and update the versions for each malbehaving Apache
library. Strangely enough, it does not affect libraries by other vendors.
>mvn --version
Apache Maven 3.6.2 (40f52333136460af0dc0d7232c0dc0bcf0d9e117; 2019-08-27T17:06:16+02:00)
Maven home: C:\maven\bin\..
Java version: 1.8.0_271, vendor: Oracle Corporation, runtime: C:\Program Files\Java\jdk1.8.0_271\jre
Default locale: en_US, platform encoding: Cp1252
OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"
来源:https://stackoverflow.com/questions/65188179/latest-dependency-versions-of-various-apache-libraries-from-maven-suddenly-use-a