diff --git a/maven-mboot2/src/main/java/model/Repository.java b/maven-mboot2/src/main/java/model/Repository.java index 9581256da3..49e1ab5474 100644 --- a/maven-mboot2/src/main/java/model/Repository.java +++ b/maven-mboot2/src/main/java/model/Repository.java @@ -80,10 +80,7 @@ public class Repository else if ( LAYOUT_DEFAULT.equals( layout ) ) { repositoryPath = dependency.getGroupId().replace( '.', '/' ); -// if ( !dependency.getType().equals( "pom" ) ) -// { repositoryPath = repositoryPath + "/" + dependency.getArtifactId() + "/" + dependency.getVersion(); -// } repositoryPath = repositoryPath + "/" + dependency.getArtifact(); } else diff --git a/maven-plugins/maven-assembly-plugin/pom.xml b/maven-plugins/maven-assembly-plugin/pom.xml index 260aea9f41..0480e5cc38 100755 --- a/maven-plugins/maven-assembly-plugin/pom.xml +++ b/maven-plugins/maven-assembly-plugin/pom.xml @@ -2,7 +2,7 @@ maven-plugin-parent org.apache.maven.plugins - 2.0-beta-3 + 2.0-beta-4-SNAPSHOT 4.0.0 maven-assembly-plugin @@ -49,15 +49,25 @@ org.apache.maven maven-project + + org.codehaus.plexus + plexus-utils + org.codehaus.plexus plexus-archiver 1.0-alpha-3-SNAPSHOT + + + plexus + plexus-utils + + org.apache.maven maven-artifact - 2.0-beta-1 + 2.0-beta-4-SNAPSHOT diff --git a/maven-plugins/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/AssemblyMojo.java b/maven-plugins/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/AssemblyMojo.java index 7c65fc60ed..1cb48922cf 100755 --- a/maven-plugins/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/AssemblyMojo.java +++ b/maven-plugins/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/AssemblyMojo.java @@ -50,7 +50,6 @@ import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.io.Reader; -import java.util.ArrayList; import java.util.Iterator; import java.util.List; import java.util.regex.Matcher; @@ -304,8 +303,7 @@ public class AssemblyMojo "Unable to obtain unarchiver for file '" + artifact.getFile() + "'" ); } } - archiver.addDirectory( tempLocation, null, - (String[]) getDefaultExcludes().toArray( EMPTY_STRING_ARRAY ) ); + archiver.addDirectory( tempLocation, null, FileUtils.getDefaultExcludes() ); } else { @@ -378,7 +376,7 @@ public class AssemblyMojo // TODO: default excludes should be in the archiver? List excludesList = fileSet.getExcludes(); - excludesList.addAll( getDefaultExcludes() ); + excludesList.addAll( FileUtils.getDefaultExcludesAsList() ); String[] excludes = (String[]) excludesList.toArray( EMPTY_STRING_ARRAY ); File archiveBaseDir = new File( directory ); @@ -530,42 +528,6 @@ public class AssemblyMojo return archiver; } - /** - * Insert into the exclude list the default excludes file pattern. - * - * @return defaultExcludes List containing the default patterns of files to be excluded. - */ - public static List getDefaultExcludes() - { - List defaultExcludes = new ArrayList(); - defaultExcludes.add( "**/*~" ); - defaultExcludes.add( "**/#*#" ); - defaultExcludes.add( "**/.#*" ); - defaultExcludes.add( "**/%*%" ); - defaultExcludes.add( "**/._*" ); - - // CVS - defaultExcludes.add( "**/CVS" ); - defaultExcludes.add( "**/CVS/**" ); - defaultExcludes.add( "**/.cvsignore" ); - - // SCCS - defaultExcludes.add( "**/SCCS" ); - defaultExcludes.add( "**/SCCS/**" ); - - // Visual SourceSafe - defaultExcludes.add( "**/vssver.scc" ); - - // Subversion - defaultExcludes.add( "**/.svn" ); - defaultExcludes.add( "**/.svn/**" ); - - // Mac - defaultExcludes.add( "**/.DS_Store" ); - - return defaultExcludes; - } - private void copyReplacingLineEndings( File source, File dest, String lineEndings ) throws IOException { diff --git a/maven-plugins/maven-checkstyle-plugin/pom.xml b/maven-plugins/maven-checkstyle-plugin/pom.xml index 785728f81b..f1edbf164b 100644 --- a/maven-plugins/maven-checkstyle-plugin/pom.xml +++ b/maven-plugins/maven-checkstyle-plugin/pom.xml @@ -2,7 +2,7 @@ maven-plugin-parent org.apache.maven.plugins - 2.0-beta-3 + 2.0-beta-4-SNAPSHOT 4.0.0 maven-checkstyle-plugin @@ -54,7 +54,7 @@ org.apache.maven.reporting maven-reporting-impl - 2.0-beta-1 + 2.0-beta-4-SNAPSHOT antlr @@ -66,5 +66,9 @@ checkstyle-optional 3.4 + + org.codehaus.plexus + plexus-utils + diff --git a/maven-plugins/maven-checkstyle-plugin/src/main/java/org/apache/maven/plugin/checkstyle/CheckstyleReport.java b/maven-plugins/maven-checkstyle-plugin/src/main/java/org/apache/maven/plugin/checkstyle/CheckstyleReport.java index 2bf74dbf00..6eb3bcf335 100644 --- a/maven-plugins/maven-checkstyle-plugin/src/main/java/org/apache/maven/plugin/checkstyle/CheckstyleReport.java +++ b/maven-plugins/maven-checkstyle-plugin/src/main/java/org/apache/maven/plugin/checkstyle/CheckstyleReport.java @@ -369,14 +369,15 @@ public class CheckstyleReport excludesStr.append( excludes ); } - for ( int i = 0; i < DEFAULT_EXCLUDES.length; i++ ) + String[] defaultExcludes = FileUtils.getDefaultExcludes(); + for ( int i = 0; i < defaultExcludes.length; i++ ) { if ( excludesStr.length() > 0 ) { excludesStr.append( "," ); } - excludesStr.append( DEFAULT_EXCLUDES[i] ); + excludesStr.append( defaultExcludes[i] ); } List files; diff --git a/maven-plugins/maven-pmd-plugin/pom.xml b/maven-plugins/maven-pmd-plugin/pom.xml index 9e149517b0..0d917b8c1b 100644 --- a/maven-plugins/maven-pmd-plugin/pom.xml +++ b/maven-plugins/maven-pmd-plugin/pom.xml @@ -2,7 +2,7 @@ maven-plugin-parent org.apache.maven.plugins - 2.0-beta-1 + 2.0-beta-4-SNAPSHOT 4.0.0 maven-pmd-plugin @@ -24,12 +24,16 @@ org.apache.maven.reporting maven-reporting-impl - 2.0-beta-1 + 2.0-beta-4-SNAPSHOT saxpath saxpath 1.0-FCS + + org.codehaus.plexus + plexus-utils + - \ No newline at end of file + diff --git a/maven-plugins/maven-pmd-plugin/src/main/java/org/apache/maven/plugin/pmd/PmdReport.java b/maven-plugins/maven-pmd-plugin/src/main/java/org/apache/maven/plugin/pmd/PmdReport.java index 917b837476..c0176a8a88 100644 --- a/maven-plugins/maven-pmd-plugin/src/main/java/org/apache/maven/plugin/pmd/PmdReport.java +++ b/maven-plugins/maven-pmd-plugin/src/main/java/org/apache/maven/plugin/pmd/PmdReport.java @@ -247,13 +247,14 @@ public class PmdReport { excludesStr.append( excludes ); } - for ( int i = 0; i < DEFAULT_EXCLUDES.length; i++ ) + String[] defaultExcludes = FileUtils.getDefaultExcludes(); + for ( int i = 0; i < defaultExcludes.length; i++ ) { if ( excludesStr.length() > 0 ) { excludesStr.append( "," ); } - excludesStr.append( DEFAULT_EXCLUDES[i] ); + excludesStr.append( defaultExcludes[i] ); } return FileUtils.getFiles( dir, includes, excludesStr.toString() ); 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 0a36d3617f..c9803a2bbe 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 @@ -68,32 +68,6 @@ public class SiteMojo private static final String DEFAULT_TEMPLATE = RESOURCE_DIR + "/maven-site.vm"; - /** - * Patterns which should be excluded by default. - */ - // TODO Push me into a shared area (plexus-utils?) - private static final String[] DEFAULT_EXCLUDES = new String[]{ - // Miscellaneous typical temporary files - "**/*~", "**/#*#", "**/.#*", "**/%*%", "**/._*", - - // CVS - "**/CVS", "**/CVS/**", "**/.cvsignore", - - // SCCS - "**/SCCS", "**/SCCS/**", - - // Visual SourceSafe - "**/vssver.scc", - - // Subversion - "**/.svn", "**/.svn/**", - - // Arch/Bazaar - "**/.arch-ids", "**/.arch-ids/**", - - // Mac - "**/.DS_Store"}; - /** * Directory containing source for apt, fml and xdoc docs. * @@ -294,7 +268,7 @@ public class SiteMojo // Try to find duplicate files Map duplicate = new LinkedHashMap(); - String defaultExcludes = StringUtils.join( DEFAULT_EXCLUDES, "," ); + String defaultExcludes = StringUtils.join( FileUtils.getDefaultExcludes(), "," ); if ( siteDirectoryFile.exists() ) { diff --git a/maven-reporting/maven-reporting-impl/src/main/java/org/apache/maven/reporting/AbstractMavenReport.java b/maven-reporting/maven-reporting-impl/src/main/java/org/apache/maven/reporting/AbstractMavenReport.java index 39f432bd7d..94f3ba9aaa 100644 --- a/maven-reporting/maven-reporting-impl/src/main/java/org/apache/maven/reporting/AbstractMavenReport.java +++ b/maven-reporting/maven-reporting-impl/src/main/java/org/apache/maven/reporting/AbstractMavenReport.java @@ -25,6 +25,7 @@ import org.codehaus.doxia.site.renderer.SiteRenderer; import org.codehaus.plexus.util.IOUtil; import org.codehaus.plexus.util.StringInputStream; import org.codehaus.plexus.util.StringUtils; +import org.codehaus.plexus.util.FileUtils; import java.io.File; import java.io.IOException; @@ -43,26 +44,6 @@ public abstract class AbstractMavenReport extends AbstractMojo implements MavenReport { - /** - * @todo share, use default excludes from plexus utils. - */ - protected static final String[] DEFAULT_EXCLUDES = {// Miscellaneous typical temporary files - "**/*~", "**/#*#", "**/.#*", "**/%*%", "**/._*", - - // CVS - "**/CVS", "**/CVS/**", "**/.cvsignore", - - // SCCS - "**/SCCS", "**/SCCS/**", - - // Visual SourceSafe - "**/vssver.scc", - - // Subversion - "**/.svn", "**/.svn/**", - - // Mac - "**/.DS_Store"}; private Sink sink;