I have three OSGI projects:
ProjectA (has dependency to ProjectB <scope>provided</scope>
) has a class with the code
...
ClassB b=new ClassB();
ProjectB (has dependency to ProjectC <scope>provided</scope>
) has the following class:
public class ClassB extends AbstractClassC{
...
}
ProjectC has the following class:
public abstract class AbstractClassC{
}
ProjectB and ProjectC export all necessary packages.
In order:
- I compile ProjectC - ok.
- I compile ProjectB - ok.
- I compile ProjectA - throws AbstractClassC not found.
When I add in ProjectA dependency to ProjectC everything compiles without a problem. Why does this happen? As I understand ProjectA must be compiled with only one dependency to ProjectB. Am I wrong?
I've checked several times AbstractClassC is not used in ProjectA and not imported.