
checklicense.model.Compliant Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of maven-check-license Show documentation
Show all versions of maven-check-license Show documentation
A maven plugin for checking licenses of dependencies
The newest version!
package checklicense.model;
import org.apache.maven.artifact.Artifact;
import org.apache.maven.model.License;
import org.apache.maven.project.MavenProject;
import java.util.List;
public record Compliant(String groupId, String artifactId, String version, List licenses, Rule rule) {
public Compliant(Artifact artifact, MavenProject artifactProject, Rule rule) {
this(artifact.getGroupId(), artifact.getArtifactId(), artifact.getVersion(), artifactProject.getLicenses(), rule);
}
public String toMessage() {
return "License for " + groupId + ":" + artifactId + ":" + version + " matches rule '" + rule + "'";
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy