Modified: maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/artifact/DefaultDependencyResolver.java URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/artifact/DefaultDependencyResolver.java?rev=1639422&r1=1639421&r2=1639422&view=diff ============================================================================== --- maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/artifact/DefaultDependencyResolver.java (original) +++ maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/artifact/DefaultDependencyResolver.java Thu Nov 13 18:08:07 2014 @@ -19,15 +19,6 @@ package org.apache.maven.plugin.assembly * under the License. */ -import java.util.ArrayList; -import java.util.Collections; -import java.util.HashSet; -import java.util.LinkedHashMap; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - import org.apache.maven.artifact.Artifact; import org.apache.maven.artifact.factory.ArtifactFactory; import org.apache.maven.artifact.metadata.ArtifactMetadataSource; @@ -56,6 +47,15 @@ import org.codehaus.plexus.logging.Abstr import org.codehaus.plexus.logging.Logger; import org.codehaus.plexus.util.StringUtils; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashSet; +import java.util.LinkedHashMap; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + /** * @author jdcasey * @version $Id$ @@ -153,7 +153,7 @@ public class DefaultDependencyResolver final ResolutionManagementInfo info = new ResolutionManagementInfo( currentProject ); updateRepositoryResolutionRequirements( assembly, info ); final AssemblyId assemblyId = AssemblyId.createAssemblyId( assembly ); - updateDependencySetResolutionRequirements( dependencySet , info, assemblyId, currentProject ); + updateDependencySetResolutionRequirements( dependencySet, info, assemblyId, currentProject ); Set<Artifact> artifacts; if ( info.isResolutionRequired() ) @@ -324,8 +324,7 @@ public class DefaultDependencyResolver if ( binaries.isIncludeDependencies() ) { - updateDependencySetResolutionRequirements( dependencySet, - requirements, assemblyId, + updateDependencySetResolutionRequirements( dependencySet, requirements, assemblyId, projects.toArray( new MavenProject[projects.size()] ) ); } }
Modified: maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/artifact/DependencyResolver.java URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/artifact/DependencyResolver.java?rev=1639422&r1=1639421&r2=1639422&view=diff ============================================================================== --- maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/artifact/DependencyResolver.java (original) +++ maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/artifact/DependencyResolver.java Thu Nov 13 18:08:07 2014 @@ -41,12 +41,11 @@ public interface DependencyResolver public Map<DependencySet, Set<Artifact>> resolveDependencySets( final Assembly assembly, ModuleSet moduleSet, final AssemblerConfigurationSource configSource, List<DependencySet> dependencySets ) - throws DependencyResolutionException - ; + throws DependencyResolutionException; + public Map<DependencySet, Set<Artifact>> resolveDependencySets( final Assembly assembly, final AssemblerConfigurationSource configSource, List<DependencySet> dependencySets ) - throws DependencyResolutionException - ; + throws DependencyResolutionException; } \ No newline at end of file Modified: maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/artifact/ResolutionManagementInfo.java URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/artifact/ResolutionManagementInfo.java?rev=1639422&r1=1639421&r2=1639422&view=diff ============================================================================== --- maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/artifact/ResolutionManagementInfo.java (original) +++ maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/artifact/ResolutionManagementInfo.java Thu Nov 13 18:08:07 2014 @@ -29,7 +29,7 @@ import java.util.Set; /** * Helper class used to accumulate scopes and modules (with binaries included) that are used in an assembly, for the * purposes of creating an aggregated managed-version map with dependency version conflicts resolved. - * + * * @author jdcasey */ class ResolutionManagementInfo @@ -137,22 +137,24 @@ class ResolutionManagementInfo { for ( Artifact existing : artifacts ) { - if (existing.equals( artifact )){ - if (isScopeUpgrade(artifact, existing)){ + if ( existing.equals( artifact ) ) + { + if ( isScopeUpgrade( artifact, existing ) ) + { artifacts.remove( existing ); - artifacts.add( artifact); + artifacts.add( artifact ); return; } } } } - private boolean isScopeUpgrade( Artifact a, Artifact existing ) + private boolean isScopeUpgrade( Artifact a, Artifact existing ) { return scopeValue( a.getScope() ) > scopeValue( existing.getScope() ); } - private int scopeValue( final String scope) + private int scopeValue( final String scope ) { if ( Artifact.SCOPE_COMPILE.equals( scope ) ) { Modified: maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/filter/AbstractLineAggregatingHandler.java URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/filter/AbstractLineAggregatingHandler.java?rev=1639422&r1=1639421&r2=1639422&view=diff ============================================================================== --- maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/filter/AbstractLineAggregatingHandler.java (original) +++ maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/filter/AbstractLineAggregatingHandler.java Thu Nov 13 18:08:07 2014 @@ -96,8 +96,9 @@ abstract class AbstractLineAggregatingHa } catch ( final IOException e ) { - throw new ArchiverException( "Error adding aggregated content for: " + fname - + " to finalize archive creation. Reason: " + e.getMessage(), e ); + throw new ArchiverException( + "Error adding aggregated content for: " + fname + " to finalize archive creation. Reason: " + + e.getMessage(), e ); } finally { @@ -128,7 +129,7 @@ abstract class AbstractLineAggregatingHa return true; } - String name = AssemblyFileUtils.normalizeFileInfo(fileInfo ); + String name = AssemblyFileUtils.normalizeFileInfo( fileInfo ); if ( fileInfo.isFile() && fileMatches( fileInfo ) ) { Modified: maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/filter/ComponentsXmlArchiverFileFilter.java URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/filter/ComponentsXmlArchiverFileFilter.java?rev=1639422&r1=1639421&r2=1639422&view=diff ============================================================================== --- maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/filter/ComponentsXmlArchiverFileFilter.java (original) +++ maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/filter/ComponentsXmlArchiverFileFilter.java Thu Nov 13 18:08:07 2014 @@ -19,20 +19,6 @@ package org.apache.maven.plugin.assembly * under the License. */ -import java.io.BufferedReader; -import java.io.File; -import java.io.FileOutputStream; -import java.io.IOException; -import java.io.InputStream; -import java.io.InputStreamReader; -import java.io.OutputStreamWriter; -import java.io.Reader; -import java.io.Writer; -import java.util.Collections; -import java.util.LinkedHashMap; -import java.util.List; -import java.util.Map; - import org.codehaus.plexus.archiver.Archiver; import org.codehaus.plexus.archiver.ArchiverException; import org.codehaus.plexus.archiver.ResourceIterator; @@ -46,10 +32,23 @@ import org.codehaus.plexus.util.xml.Xpp3 import org.codehaus.plexus.util.xml.pull.XmlPullParserException; import javax.annotation.Nonnull; +import java.io.BufferedReader; +import java.io.File; +import java.io.FileOutputStream; +import java.io.IOException; +import java.io.InputStream; +import java.io.InputStreamReader; +import java.io.OutputStreamWriter; +import java.io.Reader; +import java.io.Writer; +import java.util.Collections; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; /** * Components XML file filter. - * + * * @author <a href="mailto:[email protected]">Brett Porter</a> * @version $Id$ */ Modified: maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/filter/SimpleAggregatingDescriptorHandler.java URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/filter/SimpleAggregatingDescriptorHandler.java?rev=1639422&r1=1639421&r2=1639422&view=diff ============================================================================== --- maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/filter/SimpleAggregatingDescriptorHandler.java (original) +++ maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/filter/SimpleAggregatingDescriptorHandler.java Thu Nov 13 18:08:07 2014 @@ -81,8 +81,8 @@ public class SimpleAggregatingDescriptor if ( outputPath.endsWith( "/" ) ) { throw new ArchiverException( - "Cannot write aggregated properties to a directory. You must specify a file name in the outputPath configuration for this handler. (handler: " - + getClass().getName() ); + "Cannot write aggregated properties to a directory. You must specify a file name in the outputPath configuration for this handler. (handler: " + + getClass().getName() ); } if ( outputPath.startsWith( "/" ) ) @@ -110,11 +110,11 @@ public class SimpleAggregatingDescriptor f = File.createTempFile( "maven-assembly-plugin", "tmp" ); f.deleteOnExit(); - - boolean isProperty = AssemblyFileUtils.isPropertyFile(f); + boolean isProperty = AssemblyFileUtils.isPropertyFile( f ); FileOutputStream fos = new FileOutputStream( f ); - writer = isProperty ? new OutputStreamWriter( fos, "ISO-8859-1") - : new OutputStreamWriter( fos); // Still platform encoding + writer = isProperty + ? new OutputStreamWriter( fos, "ISO-8859-1" ) + : new OutputStreamWriter( fos ); // Still platform encoding writer.write( commentChars + " Aggregated on " + new Date() + " from: " ); @@ -129,8 +129,8 @@ public class SimpleAggregatingDescriptor } catch ( final IOException e ) { - throw new ArchiverException( "Error adding aggregated properties to finalize archive creation. Reason: " - + e.getMessage(), e ); + throw new ArchiverException( + "Error adding aggregated properties to finalize archive creation. Reason: " + e.getMessage(), e ); } finally { @@ -181,7 +181,7 @@ public class SimpleAggregatingDescriptor if ( filePattern == null || outputPath == null ) { throw new IllegalStateException( - "You must configure filePattern and outputPath in your containerDescriptorHandler declaration." ); + "You must configure filePattern and outputPath in your containerDescriptorHandler declaration." ); } } @@ -192,10 +192,11 @@ public class SimpleAggregatingDescriptor Reader reader = null; try { - boolean isProperty = AssemblyFileUtils.isPropertyFile(fileInfo.getName()); + boolean isProperty = AssemblyFileUtils.isPropertyFile( fileInfo.getName() ); - reader = isProperty ? new InputStreamReader( fileInfo.getContents(), "ISO-8859-1" ) : - new InputStreamReader( fileInfo.getContents() ); // platform encoding + reader = isProperty + ? new InputStreamReader( fileInfo.getContents(), "ISO-8859-1" ) + : new InputStreamReader( fileInfo.getContents() ); // platform encoding IOUtil.copy( reader, writer ); } Modified: maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/format/ReaderFormatter.java URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/format/ReaderFormatter.java?rev=1639422&r1=1639421&r2=1639422&view=diff ============================================================================== --- maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/format/ReaderFormatter.java (original) +++ maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/format/ReaderFormatter.java Thu Nov 13 18:08:07 2014 @@ -110,13 +110,15 @@ public class ReaderFormatter { final String encoding = configSource.getEncoding(); - Reader source = encoding != null ? new InputStreamReader( inputStream, encoding ) + Reader source = encoding != null + ? new InputStreamReader( inputStream, encoding ) : new InputStreamReader( inputStream ); // wtf platform encoding ? TODO: Fix this boolean isPropertyFile = AssemblyFileUtils.isPropertyFile( plexusIoResource.getName() ); Reader filtered = createReaderFilter( source, configSource.getEscapeString(), configSource.getDelimiters(), configSource, isPropertyFile ); - result = encoding != null ? new ReaderInputStream( filtered, encoding ) + result = encoding != null + ? new ReaderInputStream( filtered, encoding ) : new ReaderInputStream( filtered ); } if ( transformLineEndings ) Modified: maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/format/ReflectionProperties.java URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/format/ReflectionProperties.java?rev=1639422&r1=1639421&r2=1639422&view=diff ============================================================================== --- maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/format/ReflectionProperties.java (original) +++ maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/format/ReflectionProperties.java Thu Nov 13 18:08:07 2014 @@ -28,7 +28,6 @@ import java.util.Properties; /** * @author Andreas Hoheneder (ahoh_at_inode.at) * @version $Id$ - * * @deprecated */ @Deprecated @@ -59,8 +58,8 @@ public class ReflectionProperties { value = ReflectionValueExtractor.evaluate( "" + key, project ); - if ( escapedBackslashesInFilePath && value != null && "java.lang.String".equals( value.getClass() - .getName() ) ) + if ( escapedBackslashesInFilePath && value != null && "java.lang.String".equals( + value.getClass().getName() ) ) { final String val = (String) value; Modified: maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/functions/MavenProjectConsumer.java URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/functions/MavenProjectConsumer.java?rev=1639422&r1=1639421&r2=1639422&view=diff ============================================================================== --- maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/functions/MavenProjectConsumer.java (original) +++ maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/functions/MavenProjectConsumer.java Thu Nov 13 18:08:07 2014 @@ -17,9 +17,10 @@ package org.apache.maven.plugin.assembly * specific language governing permissions and limitations * under the License. */ + import org.apache.maven.project.MavenProject; public interface MavenProjectConsumer { - public void accept(MavenProject project); + public void accept( MavenProject project ); } Modified: maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/functions/MavenProjects.java URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/functions/MavenProjects.java?rev=1639422&r1=1639421&r2=1639422&view=diff ============================================================================== --- maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/functions/MavenProjects.java (original) +++ maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/functions/MavenProjects.java Thu Nov 13 18:08:07 2014 @@ -30,7 +30,8 @@ import java.util.Set; public class MavenProjects { - public static void without(Iterable<MavenProject> source, String packagingType, MavenProjectConsumer consumer){ + public static void without( Iterable<MavenProject> source, String packagingType, MavenProjectConsumer consumer ) + { for ( MavenProject project : source ) { if ( !packagingType.equals( project.getPackaging() ) ) @@ -40,7 +41,8 @@ public class MavenProjects } } - public static void select(Iterable<MavenProject> source, String packagingType, MavenProjectConsumer consumer){ + public static void select( Iterable<MavenProject> source, String packagingType, MavenProjectConsumer consumer ) + { for ( MavenProject project : source ) { if ( packagingType.equals( project.getPackaging() ) ) @@ -51,23 +53,26 @@ public class MavenProjects } public static void select( Iterable<MavenProject> source, String packagingType, MavenProjectConsumer include, - MavenProjectConsumer excluded ){ + MavenProjectConsumer excluded ) + { for ( MavenProject project : source ) { if ( packagingType.equals( project.getPackaging() ) ) { - include.accept( project); - } else { + include.accept( project ); + } + else + { excluded.accept( project ); } } } - public static @Nullable + public static + @Nullable Artifact findArtifactByClassifier( MavenProject mavenProject, String classifier ) { - @SuppressWarnings( "unchecked" ) - final List<Artifact> attachments = mavenProject.getAttachedArtifacts(); + @SuppressWarnings( "unchecked" ) final List<Artifact> attachments = mavenProject.getAttachedArtifacts(); if ( ( attachments != null ) && !attachments.isEmpty() ) { for ( final Artifact attachment : attachments ) @@ -95,12 +100,13 @@ public class MavenProjects }; } - public static MavenProjectConsumer addTo( final Set<MavenProject> set ){ + public static MavenProjectConsumer addTo( final Set<MavenProject> set ) + { return new MavenProjectConsumer() { public void accept( MavenProject project ) { - set.add( project); + set.add( project ); } }; } Modified: maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/interpolation/AssemblyExpressionEvaluator.java URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/interpolation/AssemblyExpressionEvaluator.java?rev=1639422&r1=1639421&r2=1639422&view=diff ============================================================================== --- maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/interpolation/AssemblyExpressionEvaluator.java (original) +++ maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/interpolation/AssemblyExpressionEvaluator.java Thu Nov 13 18:08:07 2014 @@ -34,9 +34,11 @@ import java.io.File; public class AssemblyExpressionEvaluator implements ExpressionEvaluator { - + private final AssemblerConfigurationSource configSource; + private final FixedStringSearchInterpolator interpolator; + private final PrefixAwareRecursionInterceptor interceptor; public AssemblyExpressionEvaluator( AssemblerConfigurationSource configSource ) @@ -46,7 +48,7 @@ public class AssemblyExpressionEvaluator final MavenProject project = configSource.getProject(); final FixedStringSearchInterpolator projectInterpolator = DefaultAssemblyReader.createProjectInterpolator( project ); - interpolator = AssemblyInterpolator.buildInterpolator( project, projectInterpolator, configSource ); + interpolator = AssemblyInterpolator.buildInterpolator( project, projectInterpolator, configSource ); interceptor = new PrefixAwareRecursionInterceptor( InterpolationConstants.PROJECT_PREFIXES, true ); } @@ -54,7 +56,7 @@ public class AssemblyExpressionEvaluator { String basePath = configSource.getBasedir().getAbsolutePath(); String path = f.getPath(); - + if ( !f.isAbsolute() && !path.startsWith( basePath ) ) { return new File( configSource.getBasedir(), path ); Modified: maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/interpolation/AssemblyInterpolator.java URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/interpolation/AssemblyInterpolator.java?rev=1639422&r1=1639421&r2=1639422&view=diff ============================================================================== --- maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/interpolation/AssemblyInterpolator.java (original) +++ maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/interpolation/AssemblyInterpolator.java Thu Nov 13 18:08:07 2014 @@ -83,21 +83,22 @@ public class AssemblyInterpolator } public Assembly interpolate( final Assembly assembly, final MavenProject project, - final AssemblerConfigurationSource configSource, FixedStringSearchInterpolator projectInterpolator ) + final AssemblerConfigurationSource configSource, + FixedStringSearchInterpolator projectInterpolator ) throws AssemblyInterpolationException { - @SuppressWarnings( "unchecked" ) - final Set<String> blacklistFields = + @SuppressWarnings( "unchecked" ) final Set<String> blacklistFields = new HashSet<String>( FieldBasedObjectInterpolator.DEFAULT_BLACKLISTED_FIELD_NAMES ); blacklistFields.addAll( INTERPOLATION_BLACKLIST ); - @SuppressWarnings( "unchecked" ) - final Set<String> blacklistPkgs = FieldBasedObjectInterpolator.DEFAULT_BLACKLISTED_PACKAGE_PREFIXES; + @SuppressWarnings( "unchecked" ) final Set<String> blacklistPkgs = + FieldBasedObjectInterpolator.DEFAULT_BLACKLISTED_PACKAGE_PREFIXES; final FieldBasedObjectInterpolator objectInterpolator = new FieldBasedObjectInterpolator( blacklistFields, blacklistPkgs ); - final FixedStringSearchInterpolator interpolator = buildInterpolator( project, projectInterpolator, configSource ); + final FixedStringSearchInterpolator interpolator = + buildInterpolator( project, projectInterpolator, configSource ); // TODO: Will this adequately detect cycles between prefixed property references and prefixed project // references?? @@ -110,18 +111,19 @@ public class AssemblyInterpolator } catch ( final InterpolationException e ) { - throw new AssemblyInterpolationException( "Failed to interpolate assembly with ID: " + assembly.getId() - + ". Reason: " + e.getMessage(), e ); + throw new AssemblyInterpolationException( + "Failed to interpolate assembly with ID: " + assembly.getId() + ". Reason: " + e.getMessage(), e ); } if ( objectInterpolator.hasWarnings() && getLogger().isDebugEnabled() ) { final StringBuilder sb = new StringBuilder(); - sb.append( "One or more minor errors occurred while interpolating the assembly with ID: " ).append( assembly.getId() ).append( ":\n" ); + sb.append( "One or more minor errors occurred while interpolating the assembly with ID: " ).append( + assembly.getId() ).append( ":\n" ); - @SuppressWarnings( "unchecked" ) - final List<ObjectInterpolationWarning> warnings = objectInterpolator.getWarnings(); + @SuppressWarnings( "unchecked" ) final List<ObjectInterpolationWarning> warnings = + objectInterpolator.getWarnings(); for ( final ObjectInterpolationWarning warning : warnings ) { sb.append( '\n' ).append( warning ); @@ -135,12 +137,14 @@ public class AssemblyInterpolator return assembly; } - public static FixedStringSearchInterpolator buildInterpolator( final MavenProject project, @Nonnull FixedStringSearchInterpolator projectIp, - final AssemblerConfigurationSource configSource ) + public static FixedStringSearchInterpolator buildInterpolator( final MavenProject project, + @Nonnull FixedStringSearchInterpolator projectIp, + final AssemblerConfigurationSource configSource ) { - return FixedStringSearchInterpolator - .create( configSource.getRepositoryInterpolator(), configSource.getCommandLinePropsInterpolator(), configSource.getEnvInterpolator(), projectIp ) - .withPostProcessor( new PathTranslatingPostProcessor( project.getBasedir() ) ); + return FixedStringSearchInterpolator.create( configSource.getRepositoryInterpolator(), + configSource.getCommandLinePropsInterpolator(), + configSource.getEnvInterpolator(), projectIp ).withPostProcessor( + new PathTranslatingPostProcessor( project.getBasedir() ) ); } @Override Modified: maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/io/DefaultAssemblyReader.java URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/io/DefaultAssemblyReader.java?rev=1639422&r1=1639421&r2=1639422&view=diff ============================================================================== --- maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/io/DefaultAssemblyReader.java (original) +++ maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/io/DefaultAssemblyReader.java Thu Nov 13 18:08:07 2014 @@ -464,7 +464,7 @@ public class DefaultAssemblyReader * Add the content of a single Component to main assembly * * @param component The component - * @param assembly The assembly + * @param assembly The assembly */ protected void mergeComponentWithAssembly( final Component component, final Assembly assembly ) { Modified: maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/mojos/AbstractAssemblyMojo.java URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/mojos/AbstractAssemblyMojo.java?rev=1639422&r1=1639421&r2=1639422&view=diff ============================================================================== --- maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/mojos/AbstractAssemblyMojo.java (original) +++ maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/mojos/AbstractAssemblyMojo.java Thu Nov 13 18:08:07 2014 @@ -19,11 +19,6 @@ package org.apache.maven.plugin.assembly * under the License. */ -import java.io.File; -import java.util.Collections; -import java.util.List; -import java.util.Properties; - import org.apache.maven.archiver.MavenArchiveConfiguration; import org.apache.maven.artifact.repository.ArtifactRepository; import org.apache.maven.execution.MavenSession; @@ -48,11 +43,15 @@ import org.apache.maven.project.MavenPro import org.apache.maven.shared.filtering.MavenReaderFilter; import org.apache.maven.shared.utils.cli.CommandLineUtils; import org.codehaus.plexus.configuration.PlexusConfiguration; +import org.codehaus.plexus.interpolation.fixed.FixedStringSearchInterpolator; import org.codehaus.plexus.interpolation.fixed.PrefixedPropertiesValueSource; import org.codehaus.plexus.interpolation.fixed.PropertiesBasedValueSource; -import org.codehaus.plexus.interpolation.fixed.FixedStringSearchInterpolator; import javax.annotation.Nonnull; +import java.io.File; +import java.util.Collections; +import java.util.List; +import java.util.Properties; /** * @author <a href="mailto:[email protected]">Brett Porter</a> Modified: maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/mojos/AbstractDirectoryMojo.java URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/mojos/AbstractDirectoryMojo.java?rev=1639422&r1=1639421&r2=1639422&view=diff ============================================================================== --- maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/mojos/AbstractDirectoryMojo.java (original) +++ maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/mojos/AbstractDirectoryMojo.java Thu Nov 13 18:08:07 2014 @@ -55,7 +55,8 @@ public abstract class AbstractDirectoryM } catch ( final InvalidAssemblerConfigurationException e ) { - throw new MojoFailureException( reader, e.getMessage(), "Mojo configuration is invalid: " + e.getMessage() ); + throw new MojoFailureException( reader, e.getMessage(), + "Mojo configuration is invalid: " + e.getMessage() ); } for ( Assembly assembly : assemblies ) @@ -96,7 +97,7 @@ public abstract class AbstractDirectoryM { throw new MojoFailureException( assembly, "Assembly is incorrectly configured: " + assembly.getId(), "Assembly: " + assembly.getId() + " is not configured correctly: " - + e.getMessage() ); + + e.getMessage() ); } } Modified: maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/mojos/AssemblyMojo.java URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/mojos/AssemblyMojo.java?rev=1639422&r1=1639421&r2=1639422&view=diff ============================================================================== --- maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/mojos/AssemblyMojo.java (original) +++ maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/mojos/AssemblyMojo.java Thu Nov 13 18:08:07 2014 @@ -28,15 +28,14 @@ import org.apache.maven.project.MavenPro /** * Assemble an application bundle or distribution using an assembly descriptor from the command line. This goal will * force Maven to build all included POMs up to the <code>package</code> phase BEFORE the assembly is processed. <br/> - * + * <p/> * <b>NOTE:</b> This goal should ONLY be run from the command line, and if building a multimodule project it should be * used from the root POM. Use the <code>assembly:single</code> goal for binding your assembly to the lifecycle. <br/> - * + * * @author <a href="mailto:[email protected]">John Casey</a> * @author <a href="mailto:[email protected]">Brett Porter</a> * @author <a href="mailto:[email protected]">Vincent Siveton</a> * @version $Id$ - * * @deprecated Use assembly:single instead! The assembly:assembly mojo leads to non-standard builds. */ @Deprecated Modified: maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/mojos/AttachedAssemblyMojo.java URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/mojos/AttachedAssemblyMojo.java?rev=1639422&r1=1639421&r2=1639422&view=diff ============================================================================== --- maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/mojos/AttachedAssemblyMojo.java (original) +++ maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/mojos/AttachedAssemblyMojo.java Thu Nov 13 18:08:07 2014 @@ -26,14 +26,13 @@ import org.apache.maven.project.MavenPro /** * Assemble an application bundle or distribution from an assembly descriptor, WITHOUT first forcing Maven to build all * POMs to the <code>package</code> phase (as is required by the <code>assembly:assembly</code> goal). <br/> - * + * <p/> * <b>NOTE:</b> This goal should ONLY be run from the command line, and if building a multimodule project it should be * used from the root POM. Use the <code>assembly:single</code> goal for binding your assembly to the lifecycle. - * + * * @author <a href="mailto:[email protected]">John Casey</a> * @author <a href="mailto:[email protected]">Jerome Lacoste</a> * @version $Id$ - * * @deprecated Use assembly:single instead! The assembly:attached mojo leads to non-standard builds. */ @Mojo( name = "attached", aggregator = true, inheritByDefault = false ) Modified: maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/mojos/DirectoryInlineMojo.java URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/mojos/DirectoryInlineMojo.java?rev=1639422&r1=1639421&r2=1639422&view=diff ============================================================================== --- maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/mojos/DirectoryInlineMojo.java (original) +++ maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/mojos/DirectoryInlineMojo.java Thu Nov 13 18:08:07 2014 @@ -29,20 +29,19 @@ import org.apache.maven.project.MavenPro * <code>assembly:assembly</code> goal). This goal differs from <code>assembly:attached</code> in that it ignores the * <formats/> section of the assembly descriptor, and forces the assembly to be created as a directory in the * project's build-output directory (usually <code>./target</code>). <br/> - * + * <p/> * This goal is also functionally equivalent to using the <code>assembly:attached</code> goal in conjunction with the * <code>dir</code> assembly format. <br/> - * + * <p/> * <b>NOTE:</b> This goal should ONLY be run from the command line, and if building a multimodule project it should be * used from the root POM. Use the <code>assembly:directory-single</code> goal for binding your assembly to the * lifecycle. - * + * * @author <a href="mailto:[email protected]">John Casey</a> * @author <a href="mailto:[email protected]">Gilles Scokart</a> * @version $Id$ - * * @deprecated Use assembly:single and an assembly with format == dir instead! This mojo is redundant, and leads to - * non-standard builds. + * non-standard builds. */ @Mojo( name = "directory-inline", aggregator = true, inheritByDefault = false ) @Deprecated Modified: maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/mojos/DirectorySingleMojo.java URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/mojos/DirectorySingleMojo.java?rev=1639422&r1=1639421&r2=1639422&view=diff ============================================================================== --- maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/mojos/DirectorySingleMojo.java (original) +++ maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/mojos/DirectorySingleMojo.java Thu Nov 13 18:08:07 2014 @@ -28,15 +28,14 @@ import org.apache.maven.project.MavenPro * descriptor. This goal is suitable either for binding to the lifecycle or calling directly from the command line * (provided all required files are available before the build starts, or are produced by another goal specified before * this one on the command line). <br/> - * + * <p/> * This goal differs from <code>assembly:single</code> in that it ignores the <formats/> section of the assembly * descriptor, and forces the assembly to be created as a directory in the project's build-output directory (usually * <code>./target</code>). - * + * * @author <a href="mailto:[email protected]">John Casey</a> * @author <a href="mailto:[email protected]">Gilles Scokart</a> * @version $Id$ - * * @deprecated Use assembly:single and an assembly with format == dir instead! This mojo is redundant. */ @Mojo( name = "directory-single", inheritByDefault = false ) Modified: maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/mojos/UnpackMojo.java URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/mojos/UnpackMojo.java?rev=1639422&r1=1639421&r2=1639422&view=diff ============================================================================== --- maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/mojos/UnpackMojo.java (original) +++ maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/mojos/UnpackMojo.java Thu Nov 13 18:08:07 2014 @@ -19,10 +19,6 @@ package org.apache.maven.plugin.assembly * under the License. */ -import java.io.File; -import java.util.LinkedHashSet; -import java.util.Set; - import org.apache.maven.artifact.Artifact; import org.apache.maven.plugin.AbstractMojo; import org.apache.maven.plugin.MojoExecutionException; @@ -37,6 +33,10 @@ import org.apache.maven.project.MavenPro import org.codehaus.plexus.archiver.manager.ArchiverManager; import org.codehaus.plexus.archiver.manager.NoSuchArchiverException; +import java.io.File; +import java.util.LinkedHashSet; +import java.util.Set; + /** * Unpack project dependencies. Currently supports dependencies of type jar and zip. * @@ -81,8 +81,7 @@ public class UnpackMojo dependencies.add( project.getArtifact() ); } - @SuppressWarnings( "unchecked" ) - final Set<Artifact> projectArtifacts = project.getArtifacts(); + @SuppressWarnings( "unchecked" ) final Set<Artifact> projectArtifacts = project.getArtifacts(); if ( projectArtifacts != null ) { dependencies.addAll( projectArtifacts ); Modified: maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/utils/AssemblyFileUtils.java URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/utils/AssemblyFileUtils.java?rev=1639422&r1=1639421&r2=1639422&view=diff ============================================================================== --- maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/utils/AssemblyFileUtils.java (original) +++ maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/utils/AssemblyFileUtils.java Thu Nov 13 18:08:07 2014 @@ -82,8 +82,7 @@ public final class AssemblyFileUtils } @SuppressWarnings( "ResultOfMethodCallIgnored" ) - public static void verifyTempDirectoryAvailability( @Nonnull - final File tempDir ) + public static void verifyTempDirectoryAvailability( @Nonnull final File tempDir ) { if ( !tempDir.exists() ) { @@ -94,7 +93,7 @@ public final class AssemblyFileUtils /** * Unpacks the archive file. * - * @param source File to be unpacked. + * @param source File to be unpacked. * @param destDir Location where to put the unpacked files. */ public static void unpack( File source, File destDir, ArchiverManager archiverManager ) @@ -137,6 +136,6 @@ public final class AssemblyFileUtils public static boolean isPropertyFile( File file ) { - return isPropertyFile( file.getName()); + return isPropertyFile( file.getName() ); } } Modified: maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/utils/AssemblyFormatUtils.java URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/utils/AssemblyFormatUtils.java?rev=1639422&r1=1639421&r2=1639422&view=diff ============================================================================== --- maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/utils/AssemblyFormatUtils.java (original) +++ maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/utils/AssemblyFormatUtils.java Thu Nov 13 18:08:07 2014 @@ -52,7 +52,7 @@ public final class AssemblyFormatUtils /** * Get the full name of the distribution artifact * - * @param assembly the assembly + * @param assembly the assembly * @return the distribution name */ public static String getDistributionName( final Assembly assembly, final AssemblerConfigurationSource configSource ) @@ -194,8 +194,6 @@ public final class AssemblyFormatUtils } - - /** * ORDER OF INTERPOLATION PRECEDENCE: * <ol> @@ -222,8 +220,8 @@ public final class AssemblyFormatUtils * <li>environment variables.</li> * </ol> */ - public static String getOutputDirectory( final String output, final MavenProject artifactProject, final String finalName, - final AssemblerConfigurationSource configSource ) + public static String getOutputDirectory( final String output, final MavenProject artifactProject, + final String finalName, final AssemblerConfigurationSource configSource ) throws AssemblyFormattingException { return getOutputDirectory( output, finalName, configSource, moduleProjectInterpolator( null ), @@ -231,7 +229,6 @@ public final class AssemblyFormatUtils } - private static FixedStringSearchInterpolator executionPropertiesInterpolator( AssemblerConfigurationSource configSource ) { @@ -261,9 +258,12 @@ public final class AssemblyFormatUtils // 5 return FixedStringSearchInterpolator.create( new org.codehaus.plexus.interpolation.fixed.PrefixedObjectValueSource( - InterpolationConstants.PROJECT_PREFIXES, mainProject, true ) - ); - } else return FixedStringSearchInterpolator.empty(); + InterpolationConstants.PROJECT_PREFIXES, mainProject, true ) ); + } + else + { + return FixedStringSearchInterpolator.empty(); + } } @@ -390,7 +390,8 @@ public final class AssemblyFormatUtils * </ol> */ public static String evaluateFileNameMapping( final String expression, @Nonnull final Artifact artifact, - @Nullable final MavenProject mainProject, @Nullable final Artifact moduleArtifact, + @Nullable final MavenProject mainProject, + @Nullable final Artifact moduleArtifact, @Nonnull final AssemblerConfigurationSource configSource, FixedStringSearchInterpolator moduleProjectInterpolator, FixedStringSearchInterpolator artifactProjectInterpolator ) @@ -398,15 +399,16 @@ public final class AssemblyFormatUtils { String value = expression; - final FixedStringSearchInterpolator interpolator = FixedStringSearchInterpolator.create( - moduleArtifactInterpolator( moduleArtifact ), moduleProjectInterpolator, - artifactInterpolator( artifact ), artifactProjectInterpolator, - mainProjectOnlyInterpolator( mainProject ), - classifierRules( artifact ), - executionPropertiesInterpolator( configSource ), - configSource.getMainProjectInterpolator(), - configSource.getCommandLinePropsInterpolator(), - configSource.getEnvInterpolator() ); + final FixedStringSearchInterpolator interpolator = + FixedStringSearchInterpolator.create( moduleArtifactInterpolator( moduleArtifact ), + moduleProjectInterpolator, artifactInterpolator( artifact ), + artifactProjectInterpolator, + mainProjectOnlyInterpolator( mainProject ), + classifierRules( artifact ), + executionPropertiesInterpolator( configSource ), + configSource.getMainProjectInterpolator(), + configSource.getCommandLinePropsInterpolator(), + configSource.getEnvInterpolator() ); value = interpolator.interpolate( value ); @@ -443,7 +445,8 @@ public final class AssemblyFormatUtils * <li>environment variables.</li> * </ol> */ - public static String getOutputDirectory( final String output, final String finalName, final AssemblerConfigurationSource configSource, + public static String getOutputDirectory( final String output, final String finalName, + final AssemblerConfigurationSource configSource, FixedStringSearchInterpolator moduleProjectIntrpolator, FixedStringSearchInterpolator artifactProjectInterpolator ) throws AssemblyFormattingException @@ -454,14 +457,13 @@ public final class AssemblyFormatUtils value = ""; } - final FixedStringSearchInterpolator interpolator = FixedStringSearchInterpolator.create( - finalNameInterpolator( finalName ), - moduleProjectIntrpolator, - artifactProjectInterpolator, - executionPropertiesInterpolator( configSource ), - configSource.getMainProjectInterpolator(), - configSource.getCommandLinePropsInterpolator(), - configSource.getEnvInterpolator() ); + final FixedStringSearchInterpolator interpolator = + FixedStringSearchInterpolator.create( finalNameInterpolator( finalName ), moduleProjectIntrpolator, + artifactProjectInterpolator, + executionPropertiesInterpolator( configSource ), + configSource.getMainProjectInterpolator(), + configSource.getCommandLinePropsInterpolator(), + configSource.getEnvInterpolator() ); value = interpolator.interpolate( value ); Modified: maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/utils/FilterUtils.java URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/utils/FilterUtils.java?rev=1639422&r1=1639421&r2=1639422&view=diff ============================================================================== --- maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/utils/FilterUtils.java (original) +++ maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/utils/FilterUtils.java Thu Nov 13 18:08:07 2014 @@ -46,8 +46,9 @@ public final class FilterUtils { } - public static Set<MavenProject> filterProjects( final Set<MavenProject> projects, final List<String> includes, - final List<String> excludes, final boolean actTransitively, final Logger logger ) + public static Set<MavenProject> filterProjects( final Set<MavenProject> projects, final List<String> includes, + final List<String> excludes, final boolean actTransitively, + final Logger logger ) { final List<PatternIncludesArtifactFilter> allFilters = new ArrayList<PatternIncludesArtifactFilter>(); @@ -70,14 +71,14 @@ public final class FilterUtils allFilters.add( excludeFilter ); } - Set<MavenProject> result = new LinkedHashSet<MavenProject>( projects.size()); + Set<MavenProject> result = new LinkedHashSet<MavenProject>( projects.size() ); for ( MavenProject project : projects ) { final Artifact artifact = project.getArtifact(); if ( filter.include( artifact ) ) { - result.add( project); + result.add( project ); } } @@ -162,7 +163,7 @@ public final class FilterUtils if ( strictFiltering && sFilter.hasMissedCriteria() ) { throw new InvalidAssemblerConfigurationException( - "One or more filters had unmatched criteria. Check debug log for more information." ); + "One or more filters had unmatched criteria. Check debug log for more information." ); } } } Modified: maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/utils/LineEndings.java URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/utils/LineEndings.java?rev=1639422&r1=1639421&r2=1639422&view=diff ============================================================================== --- maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/utils/LineEndings.java (original) +++ maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/utils/LineEndings.java Thu Nov 13 18:08:07 2014 @@ -21,12 +21,17 @@ package org.apache.maven.plugin.assembly /** * Enumeration to keep the different line ending types we support. - * + * * @author Karl-Heinz Marbaise <a href="mailto:[email protected]">[email protected]</a> */ public enum LineEndings { - keep( null ), dos( "\r\n" ), windows( "\r\n" ), unix( "\n" ), crlf( "\r\n" ), lf( "\n" ); + keep( null ), + dos( "\r\n" ), + windows( "\r\n" ), + unix( "\n" ), + crlf( "\r\n" ), + lf( "\n" ); private final String lineEndingCharacters; @@ -35,11 +40,14 @@ public enum LineEndings this.lineEndingCharacters = lineEndingCharacters; } - public boolean isNewLine(){ - return this== unix || this == lf; + public boolean isNewLine() + { + return this == unix || this == lf; } - public boolean isCrLF(){ - return this== windows || this == crlf || this == dos; + + public boolean isCrLF() + { + return this == windows || this == crlf || this == dos; } public String getLineEndingCharacters() Modified: maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/utils/LineEndingsUtils.java URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/utils/LineEndingsUtils.java?rev=1639422&r1=1639421&r2=1639422&view=diff ============================================================================== --- maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/utils/LineEndingsUtils.java (original) +++ maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/utils/LineEndingsUtils.java Thu Nov 13 18:08:07 2014 @@ -164,7 +164,9 @@ public final class LineEndingsUtils : lineEndings.isCrLF() ? new WindowsLineFeedInputStream( in, false ) : in; } - public static @Nonnull LineEndings getLineEnding( @Nullable String lineEnding ) + public static + @Nonnull + LineEndings getLineEnding( @Nullable String lineEnding ) throws AssemblyFormattingException { LineEndings result = LineEndings.keep; @@ -184,6 +186,7 @@ public final class LineEndingsUtils /** * Returns the appopriate line ending characters for the specified style + * * @param lineEnding The name of the line ending style, see org.apache.maven.plugin.assembly.utils.LineEndings#valueOf * @return The proper line ending characters * @throws AssemblyFormattingException Modified: maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/utils/LinuxLineFeedInputStream.java URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/utils/LinuxLineFeedInputStream.java?rev=1639422&r1=1639421&r2=1639422&view=diff ============================================================================== --- maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/utils/LinuxLineFeedInputStream.java (original) +++ maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/utils/LinuxLineFeedInputStream.java Thu Nov 13 18:08:07 2014 @@ -56,7 +56,8 @@ class LinuxLineFeedInputStream return target; } - @Override public int read() + @Override + public int read() throws IOException { if ( eofSeen ) @@ -95,14 +96,16 @@ class LinuxLineFeedInputStream } } - @Override public void close() + @Override + public void close() throws IOException { super.close(); target.close(); } - @Override public synchronized void mark( int readlimit ) + @Override + public synchronized void mark( int readlimit ) { throw new UnsupportedOperationException( "Mark not implemented yet" ); } Modified: maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/utils/ProjectUtils.java URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/utils/ProjectUtils.java?rev=1639422&r1=1639421&r2=1639422&view=diff ============================================================================== --- maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/utils/ProjectUtils.java (original) +++ maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/utils/ProjectUtils.java Thu Nov 13 18:08:07 2014 @@ -54,7 +54,8 @@ public final class ProjectUtils return classifier; } - @Nonnull public static Set<MavenProject> getProjectModules( @Nonnull final MavenProject project, + @Nonnull + public static Set<MavenProject> getProjectModules( @Nonnull final MavenProject project, @Nonnull final List<MavenProject> reactorProjects, final boolean includeSubModules, @Nonnull final Logger logger ) throws IOException @@ -79,15 +80,16 @@ public final class ProjectUtils { changed = 0; - for ( final Iterator<MavenProject> candidateIterator = moduleCandidates.iterator(); candidateIterator.hasNext(); ) + for ( final Iterator<MavenProject> candidateIterator = moduleCandidates.iterator(); + candidateIterator.hasNext(); ) { final MavenProject moduleCandidate = candidateIterator.next(); if ( moduleCandidate.getFile() == null ) { - logger.warn( "Cannot compute whether " + moduleCandidate.getId() + " is a module of: " - + project.getId() - + "; it does not have an associated POM file on the local filesystem." ); + logger.warn( + "Cannot compute whether " + moduleCandidate.getId() + " is a module of: " + project.getId() + + "; it does not have an associated POM file on the local filesystem." ); continue; } @@ -146,12 +148,10 @@ public final class ProjectUtils @Nonnull final MavenProject moduleProject ) throws IOException { - @SuppressWarnings( "unchecked" ) - final List<String> modules = mainProject.getModules(); + @SuppressWarnings( "unchecked" ) final List<String> modules = mainProject.getModules(); final File basedir = mainProject.getBasedir(); - final File moduleFile = moduleProject.getFile() - .getCanonicalFile(); + final File moduleFile = moduleProject.getFile().getCanonicalFile(); File moduleBasedir = moduleProject.getBasedir(); Modified: maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/utils/TypeConversionUtils.java URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/utils/TypeConversionUtils.java?rev=1639422&r1=1639421&r2=1639422&view=diff ============================================================================== --- maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/utils/TypeConversionUtils.java (original) +++ maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/utils/TypeConversionUtils.java Thu Nov 13 18:08:07 2014 @@ -93,7 +93,8 @@ public final class TypeConversionUtils { final StringBuilder messages = new StringBuilder(); - messages.append( "The mode: " ).append( Integer.toString( mode, 8 ) ).append( " contains nonsensical permissions:" ); + messages.append( "The mode: " ).append( Integer.toString( mode, 8 ) ).append( + " contains nonsensical permissions:" ); boolean warn = false; Modified: maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/utils/WindowsLineFeedInputStream.java URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/utils/WindowsLineFeedInputStream.java?rev=1639422&r1=1639421&r2=1639422&view=diff ============================================================================== --- maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/utils/WindowsLineFeedInputStream.java (original) +++ maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/utils/WindowsLineFeedInputStream.java Thu Nov 13 18:08:07 2014 @@ -61,7 +61,8 @@ class WindowsLineFeedInputStream return target; } - @Override public int read() + @Override + public int read() throws IOException { if ( eofSeen ) @@ -116,14 +117,16 @@ class WindowsLineFeedInputStream } } - @Override public void close() + @Override + public void close() throws IOException { super.close(); target.close(); } - @Override public synchronized void mark( int readlimit ) + @Override + public synchronized void mark( int readlimit ) { throw new UnsupportedOperationException( "Mark not implemented yet" ); }
