com.enofex.naikan.maven.provider.pom.DevelopersProvider Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of naikan-maven-plugin Show documentation
Show all versions of naikan-maven-plugin Show documentation
The Naikan Model Plugin for Naikan the software inventory management tool for dev teams driven by our CI/CD pipeline.
package com.enofex.naikan.maven.provider.pom;
import com.enofex.naikan.model.Bom;
import com.enofex.naikan.model.Developer;
import com.enofex.naikan.model.Developers;
import com.enofex.naikan.model.Roles;
import java.util.List;
import java.util.stream.Stream;
import org.apache.maven.execution.MavenSession;
import org.apache.maven.project.MavenProject;
public final class DevelopersProvider extends PomProvider {
@Override
public Developers provide(MavenSession session, MavenProject project, Bom existingBom) {
if (project.getDevelopers() != null) {
return new Developers(project.getDevelopers()
.stream()
.map(developer -> new Developer(
developer.getName(),
developer.getId(),
null,
null,
developer.getEmail(),
null,
developer.getOrganization(),
developer.getOrganizationUrl(),
developer.getTimezone(),
null,
new Roles(Stream.of(List.of("Developer"), developer.getRoles())
.flatMap(List::stream)
.toList())))
.toList());
}
return Developers.empty();
}
@Override
public boolean support(Class> clazz) {
return Developers.class.isAssignableFrom(clazz);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy