Skip to content

[MENFORCER-435] Replacing maven-compat and maven-dependency-tree usage with Resolver - #198

Merged
slawekjaranowski merged 1 commit into
apache:masterfrom
andrzejj0:MENFORCER-435
Dec 26, 2022
Merged

slawekjaranowski merged 1 commit into
apache:masterfrom
andrzejj0:MENFORCER-435

Conversation

@andrzejj0

Copy link
Copy Markdown
Contributor

See summary; also: dependency:tree is no longer necessary to check parent information of dependencies which triggered validation failures -- path information is included.

@slawekjaranowski please review

@andrzejj0

Copy link
Copy Markdown
Contributor Author

I see. I was under the impression that the API for custom rule creators was the enforcer-api module. That was at least what I used when I created the custom enforcer rule in versions-maven-plugin. Didn't know AbstractBanDependencies was intended to be used as API for external rules. Perhaps it should be stated more clearly that it's also part of the API for custom rules.

Comment thread enforcer-rules/pom.xml Resolved
@andrzejj0 andrzejj0 closed this Dec 16, 2022
@andrzejj0 andrzejj0 reopened this Dec 16, 2022
@andrzejj0

Copy link
Copy Markdown
Contributor Author

Closed by mistake... 👀

@andrzejj0

Copy link
Copy Markdown
Contributor Author

@olamy could you have a look as well? Thanks!

@andrzejj0

Copy link
Copy Markdown
Contributor Author

Also resolves [MENFORCER-434]

@andrzejj0

Copy link
Copy Markdown
Contributor Author

I'd also gladly use a DependencySelector to exclude artifacts already at the dependency node retrieval level, but if you say everything is public API, I'm not sure whether I am allowed to modify any class. @slawekjaranowski could you please help out?

@andrzejj0
andrzejj0 force-pushed the MENFORCER-435 branch 2 times, most recently from 912bd4e to 34fb709 Compare December 17, 2022 17:57
@andrzejj0

Copy link
Copy Markdown
Contributor Author

Looks like javadoc linter was upset with BannedDependenciesBase (which I'd rather not have and use the old AbstractBannedDependencies instead). Corrected.

Comment thread maven-enforcer-extension/pom.xml Resolved

@slawekjaranowski slawekjaranowski left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please squash to final commit and rebase with current master

@andrzejj0

Copy link
Copy Markdown
Contributor Author

Rebased and squashed.

@andrzejj0

Copy link
Copy Markdown
Contributor Author

@slawekjaranowski your newest it failed. Checking.

@andrzejj0

andrzejj0 commented Dec 24, 2022 •

Copy link
Copy Markdown
Contributor Author

It's been so long that I had forgotten the reasons why I did things like I did -- e.g. use bespoke dependency selectors instead of the regular ones (the reason for that being that the out of the box selectors only work on transitive dependencies).

So I commented that piece.

@andrzejj0

andrzejj0 commented Dec 24, 2022 •

Copy link
Copy Markdown
Contributor Author

I mean, it would be nice if there were also selectors working on direct dependencies, but that would require changes (PR) to Resolver 🤡

@slawekjaranowski
slawekjaranowski merged commit 919fe02 into apache:master Dec 26, 2022
@andrzejj0
andrzejj0 deleted the MENFORCER-435 branch December 26, 2022 16:02
@slawekjaranowski slawekjaranowski added the enhancement New feature or request label Dec 26, 2022
@pzygielo

pzygielo commented Feb 4, 2023

Copy link
Copy Markdown
Contributor

Seems it might have caused MENFORCER-466, as 919fe02 is reported as first bad commit.

@jira-importer

Copy link
Copy Markdown

Resolve #556

1 similar comment
@jira-importer

Copy link
Copy Markdown

Resolve #556

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants