Cześć,
mam projekt złożony z 3 modułów zagregowanych w jednym wspolnym module:
Glowny modul:
<project ...>
<artifactId>glowny</artifactId>
<packaging>pom</packaging>
<modules>
<module>1</module>
<module>2</module>
<module>3</module>
</modules>
</project>
```
Modul 1:
```xml
<project ...>
<parent>
<artifactId>glowny</artifactId>
</parent>
<artifactId>1</artifactId>
<dependencies>
<dependency>
<artifactId>2</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<version>4.1.1.RELEASE</version>
</dependency>
</dependencies>
</project>
```
Modul 2:
```xml
<project ...>
<modelVersion>4.0.0</modelVersion>
<parent>
<artifactId>glowny</artifactId>
</parent>
<artifactId>2</artifactId>
<dependencies>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>4.1.1.RELEASE</version>
</dependency>
</dependencies>
</project>
```
Modul 3:
```xml
<project ...>
<parent>
<artifactId>glowny</artifactId>
</parent>
<artifactId>3</artifactId>
<packaging>war</packaging>
<dependencies>
<dependency>
<artifactId>1</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-webmvc</artifactId>
<version>4.1.1.RELEASE</version>
</dependency>
<!-- tę zależność usuwam i wtedy tomcat wywala błędy
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>4.1.1.RELEASE</version>
</dependency>
-->
</dependencies>
</project>
```
Jak widać projekt 3 zależy od spring-context, sprint-webmvc oraz modulu 1. Modul 1 zalezy od spring-core i modulu 2. Modul 2 zalezy od spring-context.
Wszytko działa jak zakładałem, ale gdy usuwam z modulu 3 zależność spring-context to tomcat wywala błędy, że brakuje mu klas z tego modułu. Dlaczego tak jest ? Czy modul 3 nie dziedziczy spring-context z modułu 2 ? Jeżeli nie to jak to działa ?