jagodevreede / semver-check

A maven plugin that allows you to check (or determine) the next version of your module, based on the rules of Semantic Versioning.
Apache License 2.0
25 stars 2 forks source link

Support regular expressions as `exclude(Files|Packages)` configuration parameters #62

Closed ferdinand-swoboda closed 9 months ago

ferdinand-swoboda commented 9 months ago

Hey!

I am currently experimenting with this plugin (read your Foojay blogpost 🙂 ) in some nested multi-module Maven projects with a structure along the lines of

project
├── component-a
│   ├── component-a-api
│   ├── component-a-logic
│   └── component-a-web
├── component-b
│   ├── component-b-api
│   ├── component-b-logic
│   └── component-b-web
└── component-c
    ├── component-c-api
    ├── component-c-logic
    └── component-c-web

and want to determine the project's next semantic version based on changes in the -api modules / .api packages only.

AFAIU the scope of what the plugin checks can only be limited by the excludePackages and excludeFiles configuration parameters. This makes it cumbersome to maintain the scope-to-check as new modules have to be added to these parameters.

Furthermore, the existing configuration parameters only support specifying prefixes, rather than, say, more flexible regular expressions.

Ideally, I could specify the scope as the inverse using a regex i.e.

<includePackages>
     <includePackage>.*.api$</includePackage>
</includePackages>

once for the entire project.

Thanks for your response!

jagodevreede commented 9 months ago

Thanks for the feature request, I had the same idea, but due to time constraints, I haven't gotten around to it. I will implement this in the near future.

jagodevreede commented 9 months ago

Now implemented with version 0.5.0

ferdinand-swoboda commented 8 months ago

Thanks, will give this a try next week!