Skip to content

Version stored in .module doesn't match pom version for use with Gradle #281

Closed
@petebankhead

Description

@petebankhead

Very possible this is an issue of me not understanding, but I'm unable to access the version catalog in Gradle with the error

Could not resolve all artifacts for configuration 'incomingCatalogForSciJava0'.
> Could not find pom-scijava-19.0.0.toml (org.scijava:pom-scijava:39.0.0).
  Searched in the following locations:
      https://repo.maven.apache.org/maven2/org/scijava/pom-scijava/39.0.0/pom-scijava-19.0.0.toml

Checking pom-scijava-38.0.1.module I see

{
  "formatVersion": "1.1",
  "component": {
    "group": "org.scijava",
    "module": "pom-scijava",
    "version": "19.0.0",
    "attributes": {
      "org.gradle.status": "release"
    }
  },

which seems to be the version of pom-scijava-base (19.0.0) and not of pom-scijava (38.0.1).

Since the logic for setting the version in build.gradle.kts is

version = File("../pom.xml").readText().substringAfter("<version>").substringBefore('<')

is this an error that occurs because of the order in which versions appear in the xml?

(The bigger picture: I'm having problems using scijava-pom for dependencies with native libraries, because it uses profile activation based on os.family and it seems Gradle doesn't support that - so I was hoping that a switch to use the version catalog here might help me figure out a workaround)

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions