Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

${packaging.type} variable in pom.xml breaks Ivy #572

Closed
glassfishrobot opened this issue Oct 4, 2017 · 12 comments
Closed

${packaging.type} variable in pom.xml breaks Ivy #572

glassfishrobot opened this issue Oct 4, 2017 · 12 comments

Comments

@glassfishrobot
Copy link

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.

@glassfishrobot
Copy link
Author

@ChristianCiach Commented
Duplicate of #571

@glassfishrobot
Copy link
Author

@maltem-za Commented
@ChristianCiach Ah, thanks, I didn't find that one (obviously).

@glassfishrobot
Copy link
Author

@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.

@glassfishrobot
Copy link
Author

@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?

@glassfishrobot
Copy link
Author

@pavelbucek Commented
closing as duplicate of https://github.com/jax-rs/api/issues/571

@glassfishrobot
Copy link
Author

@Randgalt Commented
Sad that you've closed this @pavelbucek - #571 does not fix the problem.

@glassfishrobot
Copy link
Author

@nicktrav Commented
This is breaking things in the Pants build tool, which under the hood uses Ivy. I also don't understand why this issue was closed along with #571.

Seems like a trivial fix to just make this <packaging>jar</packaging>?

@glassfishrobot
Copy link
Author

@glassfishrobot
Copy link
Author

@nicktrav Commented
I'm very much in support. Left (non-passive-aggressive) my 👍 .

@glassfishrobot
Copy link
Author

@dhirajforyou
Copy link

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 ?

@ChristianCiach
Copy link

You should use this artifact now: https://mvnrepository.com/artifact/jakarta.ws.rs/jakarta.ws.rs-api

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants