Hi all, I have a pom.xml file of a legacy program that declares a dependency on an Apache Commons' xml-resolver:xml-resolver via dependency management and a property. The pom file looks essentially like this:
<properties> <xml-resolver.version>1.2</xml-resolver.version> </properties> <dependencyManagement> <dependencies> <!-- .. --> <dependency> <groupId>xml-resolver</groupId> <artifactId>xml-resolver</artifactId> <version>${xml-resolver.version}</version> </dependency> <dependencies> <dependencyManagement> <dependencies> <!-- ... --> <dependency> <groupId>xml-resolver</groupId> <artifactId>xml-resolver</artifactId> <version>${xml-resolver.version}</version> </dependency> <dependencies> This works; version 1.2 does exist: http://central.maven.org/maven2/xml-resolver/xml-resolver/1.2/ We now wanted to move to dependency ranges, to automatically pull in the latest minor and patch releases: https://maven.apache.org/pom.html#Dependency_Version_Requirement_Specification However, when I change the version range to [1.2,2.0) (i.e. all release versions from 1.2 inclusive to 2.0 exclusive) I get the following error message: >> [ERROR] Failed to execute goal on project bar: Could not resolve >> dependencies for project com.example.foo:bar:pom:1.0-SNAPSHOT: Failed to >> collect dependencies at xml-resolver:xml-resolver:jar:[1.2,2.0): No versions >> available for xml-resolver:xml-resolver:jar:[1.2,2.0) within specified range >> -> [Help 1] I also tried version [1.2] (exact version range) with the same result. After some googeling, I had a look at maven central's manifest for that artifact, located at http://central.maven.org/maven2/xml-resolver/xml-resolver/maven-metadata.xml It turns out that the metadata only specifies version 1.1: <versions> <version>1.1</version> </versions> Is that the reason maven can't resolve the artifact with the dependency range given? Does that mean the metadata on maven central is corrupted? If so, where do I report the issue to get it fixed? Is there another way to make this work (e.g. by asking our Nexus mirror to do some magic)? And last but not least: are there ever scenarios where previously published versions are removed from the metadata file on central (but not the jar files themselves)? I found 9 other artifacts so far that have the same issue... NB: When I run java -jar maven-artifact-3.1.0.jar [versions...] as described on https://maven.apache.org/pom.html#Version_Order_Testing I get an error message: >> no main manifest attribute, in maven-artifact-3.1.0.jar I'm running Apache Maven 3.3.9 and that's the latest jar in my local repo. (The docs specify version 3.3.9 for the actual jar.) Do I need to pull the latest one, or is something else broken there? Kind regards, Christian --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org