When including a shaclex dependency using Maven with strict dependency convergence settings, the following error is reported:
[ERROR] Rule 4: org.apache.maven.enforcer.rules.dependency.RequireUpperBoundDeps failed with message:
[ERROR] Failed while enforcing RequireUpperBoundDeps. The error(s) are [
[ERROR] Require upper bound dependencies error for org.scala-lang.modules:scala-collection-compat_2.12:2.7.0 paths to dependency are:
[ERROR] +-org.eclipse.lyo:lyo-validation:7.0.0-SNAPSHOT
[ERROR] +-es.weso:shaclex_2.12:0.2.4
[ERROR] +-es.weso:schema_2.12:0.2.4
[ERROR] +-es.weso:srdf4j_2.12:0.1.125
[ERROR] +-org.scala-lang.modules:scala-collection-compat_2.12:2.7.0
[ERROR] and
[ERROR] +-org.eclipse.lyo:lyo-validation:7.0.0-SNAPSHOT
[ERROR] +-es.weso:shaclex_2.12:0.2.4
[ERROR] +-es.weso:schema_2.12:0.2.4
[ERROR] +-es.weso:shapemap_2.12:0.2.33
[ERROR] +-org.scala-lang.modules:scala-collection-compat_2.12:2.8.1
[ERROR] ]
This requires a workaround like eclipse-lyo/lyo#531 where we essentially instruct to ignore es.weso:shapemap_2.12 and es.weso:srdf4j_2.12 dependency preference for org.scala-lang.modules:scala-collection-compat_2.12 and instead use org.scala-lang.modules:scala-collection-compat_2.12:2.8.1 for both. This is a bit troublesome when we do updates and could lead to some subtle bugs.
I think this can be resolved by merging weso/srdf#395 and weso/shex-s#558 and making three releases with converging versions.
P.S. Not really part of this ticket - I had a discussion in Jelly-RDF/jelly-jvm#181 (comment) and the best idea seems to target Scala 3.3 LTS if a Java project wants to use two different Scala libs. I see that shaclex and srdf are both targeting Scala 3.2 which is not LTS. But I think this could be extracted into a separate issue.
When including a shaclex dependency using Maven with strict dependency convergence settings, the following error is reported:
This requires a workaround like eclipse-lyo/lyo#531 where we essentially instruct to ignore
es.weso:shapemap_2.12andes.weso:srdf4j_2.12dependency preference fororg.scala-lang.modules:scala-collection-compat_2.12and instead useorg.scala-lang.modules:scala-collection-compat_2.12:2.8.1for both. This is a bit troublesome when we do updates and could lead to some subtle bugs.I think this can be resolved by merging weso/srdf#395 and weso/shex-s#558 and making three releases with converging versions.
P.S. Not really part of this ticket - I had a discussion in Jelly-RDF/jelly-jvm#181 (comment) and the best idea seems to target Scala 3.3 LTS if a Java project wants to use two different Scala libs. I see that shaclex and srdf are both targeting Scala 3.2 which is not LTS. But I think this could be extracted into a separate issue.