elharo commented on code in PR #830:
URL:
https://github.com/apache/maven-shade-plugin/pull/830#discussion_r3848203360
##########
src/main/java/org/apache/maven/plugins/shade/mojo/ShadeMojo.java:
##########
@@ -971,6 +972,9 @@ private List<ResourceTransformer> getResourceTransformers()
throws MojoExecution
throw new MojoExecutionException(
"Failed to create shaded artifact: parameter
transformers contains null (double-check XML attribute)");
}
+ if (transformer instanceof ApacheNoticeResourceTransformer) {
Review Comment:
might be necessary, but it would be cleaner if we could figure out some way
to do this that doesn't require instanceof and casting.
##########
src/main/java/org/apache/maven/plugins/shade/resource/ApacheNoticeResourceTransformer.java:
##########
@@ -79,6 +79,19 @@ public class ApacheNoticeResourceTransformer extends
AbstractCompatibilityTransf
private static final String NOTICE_MD_PATH = "META-INF/NOTICE.md";
+ /**
+ * Uses the Maven project name when no project name was configured
explicitly.
+ *
+ * @param projectName the Maven project name
+ */
+ public void setProjectNameIfUnset(String projectName) {
Review Comment:
why "if unset"? why not just set project name?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]