All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.enofex.naikan.maven.provider.pom.ProjectProvider Maven / Gradle / Ivy

package com.enofex.naikan.maven.provider.pom;

import com.enofex.naikan.model.Bom;
import com.enofex.naikan.model.Project;
import org.apache.maven.execution.MavenSession;
import org.apache.maven.project.MavenProject;

public final class ProjectProvider extends PomProvider {

  @Override
  public Project provide(MavenSession session, MavenProject project, Bom existingBom) {
    if (project != null) {
      return new Project(
          project.getName(),
          project.getInceptionYear(),
          project.getUrl(),
          project.getScm() != null ? project.getScm().getUrl() : null,
          project.getPackaging(),
          project.getGroupId(),
          project.getArtifactId(),
          project.getVersion(),
          project.getDescription(),
          null
      );
    }

    return null;
  }

  @Override
  public boolean support(Class clazz) {
    return Project.class.isAssignableFrom(clazz);
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy