diff --git a/src/main/java/org/codehaus/mojo/license/AddThirdPartyMojo.java b/src/main/java/org/codehaus/mojo/license/AddThirdPartyMojo.java index b494652e..c2c47a87 100644 --- a/src/main/java/org/codehaus/mojo/license/AddThirdPartyMojo.java +++ b/src/main/java/org/codehaus/mojo/license/AddThirdPartyMojo.java @@ -88,6 +88,17 @@ public class AddThirdPartyMojo extends AbstractAddThirdPartyMojo implements Mave @Parameter(property = "license.skipAddThirdParty", defaultValue = "false") private boolean skipAddThirdParty; + /** + * Add the output directory as resource directory. + *

+ * If this is set to false the generated files are no longer added automatically to the final artifact. + *

+ * + * @since 2.5 + */ + @Parameter(property = "license.addOutputDirectoryAsResourceDir", defaultValue = "true") + private boolean addOutputDirectoryAsResourceDir; + // ---------------------------------------------------------------------- // Private Fields // ---------------------------------------------------------------------- @@ -184,7 +195,10 @@ protected void doAction() throws Exception { getHelper().attachThirdPartyDescriptor(missingFile); } - addResourceDir(outputDirectory, "**/*.txt"); + if (addOutputDirectoryAsResourceDir) { + + addResourceDir(outputDirectory, "**/*.txt"); + } } // ----------------------------------------------------------------------