${packaging.type} variable in pom.xml breaks Ivy
glassfishrobot opened this issue · 12 comments
The ${packaging.type} variable introduced in 71c20bd breaks Ivy with the following output:
:: problems summary ::
:::: WARNINGS
[NOT FOUND ] javax.ws.rs#javax.ws.rs-api;2.1!javax.ws.rs-api.${packaging.type} (491ms)
==== public: tried
https://repo1.maven.org/maven2/javax/ws/rs/javax.ws.rs-api/2.1/javax.ws.rs-api-2.1.${packaging.type}
::::::::::::::::::::::::::::::::::::::::::::::
:: FAILED DOWNLOADS ::
:: ^ see resolution messages for details ^ ::
::::::::::::::::::::::::::::::::::::::::::::::
:: javax.ws.rs#javax.ws.rs-api;2.1!javax.ws.rs-api.${packaging.type}
::::::::::::::::::::::::::::::::::::::::::::::
Judging by the todo comment in pom.xml you are aware of the issue, but perhaps you are not aware that, in its current state, this still breaks Ivy. It also breaks the download link on mvnrepository.com, by the way.
Here is the same issue in a different project with some interesting comments: ronmamo/reflections#169
I can resolve the issue manually by putting the jar files into my Ivy cache directory. As I'm using IntelliJ IDEA and the IvyIDEA plugin I can't use the system property fix mentioned in the link above (or can't figure out how). Maybe there is a better way to resolve this with Ivy, but I'm not sure as I'm quite new to it.
@ChristianCiach Commented
Duplicate of #571
@maltem-za Commented
@ChristianCiach Ah, thanks, I didn't find that one (obviously).
@maltem-za Commented
For anyone else who comes across this, you can fix it for Ivy by adding a filesystem resolver like this:
<filesystem name="mylocal">
<ivy pattern= "${ivy.default.ivy.user.dir}/local/[organisation]/[module]/[type]s/[artifact]-[revision].[ext]" />
<artifact pattern= "${ivy.default.ivy.user.dir}/local/[organisation]/[module]/[type]s/[artifact]-[revision].[ext]" />
</filesystem>
Then all you have to do is place the jar file in the configured location, for example:
~/ivy2/local/javax.ws.rs/javax.ws.rs-api/jars/javax.ws.rs-api-2.1.jar
Thanks to @mpetris for the solution.
@Randgalt Commented
This really needs to be fixed ASAP. It breaks sbt as well. I don't understand the need for <packaging>${packaging.type}</packaging>
in the pom anyway. Why not just make it JAR?
@pavelbucek Commented
closing as duplicate of https://github.com/jax-rs/api/issues/571
@Randgalt Commented
Sad that you've closed this @pavelbucek - #571 does not fix the problem.
@Randgalt Commented
@nicktrav see https://github.com/jax-rs/api/pull/576
@nicktrav Commented
I'm very much in support. Left (non-passive-aggressive) my 👍 .
- Issue Imported From: https://github.com/jax-rs/api/issues/572
- Original Issue Raised By:@maltem-za
- Original Issue Assigned To: Unassigned
- Original Issue Closed By:@pavelbucek
issue persists:
[ivy:resolve] tried /home/data/.ivy2/local/javax.ws.rs/javax.ws.rs-api/2.1/${packaging.type}s/javax.ws.rs-api.${packaging.type}
[ivy:resolve] tried http://repo1.maven.org/maven2/javax/ws/rs/javax.ws.rs-api/2.1/javax.ws.rs-api-2.1.${packaging.type}
[ivy:resolve] CLIENT ERROR: Not Found url=http://repo1.maven.org/maven2/javax/ws/rs/javax.ws.rs-api/2.1/javax.ws.rs-api-2.1.$%7Bpackaging.type%7D
[ivy:resolve] tried https://repository.apache.org/content/repositories/snapshots/javax/ws/rs/javax.ws.rs-api/2.1/javax.ws.rs-api-2.1.${packaging.type}
[ivy:resolve] CLIENT ERROR: Not Found url=https://repository.apache.org/content/repositories/snapshots/javax/ws/rs/javax.ws.rs-api/2.1/javax.ws.rs-api-2.1.$%7Bpackaging.type%7D
[ivy:resolve] tried http://oss.sonatype.org/content/repositories/releases/javax/ws/rs/javax.ws.rs-api/2.1/javax.ws.rs-api-2.1.${packaging.type}
[ivy:resolve] WARN: [FAILED ] javax.ws.rs#javax.ws.rs-api;2.1!javax.ws.rs-api.${packaging.type}: (0ms)
[ivy:resolve] WARN: ==== local: tried
[ivy:resolve] WARN: /home/data/.ivy2/local/javax.ws.rs/javax.ws.rs-api/2.1/${packaging.type}s/javax.ws.rs-api.${packaging.type}
[ivy:resolve] WARN: ==== maven2: tried
[ivy:resolve] WARN: http://repo1.maven.org/maven2/javax/ws/rs/javax.ws.rs-api/2.1/javax.ws.rs-api-2.1.${packaging.type}
[ivy:resolve] WARN: ==== apache-snapshot: tried
[ivy:resolve] WARN: https://repository.apache.org/content/repositories/snapshots/javax/ws/rs/javax.ws.rs-api/2.1/javax.ws.rs-api-2.1.${packaging.type}
[ivy:resolve] WARN: ==== sonatype: tried
[ivy:resolve] WARN: http://oss.sonatype.org/content/repositories/releases/javax/ws/rs/javax.ws.rs-api/2.1/javax.ws.rs-api-2.1.${packaging.type}
any workaround for this ?
You should use this artifact now: https://mvnrepository.com/artifact/jakarta.ws.rs/jakarta.ws.rs-api