diff --git a/src/main/java/org/cyclonedx/maven/DefaultModelConverter.java b/src/main/java/org/cyclonedx/maven/DefaultModelConverter.java index ae79e49b..24249b0d 100644 --- a/src/main/java/org/cyclonedx/maven/DefaultModelConverter.java +++ b/src/main/java/org/cyclonedx/maven/DefaultModelConverter.java @@ -172,18 +172,16 @@ public Component convert(Artifact artifact, CycloneDxSchema.Version schemaVersio if (CycloneDxSchema.Version.VERSION_10 != schemaVersion) { component.setBomRef(component.getPurl()); } - if (isDescribedArtifact(artifact)) { - try { - final MavenProject project = getEffectiveMavenProject(artifact); - if (project != null) { - extractComponentMetadata(project, component, schemaVersion, includeLicenseText); - } - } catch (ProjectBuildingException e) { - if (logger.isDebugEnabled()) { - logger.warn("Unable to create Maven project for " + artifact.getId() + " from repository.", e); - } else { - logger.warn("Unable to create Maven project for " + artifact.getId() + " from repository."); - } + try { + final MavenProject project = getEffectiveMavenProject(artifact); + if (project != null) { + extractComponentMetadata(project, component, schemaVersion, includeLicenseText); + } + } catch (ProjectBuildingException e) { + if (logger.isDebugEnabled()) { + logger.warn("Unable to create Maven project for " + artifact.getId() + " from repository.", e); + } else { + logger.warn("Unable to create Maven project for " + artifact.getId() + " from repository."); } } return component; @@ -204,16 +202,6 @@ private boolean isModified(Artifact artifact) { return false; } - /** - * Returns true for any artifact type which will positively have a POM that - * describes the artifact. - * @param artifact the artifact - * @return true if artifact will have a POM, false if not - */ - private boolean isDescribedArtifact(Artifact artifact) { - return artifact.getType().equalsIgnoreCase("jar"); - } - /** * Extracts data from a project and adds the data to the component. * @param project the project to extract data from