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

Dependency not resolving in case pom existing but jar missing in repository #107

Closed
mlthlschr opened this issue Sep 26, 2020 · 5 comments · Fixed by #108
Closed

Dependency not resolving in case pom existing but jar missing in repository #107

mlthlschr opened this issue Sep 26, 2020 · 5 comments · Fixed by #108
Assignees
Labels
bug Installation and functionality issues

Comments

@mlthlschr
Copy link

I am currently trying to run geotools via jupyter. For that, I add the repository and dependency.

@file:Repository("https://repo.osgeo.org/repository/release/")
@file:DependsOn("org.geotools:gt-main:23.2")

Geotools itself depends on various other libs, which are pulled from the different repositories. There is a problem, however, with one specific dependency: javax.media:jai_core. It is partially available on jcenter.bintray.com, see the ivydata-1.1.3.properties file from the ivy-cache:

#ivy cached data file for javax.media#jai_core;1.1.3
#Sat Sep 26 13:52:50 CEST 2020
artifact\:jai_core\#pom.original\#pom\#-1025053167.is-local=false
artifact\:jai_core\#pom.original\#pom\#-1025053167.original=artifact\:jai_core\#pom.original\#pom\#-1025053167
resolver=jcenter.bintray.com
artifact\:ivy\#ivy\#xml\#-399881196.is-local=false
artifact\:ivy\#ivy\#xml\#-399881196.exists=true
artifact.resolver=jcenter.bintray.com
artifact\:ivy\#ivy\#xml\#-399881196.original=artifact\:jai_core\#pom.original\#pom\#-1025053167
artifact\:ivy\#ivy\#xml\#-399881196.location=https\://jcenter.bintray.com/javax/media/jai_core/1.1.3/jai_core-1.1.3.pom
artifact\:jai_core\#pom.original\#pom\#-1025053167.location=https\://jcenter.bintray.com/javax/media/jai_core/1.1.3/jai_core-1.1.3.pom
artifact\:jai_core\#pom.original\#pom\#-1025053167.exists=true

The problem here is, that jcenter indeed has the .pom on the given location, however it is missing the required.jar. That leads to a not resolved dependency, as the process is stopping here. If the resolver would continue to check the given @file:Repository("https://repo.osgeo.org/repository/release/"), it would also be able to find the required .jar there..

My current workaround is to download the jai_core-1.1.3.jar from the osgeo repository and copy it into ivy2/cache/javax.media/jai_core/jars, but that is not quite the way to do it, if I want to share it with others.

@ileasile ileasile added the bug Installation and functionality issues label Sep 28, 2020
@alshan
Copy link
Contributor

alshan commented Oct 5, 2020

The current workaround is seem to make sure geotoolkit-repo is before Maven Central, so that it resolves before Central which misses the jar.
https://stackoverflow.com/a/26993223/490369

@mlthlschr
Copy link
Author

Is there a way to force ivy to check the geotools repo first?

@alshan
Copy link
Contributor

alshan commented Oct 7, 2020

@ileasile It seems natural to have repositories in the order:

  1. more "specific", defined in notebook repositories
  2. default repositories (JCenter,Maven Central,JitPack)

And this would fix this situation.

ileasile added a commit to JetBrains/kotlin that referenced this issue Oct 23, 2020
Now if the repo being added already exists, it is moved to the
end of the list, effectively lowering its priority.

Original issue: Kotlin/kotlin-jupyter#107
ileasile added a commit to JetBrains/kotlin that referenced this issue Oct 23, 2020
Now if the repo being added already exists, it is moved to the
end of the list, effectively lowering its priority.

Original issue: Kotlin/kotlin-jupyter#107
@ileasile ileasile assigned ileasile and unassigned ligee Oct 23, 2020
@ileasile
Copy link
Contributor

Will merge a PR in a few days - when the new build of Kotlin will be delivered.

@ileasile
Copy link
Contributor

Kernel v. 0.8.2.117 includes fix. It may be installed from one of dev channels

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

Successfully merging a pull request may close this issue.

4 participants