Author: khmarbaise Date: Thu May 5 22:16:12 2016 New Revision: 1742481 URL: http://svn.apache.org/viewvc?rev=1742481&view=rev Log: Fixed checkstyle reported errors/warnings.
Modified: maven/plugins/trunk/maven-resources-plugin/src/main/java/org/apache/maven/plugins/resources/CopyResourcesMojo.java maven/plugins/trunk/maven-resources-plugin/src/main/java/org/apache/maven/plugins/resources/MavenBuildTimestamp.java maven/plugins/trunk/maven-resources-plugin/src/main/java/org/apache/maven/plugins/resources/ResourcesMojo.java maven/plugins/trunk/maven-resources-plugin/src/main/java/org/apache/maven/plugins/resources/TestResourcesMojo.java Modified: maven/plugins/trunk/maven-resources-plugin/src/main/java/org/apache/maven/plugins/resources/CopyResourcesMojo.java URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-resources-plugin/src/main/java/org/apache/maven/plugins/resources/CopyResourcesMojo.java?rev=1742481&r1=1742480&r2=1742481&view=diff ============================================================================== --- maven/plugins/trunk/maven-resources-plugin/src/main/java/org/apache/maven/plugins/resources/CopyResourcesMojo.java (original) +++ maven/plugins/trunk/maven-resources-plugin/src/main/java/org/apache/maven/plugins/resources/CopyResourcesMojo.java Thu May 5 22:16:12 2016 @@ -51,31 +51,37 @@ public class CopyResourcesMojo private List<Resource> resources; + /** {@inheritDoc} */ public File getOutputDirectory() { return outputDirectory; } + /** {@inheritDoc} */ public void setOutputDirectory( File outputDirectory ) { this.outputDirectory = outputDirectory; } + /** {@inheritDoc} */ public List<Resource> getResources() { return resources; } + /** {@inheritDoc} */ public void setResources( List<Resource> resources ) { this.resources = resources; } + /** {@inheritDoc} */ public List<String> getFilters() { return filters; } + /** {@inheritDoc} */ public void setFilters( List<String> filters ) { this.filters = filters; Modified: maven/plugins/trunk/maven-resources-plugin/src/main/java/org/apache/maven/plugins/resources/MavenBuildTimestamp.java URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-resources-plugin/src/main/java/org/apache/maven/plugins/resources/MavenBuildTimestamp.java?rev=1742481&r1=1742480&r2=1742481&view=diff ============================================================================== --- maven/plugins/trunk/maven-resources-plugin/src/main/java/org/apache/maven/plugins/resources/MavenBuildTimestamp.java (original) +++ maven/plugins/trunk/maven-resources-plugin/src/main/java/org/apache/maven/plugins/resources/MavenBuildTimestamp.java Thu May 5 22:16:12 2016 @@ -26,36 +26,56 @@ import java.util.Properties; import java.util.TimeZone; /** - * This class is duplicated from maven-model-builder from - * maven core. (See MRESOURCES-99). - * + * This class is duplicated from maven-model-builder from maven core. (See MRESOURCES-99). */ public class MavenBuildTimestamp { - // ISO 8601-compliant timestamp for machine readability + /** + * ISO 8601-compliant timestamp for machine readability + */ public static final String DEFAULT_BUILD_TIMESTAMP_FORMAT = "yyyy-MM-dd'T'HH:mm:ss'Z'"; + /** + * The property name. + */ public static final String BUILD_TIMESTAMP_FORMAT_PROPERTY = "maven.build.timestamp.format"; + /** + * The default time zone {@code Etc/UTC}. + */ public static final TimeZone DEFAULT_BUILD_TIME_ZONE = TimeZone.getTimeZone( "Etc/UTC" ); private String formattedTimestamp; + /** + * Create an instance. + */ public MavenBuildTimestamp() { this( new Date() ); } + /** + * @param time The time to use. + */ public MavenBuildTimestamp( Date time ) { this( time, DEFAULT_BUILD_TIMESTAMP_FORMAT ); } + /** + * @param time The time to use. + * @param properties the properties which can be define. can be {@code null} + */ public MavenBuildTimestamp( Date time, Properties properties ) { this( time, properties != null ? properties.getProperty( BUILD_TIMESTAMP_FORMAT_PROPERTY ) : null ); } + /** + * @param time The time to use. + * @param timestampFormat The format for {@link SimpleDateFormat}. + */ public MavenBuildTimestamp( Date time, String timestampFormat ) { if ( timestampFormat == null ) @@ -72,6 +92,9 @@ public class MavenBuildTimestamp formattedTimestamp = dateFormat.format( time ); } + /** + * @return The formatted time stamp. + */ public String formattedTimestamp() { return formattedTimestamp; Modified: maven/plugins/trunk/maven-resources-plugin/src/main/java/org/apache/maven/plugins/resources/ResourcesMojo.java URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-resources-plugin/src/main/java/org/apache/maven/plugins/resources/ResourcesMojo.java?rev=1742481&r1=1742480&r2=1742481&view=diff ============================================================================== --- maven/plugins/trunk/maven-resources-plugin/src/main/java/org/apache/maven/plugins/resources/ResourcesMojo.java (original) +++ maven/plugins/trunk/maven-resources-plugin/src/main/java/org/apache/maven/plugins/resources/ResourcesMojo.java Thu May 5 22:16:12 2016 @@ -281,12 +281,14 @@ public class ResourcesMojo @Parameter( property = "maven.resources.skip", defaultValue = "false" ) private boolean skip; + /** {@inheritDoc} */ public void contextualize( Context context ) throws ContextException { plexusContainer = (PlexusContainer) context.get( PlexusConstants.PLEXUS_KEY ); } + /** {@inheritDoc} */ public void execute() throws MojoExecutionException { @@ -305,10 +307,10 @@ public class ResourcesMojo try { - List<String> filters = getCombinedFiltersList(); + List<String> combinedFilters = getCombinedFiltersList(); MavenResourcesExecution mavenResourcesExecution = - new MavenResourcesExecution( getResources(), getOutputDirectory(), project, encoding, filters, + new MavenResourcesExecution( getResources(), getOutputDirectory(), project, encoding, combinedFilters, Collections.<String>emptyList(), session ); mavenResourcesExecution.setEscapeWindowsPaths( escapeWindowsPaths ); @@ -373,6 +375,9 @@ public class ResourcesMojo } /** + * @param mavenResourcesExecution {@link MavenResourcesExecution} + * @throws MojoExecutionException in case of wrong lookup. + * @throws MavenFilteringException in case of failure. * @since 2.5 */ protected void executeUserFilterComponents( MavenResourcesExecution mavenResourcesExecution ) @@ -411,6 +416,9 @@ public class ResourcesMojo } } + /** + * @return The combined filters. + */ protected List<String> getCombinedFiltersList() { if ( filters == null || filters.isEmpty() ) @@ -435,14 +443,14 @@ public class ResourcesMojo /** * Determines whether filtering has been enabled for any resource. * - * @param resources The set of resources to check for filtering, may be <code>null</code>. + * @param theResources The set of resources to check for filtering, may be <code>null</code>. * @return <code>true</code> if at least one resource uses filtering, <code>false</code> otherwise. */ - private boolean isFilteringEnabled( Collection<Resource> resources ) + private boolean isFilteringEnabled( Collection<Resource> theResources ) { - if ( resources != null ) + if ( theResources != null ) { - for ( Resource resource : resources ) + for ( Resource resource : theResources ) { if ( resource.isFiltering() ) { @@ -453,76 +461,121 @@ public class ResourcesMojo return false; } + /** + * @return {@link #resources} + */ public List<Resource> getResources() { return resources; } + /** + * @param resources set {@link #resources} + */ public void setResources( List<Resource> resources ) { this.resources = resources; } + /** + * @return {@link #outputDirectory} + */ public File getOutputDirectory() { return outputDirectory; } + /** + * @param outputDirectory the output folder. + */ public void setOutputDirectory( File outputDirectory ) { this.outputDirectory = outputDirectory; } + /** + * @return {@link #overwrite} + */ public boolean isOverwrite() { return overwrite; } + /** + * @param overwrite true to overwrite false otherwise. + */ public void setOverwrite( boolean overwrite ) { this.overwrite = overwrite; } + /** + * @return {@link #includeEmptyDirs} + */ public boolean isIncludeEmptyDirs() { return includeEmptyDirs; } + /** + * @param includeEmptyDirs true/false. + */ public void setIncludeEmptyDirs( boolean includeEmptyDirs ) { this.includeEmptyDirs = includeEmptyDirs; } + /** + * @return {@link #filters} + */ public List<String> getFilters() { return filters; } + /** + * @param filters The filters to use. + */ public void setFilters( List<String> filters ) { this.filters = filters; } + /** + * @return {@link #delimiters} + */ public LinkedHashSet<String> getDelimiters() { return delimiters; } + /** + * @param delimiters The delimiters to use. + */ public void setDelimiters( LinkedHashSet<String> delimiters ) { this.delimiters = delimiters; } + /** + * @return {@link #useDefaultDelimiters} + */ public boolean isUseDefaultDelimiters() { return useDefaultDelimiters; } + /** + * @param useDefaultDelimiters true to use {@code ${*}} + */ public void setUseDefaultDelimiters( boolean useDefaultDelimiters ) { this.useDefaultDelimiters = useDefaultDelimiters; } + /** + * @return {@link #skip} + */ public boolean isSkip() { return skip; Modified: maven/plugins/trunk/maven-resources-plugin/src/main/java/org/apache/maven/plugins/resources/TestResourcesMojo.java URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-resources-plugin/src/main/java/org/apache/maven/plugins/resources/TestResourcesMojo.java?rev=1742481&r1=1742480&r2=1742481&view=diff ============================================================================== --- maven/plugins/trunk/maven-resources-plugin/src/main/java/org/apache/maven/plugins/resources/TestResourcesMojo.java (original) +++ maven/plugins/trunk/maven-resources-plugin/src/main/java/org/apache/maven/plugins/resources/TestResourcesMojo.java Thu May 5 22:16:12 2016 @@ -76,21 +76,25 @@ public class TestResourcesMojo } } + /** {@inheritDoc} */ public File getOutputDirectory() { return outputDirectory; } + /** {@inheritDoc} */ public void setOutputDirectory( File outputDirectory ) { this.outputDirectory = outputDirectory; } + /** {@inheritDoc} */ public List<Resource> getResources() { return resources; } + /** {@inheritDoc} */ public void setResources( List<Resource> resources ) { this.resources = resources;