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

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

Go to download

The Naikan Model Plugin for Naikan the software inventory management tool for dev teams driven by our CI/CD pipeline.

The newest version!
package com.enofex.naikan.maven.provider.pom;

import com.enofex.naikan.model.Bom;
import com.enofex.naikan.model.Tags;
import com.enofex.naikan.model.Technologies;
import com.enofex.naikan.model.Technology;
import java.util.ArrayList;
import java.util.List;
import org.apache.maven.execution.MavenSession;
import org.apache.maven.project.MavenProject;

public final class JavaTechnologyProvider extends PomProvider {

  @Override
  public Technologies provide(MavenSession session, MavenProject project, Bom existingBom) {
    List technologies = new ArrayList<>(1);

    java(project, technologies);

    return new Technologies(technologies);
  }

  private void java(MavenProject project, List technologies) {
    String version = project.getProperties().getProperty("java.version");

    if (version != null) {
      technologies.add(new Technology(
          "Java",
          version,
          "Object-oriented programming language",
          Tags.of("Backend")));
    }
  }

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy