I\'m following a tutorial for maven. I have a very simple project with a couple of modules inside. On the module pom I want to reference the main proyect pom version and group t
I assume the question is already answered. If above solution doesn't help in solving the issue then can use below to solve the issue.
The issue occurs if sometimes your maven user settings is not reflecting correct settings.xml file.
To update the settings file go to Windows > Preferences > Maven > User Settings and update the settings.xml to it correct location.
Once this is doen re-build the project, these should solve the issue. Thanks.
I had the same issue. Fixed by adding a pom.xml in parent folder with <modules>
listed.
Looks like you're trying to both inherit the groupId from the parent, and simultaneously specify the parent using an inherited groupId!
In the child pom, use something like this:
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.felipe</groupId>
<artifactId>tutorial_maven</artifactId>
<version>1.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>tutorial_maven_jar</artifactId>
Using properties like ${project.groupId}
won't work there. If you specify the parent in this way, then you can inherit the groupId and version in the child pom. Hence, you only need to specify the artifactId in the child pom.
As Nayan said the Path has to updated properly in my case the apache-maven was installed in C:\apache-maven and settings.xml was found inside C:\apache-maven\conf\settings.xml
if this doesn't work go to your local repos
in my case C:\Users\<<"name">>.m2\
and search for .lastUpdated and delete them
then build the maven