From 60203bb12941aededac0d6d068a5ae8c9b72e3ed Mon Sep 17 00:00:00 2001 From: Alexander Kurtakov Date: Thu, 19 May 2022 07:15:21 +0300 Subject: [PATCH] Ignore .gitignore and .gitatributes file types from packaging Caused by https://github.com/codehaus-plexus/plexus-utils/pull/174 . Fixes https://github.com/eclipse/tycho/issues/966 . --- .../eclipse/tycho/packaging/AbstractTychoPackagingMojo.java | 4 ++++ .../main/java/org/eclipse/tycho/source/SourceFeatureMojo.java | 3 +++ 2 files changed, 7 insertions(+) diff --git a/tycho-packaging-plugin/src/main/java/org/eclipse/tycho/packaging/AbstractTychoPackagingMojo.java b/tycho-packaging-plugin/src/main/java/org/eclipse/tycho/packaging/AbstractTychoPackagingMojo.java index a87e658e36..59fb2e122d 100644 --- a/tycho-packaging-plugin/src/main/java/org/eclipse/tycho/packaging/AbstractTychoPackagingMojo.java +++ b/tycho-packaging-plugin/src/main/java/org/eclipse/tycho/packaging/AbstractTychoPackagingMojo.java @@ -103,6 +103,10 @@ protected FileSet getFileSet(File basedir, List includes, List e } if (useDefaultExcludes) { allExcludes.addAll(Arrays.asList(AbstractScanner.DEFAULTEXCLUDES)); + // keep ignoring the following files after + // https://github.com/codehaus-plexus/plexus-utils/pull/174 + allExcludes.add("**/.gitignore"); + allExcludes.add("**/.gitattributes"); } fileSet.setExcludes(allExcludes.toArray(new String[allExcludes.size()])); diff --git a/tycho-source-plugin/src/main/java/org/eclipse/tycho/source/SourceFeatureMojo.java b/tycho-source-plugin/src/main/java/org/eclipse/tycho/source/SourceFeatureMojo.java index 36cfcb7863..57f419ff8d 100644 --- a/tycho-source-plugin/src/main/java/org/eclipse/tycho/source/SourceFeatureMojo.java +++ b/tycho-source-plugin/src/main/java/org/eclipse/tycho/source/SourceFeatureMojo.java @@ -662,6 +662,9 @@ protected FileSet getFileSet(File basedir, List includes, List e } if (useDefaultExcludes) { allExcludes.addAll(Arrays.asList(AbstractScanner.DEFAULTEXCLUDES)); + // keep ignoring the following files after https://github.com/codehaus-plexus/plexus-utils/pull/174 + allExcludes.add("**/.gitignore"); + allExcludes.add("**/.gitattributes"); } fileSet.setExcludes(allExcludes.toArray(new String[allExcludes.size()]));