From 26a613542c3499dcd3ade38d2a18da98f794ff17 Mon Sep 17 00:00:00 2001 From: Vincent Siveton Date: Mon, 31 Oct 2005 23:10:58 +0000 Subject: [PATCH] PR: MNG-1382("duplicate files" exception) Update defaultExcludes depending locales and defaultLocale git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@329928 13f79535-47bb-0310-9956-ffa450edef68 --- .../main/java/org/apache/maven/plugins/site/SiteMojo.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/maven-plugins/maven-site-plugin/src/main/java/org/apache/maven/plugins/site/SiteMojo.java b/maven-plugins/maven-site-plugin/src/main/java/org/apache/maven/plugins/site/SiteMojo.java index 1f6648b8ca..c683f25da8 100644 --- a/maven-plugins/maven-site-plugin/src/main/java/org/apache/maven/plugins/site/SiteMojo.java +++ b/maven-plugins/maven-site-plugin/src/main/java/org/apache/maven/plugins/site/SiteMojo.java @@ -291,6 +291,14 @@ public class SiteMojo // Try to find duplicate files Map duplicate = new LinkedHashMap(); String defaultExcludes = StringUtils.join( FileUtils.getDefaultExcludes(), "," ); + if ( locale.getLanguage().equals( defaultLocale.getLanguage() ) ) + { + for (Iterator it = localesList.iterator(); it.hasNext();) + { + Locale l = (Locale) it.next(); + defaultExcludes += "," + l.getLanguage() + "/**"; + } + } if ( siteDirectoryFile.exists() ) {