There is a multi-module Maven-3 project in which one of the submodules is used as a <dependency> in all other modules. At the same time, all submodules are inherited from the parent module. Such a structure leads to a cyclic dependence. How can I solve it?
The structure of the project is quite typical:
/foo /foo-testkit /foo-core
This is the parent foo/pom.xml :
[...] <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-checkstyle-plugin</artifactId> <configuration> <configLocation>checkstyle/checks.xml</configLocation> </configuration> <dependencies> <dependency> <groupId>${project.groupId}</groupId> <artifactId>foo-testkit</artifactId> <version>${project.version}</version> </dependency> </dependencies> <executions> <execution> <phase>prepare-package</phase> <goals> <goal>check</goal> </goals> </execution> </executions> </plugin> </plugins> </build> [...]
In the parent foo/pom.xml I specify how and when the checkstyle plugin should be executed in each submodule. But I do not need a checkstyle to execute in foo-testkit , which is a submodule inheriting from foo , but at the same time dependent.
source share