You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// look for attached artifact with given classifier
199
199
for (Artifactartifact : project.getAttachedArtifacts()) {
200
-
if (classifier.equals(artifact.getClassifier())) {
200
+
if (classifier.equals(artifact.getClassifier()) && Constants.EXTENSION_CONTENT_PACKAGE.equalsIgnoreCase(artifact.getArtifactHandler().getExtension())) {
201
201
getLog().info("Using attached artifact with classifier '" + classifier + "' as content package: " + project.getArtifact());
202
202
result.add(artifact);
203
+
break; // only one attached artifact with matching classifier and extension is expected
203
204
}
204
205
}
205
206
if (result.isEmpty()) {
206
-
thrownewMojoExecutionException("No attached artifact with classifier " + classifier + " found for project.");
207
+
thrownewMojoExecutionException("No attached artifact with classifier \"" + classifier + "\" and extension \"" + Constants.EXTENSION_CONTENT_PACKAGE + "\" found for project.");
207
208
}
208
209
} else {
209
210
// Use the current project artifact as the content package
210
211
getLog().info("Using current project as content package: " + project.getArtifact());
211
212
if (project.getArtifact().getFile() == null) {
212
213
// in case of a standalone usage of the plugin, the project artifact file might not be set
// copied from https://github.com/apache/jackrabbit-filevault-package-maven-plugin/blob/filevault-package-maven-plugin-1.4.0/src/main/java/org/apache/jackrabbit/filevault/maven/packaging/impl/extensions/ContentPackageArtifactHandler.java
0 commit comments