Skip to content

Cannot fetch artifact 'javax.ws.rs:javax.ws.rs-api:2.1' from Maven #3065

@ChristianCiach

Description

@ChristianCiach

The maven artifact javax.ws.rs-api with version 2.1 uses POM profiles in an exotic way to set the property ${packaging.type} which is used to set the packaging-type (usually JAR or BUNDLE).

As you can see, even the Download-button at mvnrepository.com is broken:
https://mvnrepository.com/artifact/javax.ws.rs/javax.ws.rs-api/2.1

Nonetheless, the POM file seems to be valid and Oracle (the author) has no intention to change the POM file in a way that Gradle can parse it correctly. See the closed issue here: https://github.com/jax-rs/api/issues/571

As the artifact is an extremely common one (just not in this version yet), I am sure this will soon affect a lot of users.

Gradle 4.2 throws this error when trying to retrieve this dependency:


> Could not determine artifacts for javax.ws.rs:javax.ws.rs-api:2.1
   > Could not get resource 'http://OUR_LOCAL_REPO/repository/maven-central/javax/ws/rs/javax.ws.rs-api/2.1/javax.ws.rs-api-2.1.$%7Bpackaging.type%7D'.
      > Could not HEAD 'http://OUR_LOCAL_REPO/repository/maven-central/javax/ws/rs/javax.ws.rs-api/2.1/javax.ws.rs-api-2.1.$%7Bpackaging.type%7D'. Received status code 500 from server: javax.servlet.ServletException: java.lang.IllegalArgumentException: Illegal character in path at index 54: /javax/ws/rs/javax.ws.rs-api/2.1/javax.ws.rs-api-2.1.${packaging.type}

Metadata

Metadata

Assignees

Labels

a:bugThis doesn't work as expected

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions