I am working on an application which got multiple projects. I am trying add dependency management for one of the common project in the root POM so that I can ensure that all projects uses the same version.
Root/parent pom contain
<groupId>com.citylimited</groupId>
<artifactId>maven-master-project</artifactId>
<version>12.3.2-SNAPSHOT</version>
<packaging>pom</packaging>
<name>Maven Master Project</name>
<dependencyManagement>
<dependencies>
<!-- COMPILE Dependencies -->
<dependency>
<groupId>com.city.common</groupId>
<artifactId>common-project-jar</artifactId>
<version>${project.version}</version>
<scope>compile</scope>
</dependency>
</dependencies>
<dependencyManagement>
When I do maven build from my common project it fails as shown below.
[ERROR] Failed to execute goal on project common-project-jar: Could not resolve dependencies for project com.citylimited:common-project-jar:jar:12.3.2-SNAPSHOT
: Failure to find com.citylimited:common-project-jar:jar:12.3.2-SNAPSHOT in http://server1/nexus/content/groups/public was cached in the local repository, re
solution will not be reattempted until the update interval of internal-city-repository has elapsed or updates are forced -> [Help 1]
[ERROR]
Questions:
- What causing the above issue ?
- Can I add a child common project in the root project's dependency management section and refer in all other child projects?.