jonathanlermitage / oga-maven-plugin

:jigsaw: Old GroupIds Alerter - A Maven plugin that checks for deprecated groupId+artifactId (e.g. did you know that graphql-spring-boot-starter moved from com.graphql-java to com.graphql-java-kickstart?).
https://central.sonatype.com/search?q=biz.lermitage.oga
MIT License
38 stars 7 forks source link

Support for additional migrations without overriding community contributed migrations #47

Closed pwhittlesea closed 2 years ago

pwhittlesea commented 2 years ago

Having the migrations file managed within this Github repo is fantastic as users of this module can benefit from the community contributions to relocated dependencies.

As a user I have many libraries which I maintain myself and I would love to have a 'business-wide' definition file. I can specify the ogDefinitionsUrl property to point to a self-managed definitions file but I then lose out on updates to the community contributions.

What would be great is if I had a way to specify an 'additions' file which meant the plugin pulled in ogDefinitionsUrl and then added in my extra definitions. Maybe a property called ogAdditionalDefinitionsUrl?

So if:

And the file at ogDefinitionsUrl contained:

{
    "version": "22",
    "date": "2022/07/07",
    "migration": [
        {
            "old": "acegisecurity",
            "new": "org.acegisecurity"
        }
    ]
}

And file at ogAdditionalDefinitionsUrl contained:

{
    "version": "22",
    "date": "2022/07/07",
    "migration": [
        {
            "old": "lan.smallbusiness:my-framework",
            "new": "lan.smallbusiness:my-relocated-framework"
        }
    ]
}

Then our 'effective' migrations would be:

Before I jump in and try contribute some code what do people think? Any objections?

froque commented 2 years ago

That looks a fine addition to me

jonathanlermitage commented 2 years ago

I agree :+1: