As an example, say that I have a utility library in Haxe for parameter validation, which targets Java and generates a jar file. I also have a database library written in haxe, which references the validation library, targets Java, and generates a jar file. So from these two projects, both the jar files include the compiled standard library and the validation library. So when I build a java program that happens to use both of these libraries, the standard and validation libraries are included on the classpath twice. This can lead to issues if for example the validation library is updated to a new version but the database library is not recompiled - you end up with two versions of the same code on the classpath, which can lead to issues.
Is there something else that I’m missing that could solve this issue? I think at its heart what I’m looking for is a way to filter the outputted code so that it only includes code compiled from the current project.