I would raise a bug asking them to move the lexical parser into a new maven artifact (or several of them), so you can distinguish them.
If that doesn't happen, you have two options:
- Use the Maven shade plugin (as suggested by ooxi)
- Delete the offending classes
Breakdown of the second approach:
- Use you favorite ZIP tool to open the JAR archive.
- Delete the offending packages.
- Copy the original POM
- Change the version version to something like
1.1.MythBuster.1
or1.1.no-lexer.1
- Use
mvn file:install
to install the modified artifact in your local repo - Test it
- Use
mvn deploy:deploy-file
to install the modified artifact in your company's repo
I prefer the second approach since it makes sure the build has a clean classpath, people know that you messed with the original file and it's pretty obvious what is going on.