docs: @SuppressWarnings({"checkstyle:cyclomaticcomplexity", "checkstyle:npathcomplexity", "checkstyle:nestedifdepth"})
  	public final synchronized ExtendedArtifact readPomFile(File pomFile) {
  		String groupId;
  		final String artifactId;
  		final String name;
  		String version;
  		final String url;
  		final Organization organization;
  		final Scm scm;
  		List<Developer> developers;
  		List<Contributor> contributors;
  		List<License> licenses;
  		final Parent parent;
  
  		getLog().debug("Read pom file: " + pomFile.toString()); //$NON-NLS-1$
  
  		if (!pomFile.canRead()) {
  			return null;
  		}
  
  		final MavenXpp3Reader pomReader = new MavenXpp3Reader();
  		try (FileReader fr = new FileReader(pomFile)) {
  			final Model model = pomReader.read(fr);
  			groupId = model.getGroupId();
  			artifactId = model.getArtifactId();
  			name = model.getName();
  			version = model.getVersion();
  			url = model.getUrl();
  			organization = model.getOrganization();
  			scm = model.getScm();
  
  			developers = model.getDevelopers();
  			contributors = model.getContributors();
  			licenses = model.getLicenses();
  
  			parent = model.getParent();
  		} catch (IOException | XmlPullParserException e) {
  			return null;
  		}
  		if (developers == null) {
  			developers = new ArrayList<>();
  		} else {
  			final List<Developer> list = new ArrayList<>();
  			list.addAll(developers);
  			developers = list;
  		}
  		if (contributors == null) {
  			contributors = new ArrayList<>();
  		} else {
  			final List<Contributor> list = new ArrayList<>();
  			list.addAll(contributors);
  			contributors = list;
  		}
  		if (licenses == null) {
  			licenses = new ArrayList<>();
  		} else {
  			final List<License> list = new ArrayList<>();
  			list.addAll(licenses);
  			licenses = list;
  		}
  
  		if (parent != null) {
  			final String relPath = parent.getRelativePath();
  			File parentPomDirectory = new File(pomFile.getParentFile(), relPath);
  			try {
  				parentPomDirectory = parentPomDirectory.getCanonicalFile();
  				if (!parentPomDirectory.isDirectory()) {
  					parentPomDirectory = parentPomDirectory.getParentFile();
  				}
  				ExtendedArtifact parentArtifact = this.localArtifactDescriptions.get(parentPomDirectory);
  				if (parentArtifact == null) {
  					parentArtifact = readPom(parentPomDirectory);
  					if (parentArtifact != null) {
  						this.localArtifactDescriptions.put(parentPomDirectory, parentArtifact);
  						getLog().debug("Add local module description for " //$NON-NLS-1$
  								+ parentArtifact.toString());
  					} else {
  						final String key = ArtifactUtils.key(parent.getGroupId(), parent.getArtifactId(), parent.getVersion());
  						final Artifact artifact = createArtifact(parent.getGroupId(),
  								parent.getArtifactId(), parent.getVersion());
  						final ArtifactRepository repo = getMavenSession().getLocalRepository();
  						String artifactPath = repo.pathOf(artifact);
  						artifactPath = artifactPath.replaceFirst("\\.jar$", ".pom"); //$NON-NLS-1$ //$NON-NLS-2$
  						final File artifactFile = new File(repo.getBasedir(), artifactPath);
  						getLog().debug("Getting pom file in local repository for " //$NON-NLS-1$
  								+ key + ": " + artifactFile.getAbsolutePath()); //$NON-NLS-1$
  						final BuildContext buildContext = getBuildContext();
  						buildContext.removeMessages(pomFile);
  						if (artifactFile.canRead()) {
  							parentArtifact = readPomFile(artifactFile);
  							if (parentArtifact != null) {
  								this.remoteArtifactDescriptions.put(key, parentArtifact);
  								getLog().debug("Add remote module description for " //$NON-NLS-1$
  										+ parentArtifact.toString());
  							} else {
  								buildContext.addMessage(
  										pomFile,
  										1, 1,
  										"Unable to retreive the pom file of " + key, //$NON-NLS-1$
  										BuildContext.SEVERITY_WARNING, null);
  							}
  						} else {
  							buildContext.addMessage(
  									pomFile,
  									1, 1,
  									"Cannot read the file for '" + key + "': " //$NON-NLS-1$ //$NON-NLS-2$
  									+ artifactFile.getAbsolutePath(),
  									BuildContext.SEVERITY_WARNING, null);
  						}
  					}
  				}
  				if (parentArtifact != null) {
  					developers.addAll(parentArtifact.getDevelopers());
  					contributors.addAll(parentArtifact.getContributors());
  				}
  			} catch (IOException e) {
  				getLog().warn(e);
  			}
  
  			// Be sure that the optional fields version and groupId are correctly set.
  			if (version == null || version.isEmpty()) {
  				version = parent.getVersion();
  			}
  
  			if (groupId == null || groupId.isEmpty()) {
  				groupId = parent.getGroupId();
  			}
  		}
  
  		String scmRevision = null;
  
  		try {
  			final SVNClientManager svnManager = getSVNClientManager();
  			final SVNInfo svnInfo = svnManager.getWCClient().doInfo(pomFile.getParentFile(), SVNRevision.UNDEFINED);
  			if (svnInfo != null) {
  				final SVNRevision revision = svnInfo.getRevision();
  				if (revision != null) {
  					scmRevision = Long.toString(revision.getNumber());
  				}
  			}
  		} catch (SVNException exception) {
  			//
  		}
  
  		final Artifact a = createArtifact(groupId, artifactId, version);
  		return new ExtendedArtifact(a, name, url, organization, scmRevision, scm, developers, contributors, licenses);
  	}