Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't allow people to get around BanCircularDependencies by excluding themselves. (was MOJO-2060) #2

Closed
pmv opened this issue Jun 22, 2015 · 3 comments

Comments

@pmv
Copy link
Contributor

pmv commented Jun 22, 2015

Right now BanCircularDependencies is easy to circumvent by excluding yourself from the dependency tree.
Example:

<project>
    <modelVersion>4.0.0</modelVersion>
    <groupId>com.my.groupid</groupId>
    <artifactId>some-artifactid</artifactId>
    <version>1.6.1</version>
    <dependencies>
        <dependency>
            <groupId>com.my.groupid</groupId>
            <artifactId>circularartifact</artifactId>
            <version>1.1.1</version>
            <exclusions>
                <exclusion>
                    <groupId>com.my.groupid</groupId>
                    <artifactId>some-artifactid</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
    </dependencies>
</project>

I propose a property 'checkExclusions' that can stop people from doing this. It would check exclusions in the pom and fail if they match that project's groupId and artifactId.

I will open a pull request shortly

@pmv
Copy link
Contributor Author

pmv commented Jun 22, 2015

#3

@pmv
Copy link
Contributor Author

pmv commented Sep 8, 2017

Closed old pull request due to merge conflicts and opened a new one: #32

@pmv
Copy link
Contributor Author

pmv commented Jan 18, 2019

Cherry picked commit and opened new PR #72

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

No branches or pull requests

3 participants