Is it fine to use a Go-licenced 3rd party library (https://github.com/google/re2j) within an Apache2-licensed code?


1 Answer 1


The license of the re2j project you linked to is a 3-clause BSD license. This is perfectly compatible with Apache 2.

This 3-clause BSD license requires that you do not remove the license notice from the source code, that you include the license notice in your documentation, and that you don't use Google's brand to promote your software (duh!). None of these requirements conflict with Apache 2, which essentially requires the same things.

The Apache 2 license uses a NOTICE file mechanism for acknowledgements and upstream licenses. If you include the re2j software into your project, you should probably add the re2j license to your project's NOTICE file. If you merely declare re2j as a dependency that's not necessary for your source code, but note that these requirements still trigger if you distribute a binary (like a jar file) that includes the re2j software.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.