From 1a414d410aa54f72242fa4e5583d4e9a229501e7 Mon Sep 17 00:00:00 2001 From: "J. Daniel Kulp" Date: Sun, 16 Mar 2008 01:30:21 +0000 Subject: [PATCH] Allow turning off the header. git-svn-id: https://svn.apache.org/repos/asf/maven/plugins/trunk@637502 13f79535-47bb-0310-9956-ffa450edef68 --- .../resource/ApacheNoticeResourceTransformer.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/apache/maven/plugins/shade/resource/ApacheNoticeResourceTransformer.java b/src/main/java/org/apache/maven/plugins/shade/resource/ApacheNoticeResourceTransformer.java index c617ce0e..1456a3db 100644 --- a/src/main/java/org/apache/maven/plugins/shade/resource/ApacheNoticeResourceTransformer.java +++ b/src/main/java/org/apache/maven/plugins/shade/resource/ApacheNoticeResourceTransformer.java @@ -43,6 +43,7 @@ public class ApacheNoticeResourceTransformer Map organizationEntries = new LinkedHashMap(); String projectName; + boolean addHeader = true; String preamble1 = "// ------------------------------------------------------------------\n" @@ -86,7 +87,14 @@ public void processResource( InputStream is ) //add headers - entries.add( preamble1 + projectName + preamble2 ); + if ( addHeader ) + { + entries.add( preamble1 + projectName + preamble2 ); + } + else + { + entries.add(""); + } //fake second entry, we'll look for a real one later entries.add( projectName + "\nCopyright " + year + " " + organizationName + "\n" ); entries.add( preamble3 + organizationName + " ("+ organizationURL +").\n" );