I have the following dependencies: A, B and X. "->" means depends on.
A -> B
X -> A
B has the following public Class:
public class PublicClassB {
public static void do() {
}
}
PublicClassB is used by X and A. E.
The pom for class A is the following:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>my.company.name</groupId>
<artifactId>A</artifactId>
<version>1.0.0</version>
<dependencies>
<dependency>
<groupId>my.company.name</groupId>
<artifactId>B</artifactId>
<version>1.0.0</version>
</dependency>
</dependencies>
</project>
The pom for X is the following:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>my.company.name</groupId>
<artifactId>X</artifactId>
<version>1.0.0</version>
<dependencies>
<dependency>
<groupId>my.company.name</groupId>
<artifactId>A</artifactId>
<version>1.0.0</version>
</dependency>
</dependencies>
</project>
Is there a way to access PublicClassB#do() from X?. I can't make the import work, Eclipse doesn't detect the package on B.