Class CompleterDelegate
java.lang.Object
com.cloudbees.maven.license.CompleterDelegate
Base class for completer scripts that define convenience methods.
The completion phase runs on each dependency to complete the missing license information, accept one from dual-licensed libraries, etc.
- Author:
- Kohsuke Kawaguchi
-
Field Summary
FieldsModifier and TypeFieldDescriptionorg.apache.maven.project.MavenProjectorg.apache.maven.project.MavenProject -
Constructor Summary
ConstructorsConstructorDescriptionCompleterDelegate(org.apache.maven.project.MavenProject dependency, org.apache.maven.project.MavenProject project) -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.maven.model.LicenseCreates a new license object.voidIf the current dependency matches the given groupId/artifactId, execute the bodyvoidrewriteLicense(Collection<org.apache.maven.model.License> expected, org.apache.maven.model.License to) Verifies that the license of the current dependency is the ones listed in the 'expected' argument, rewrite it with the specified one.
-
Field Details
-
dependency
public org.apache.maven.project.MavenProject dependency -
project
public org.apache.maven.project.MavenProject project
-
-
Constructor Details
-
CompleterDelegate
public CompleterDelegate(org.apache.maven.project.MavenProject dependency, org.apache.maven.project.MavenProject project)
-
-
Method Details
-
match
If the current dependency matches the given groupId/artifactId, execute the body- Parameters:
criteria- A string like "groupId:artifactId" that matches the current dependency ("*" is allowed for wildcard), or a collection/array of them.
-
rewriteLicense
public void rewriteLicense(Collection<org.apache.maven.model.License> expected, org.apache.maven.model.License to) Verifies that the license of the current dependency is the ones listed in the 'expected' argument, rewrite it with the specified one. This is for completing missing license info, and for selecting one from multi-licensed dependencies. -
license
-