eclipse-archived / ceylon

The Ceylon compiler, language module, and command line tools
http://ceylon-lang.org
Apache License 2.0
395 stars 62 forks source link

ClassNotFoundException is thrown in one module when it`s maven dependency is excluded in another #7377

Open Kopilov opened 6 years ago

Kopilov commented 6 years ago

Hello! The problem accrued on experiment with Apache Ignite. Sorry for the large example.

The general problem (if I understand correctly) is that ceylon run or ceylon fat-jar do not add transitive Maven dependency if it is marked as an "exclusion" anywhere but is used anywhere else.

How to reproduce is described in this repository

To make the broken project working, as workaround, we can exclude and readd the problem module in overrides.xml by adding remove and add tags together. Using add and set together also works. In the example they are commented.

I have found an assertion in #6597 issue:

Yes that one is due to a bug in Gradle which does not follow the import scopes. We do, like Maven does, and so that one is excluded.

but in this case Maven project works and equivalent Ceylon project does not work without overrides.xml customization.