'How to handle a non-resolvable parent POM?

I've found quite a lot questions regarding this. None of which seemed to help.

I have some old code using Eclipse SWT V4234 that I'm trying to resurrect. I have cloned the repo with git and imported it into Eclipse IDE.

<project
  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
  xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <modelVersion>4.0.0</modelVersion>

  <parent>
    <groupId>org.eclipse</groupId>
    <artifactId>eclipse-parent</artifactId>
    <version>1.0.0-SNAPSHOT</version>
   </parent>

  <groupId>eclipse.platform.swt</groupId>
  <artifactId>eclipse.platform.swt</artifactId>
  <version>3.8.0-SNAPSHOT</version>
  <packaging>pom</packaging>

  <modules> 
     <module>bundles/org.eclipse.swt</module>

This resulted in this error :

Project build error: Non-resolvable parent POM for eclipse.platform.swt:eclipse.platform.swt:3.8.0-SNAPSHOT: Could not find artifact org.eclipse:eclipse-parent:pom:1.0.0-SNAPSHOT and 'parent.relativePath' points at wrong local POM

What I need to understand is what the "Parent" attribute is attempting to achieve. My assumption (maybe incorrectly) was I had cloned SWT as a standalone project without dependence to any parent.

If I comment out the parent attribute, the issue disappears, but as I have little knowledge on Maven and Java development this made me ask why this was required in the first place.

So what is the relationship between groupId/artifactId (eclipse.platform.swt) and the Parent groupId/artifactId (org.eclipse).

So what is org.eclipse and why does it need to be mentioned? Is it fine they overlap?

Do I need to reference the parent POM if I'm making a standalone package for SWT?

Is it safe just to comment out the parent attribute?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source