Skip to content

Better way to simply force a dependency #101

@rupebac

Description

@rupebac

I am surprised that there is no rule type to simply force a specific version of a transitive dependency. I know I can achieve this with:

substitute": [
    {
      "module" : "org.myorg.group:myartifact",
      "with" : "org.myorg.group:myartifact:2.1.2",
      "reason" : "blabla",
      "author" : "me",
      "date" : "2019-06-14"
    },
]

but, it looks a bit not straight forward, why do I have to specify the GAV coordinate twice when I simply want to force 2.1.2 there?

Also, I would like to propose another feature. In align rules you have the attribute "includes" which allow formats like:

"includes": ["springfox-(bean-validators|core|schema|spi|spring-web|swagger-common|swagger-ui|swagger2|)"],

why don't you support the same syntax in more attributes, like the previous "substitute", so you can have something like:

substitute": [
    {
      "module" : "org.myorg.group:(myartifact|myartifact2|myartifact3)",
      "with" : "org.myorg.group:(myartifact|myartifact2|myartifact3):2.1.2",
      "reason" : "blabla",
      "author" : "me",
      "date" : "2019-06-14"
    },
]

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions