Skip to content
This repository has been archived by the owner on Nov 25, 2024. It is now read-only.

Support for version ranges #12

Open
bobvanderlinden opened this issue Dec 17, 2017 · 2 comments
Open

Support for version ranges #12

bobvanderlinden opened this issue Dec 17, 2017 · 2 comments

Comments

@bobvanderlinden
Copy link
Member

It seems version ranges are not working correctly. I have the following in pom.xml:

    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-api</artifactId>
      <version>[1.7.1,1.7.99)</version>
    </dependency>

When I run mvn2nix, the following pops up in project-info.json:

        {
          "artifactId": "slf4j-api",
          "groupId": "org.slf4j",
          "version": "[1.7.1,1.7.99)",
          "classifier": "",
          "extension": "jar",
          "scope": "compile",
          "optional": false,
          "exclusions": []
        },

Eventually, buildMaven will generate a shell script that includes:

dir=$out/org/slf4j/slf4j-api/[1.7.1,1.7.99)

This will result in an error.

I have gone through the code to see how to force it to resolve all versions, but I'm a bit at a loss. I also do not seem to have a good way to debug the code. All suggestions are welcome.

@bobvanderlinden
Copy link
Member Author

It seems I was mistaken, as ~/.m2/repositories/org/slf4j/slf4j-api/[1.7.1,1.7.99) actually exists on my filesystem 😕 . buildMaven is not escaping the variables correctly, so this plugin is not at fault here.

@ttuegel
Copy link
Member

ttuegel commented Aug 6, 2018

Actually, the plugin is at fault! If you check that path, you will find no metadata inside because Maven treats that string as a version number which (of course) does not exist upstream.

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

No branches or pull requests

2 participants