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

Remove commons lang as a compile time dependency #594

Merged
merged 1 commit into from Aug 2, 2022

Conversation

agentgt
Copy link
Contributor

@agentgt agentgt commented Jul 31, 2022

This pull request remove the commons lang dependency such that it maybe excluded in maven or gradle.

There is very little usage of Commons Lang 3 in this library and most of the usage is builtin future JDK versions (e.g. String.isBlank is in JDK 11).

I have left the dependency in Maven for projects that accidentally depend on this project to pull Commons Lang in as a transitive dependency.

We need this for our code base as we do not allow commons lang 3 in most of our projects.

@stevehu stevehu merged commit 1ecc9da into networknt:master Aug 2, 2022
@stevehu
Copy link
Contributor

stevehu commented Aug 2, 2022

@agentgt. Thanks a lot for your help.

@agentgt
Copy link
Contributor Author

agentgt commented Aug 2, 2022

Thanks @stevehu !

You might want to add to the readme or whatever that if people want to exclude commons lang:

<dependency>
    <groupId>com.networknt</groupId>
    <artifactId>json-schema-validator</artifactId>
    <version>next version</version>
    <exclusions>
    <exclusion>
    <groupId>org.apache.commons</groupId>
    <artifactId>commons-lang3</artifactId>
    </exclusion>
    </exclusions>
</dependency>

Then perhaps in the next major or minor version you remove the dependency all together from the maven pom file.

@stevehu
Copy link
Contributor

stevehu commented Aug 2, 2022

I think we can safely remove the commons-lang3 dependency. What do you think?

@agentgt
Copy link
Contributor Author

agentgt commented Aug 5, 2022

I think we can safely remove the commons-lang3 dependency. What do you think?

Probably. I think 99% of the time it will be ok because if someone modifies their pom to use the latest version of this library they can in theory also fix relying on the transitive dependency which is bad practice anyway.

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

Successfully merging this pull request may close these issues.

None yet

2 participants