0

UPDATE:

unfortunately the requirement is to use incremental builds. The program compiles a mini compiler for data science models. This mini compiler uses dev, and needs to be able to handle duplicate model names.

Looks like the search keyword "override" brought up a new result, I will investigate further... Ideally my post is a duplicate of this. It is late, sorry for the potential duplicate, I will check in the morning.


I am trying to override classes from an external dependency.

The questions asked in StackExchange regarding duplicate classes are about "why" they are getting an error, and the answer is to delete duplicate classes. However, the issue here is I would like to override certain classes from external dependencies, I know why it is causing errors, but I don't know of any workarounds.

This suggested there are no workarounds

This question had no answers

Project –Module: dev (depends on prod) –Module: prod

However, dev contains some duplicate class which should be loaded instead of those from prod module. ie, prod: a.java, b.java… dev: a.java, c.java…

I expect there to be a workaround to override external class dependencies, but all I can do is crash the build.

I figured this would be a common problem, overriding classes from dependencies. But there seems to be no record of a workaround?

Bump.

user
  • 101
  • 3
  • I would suggest rethinking your requirements and follow the approach of removing duplicate classes, for example think of a way you can have a separate build for prod and dev. – Cray Jun 27 '19 at 05:19
  • @cray unfortunately the requirement is to use incremental builds. The program compiles a mini compiler for data science models. This mini compiler uses `dev`, and needs to be able to handle duplicate model names. – user Jun 27 '19 at 05:41

0 Answers0