in src/main/java/org/apache/dolphinscheduler/maven/SpiDependencyChecker.java [74:103]
public void execute() throws MojoExecutionException {
if (skipCheckSpiDependencies) {
getLog().info("Skipping Dolphinscheduler SPI dependency checks");
return;
}
Set<String> spiDependencies = getTheSpiDependencies();
getLog().debug("SPI dependencies: " + spiDependencies);
for (Artifact artifact : mavenProject.getArtifacts()) {
if (isSpiArtifact(artifact)) {
continue;
}
String name = artifact.getGroupId() + ":" + artifact.getArtifactId();
if (spiDependencies.contains(name)) {
if (!"jar".equals(artifact.getType())) {
throw new MojoExecutionException(String.format("%n%nDolphinscheduler plugin dependency %s must have type 'jar'.", name));
}
if (artifact.getClassifier() != null) {
throw new MojoExecutionException(String.format("%n%nDolphinscheduler plugin dependency %s must not have a classifier.", name));
}
if (!"provided".equals(artifact.getScope())) {
throw new MojoExecutionException(String.format("%n%nDolphinscheduler plugin dependency %s must have scope 'provided'. It is part of the SPI and will be provided at runtime.", name));
}
}
else if ("provided".equals(artifact.getScope()) && !allowedProvidedDependencies.contains(name)) {
throw new MojoExecutionException(String.format("%n%nDolphinscheduler plugin dependency %s must not have scope 'provided'. It is not part of the SPI and will not be available at runtime.", name));
}
}
}