maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hbout...@apache.org
Subject svn commit: r1162541 - in /maven/archetype/trunk/archetype-common/src/main/java/org/apache/maven/archetype: common/ creator/ downloader/ generator/ old/ source/
Date Sun, 28 Aug 2011 15:48:09 GMT
Author: hboutemy
Date: Sun Aug 28 15:48:08 2011
New Revision: 1162541

URL: http://svn.apache.org/viewvc?rev=1162541&view=rev
Log:
fixed errors reported by Checkstyle

Modified:
    maven/archetype/trunk/archetype-common/src/main/java/org/apache/maven/archetype/common/Constants.java
    maven/archetype/trunk/archetype-common/src/main/java/org/apache/maven/archetype/common/DefaultPomManager.java
    maven/archetype/trunk/archetype-common/src/main/java/org/apache/maven/archetype/creator/FilesetArchetypeCreator.java
    maven/archetype/trunk/archetype-common/src/main/java/org/apache/maven/archetype/downloader/DefaultDownloader.java
    maven/archetype/trunk/archetype-common/src/main/java/org/apache/maven/archetype/downloader/Downloader.java
    maven/archetype/trunk/archetype-common/src/main/java/org/apache/maven/archetype/generator/DefaultArchetypeGenerator.java
    maven/archetype/trunk/archetype-common/src/main/java/org/apache/maven/archetype/old/DefaultOldArchetype.java
    maven/archetype/trunk/archetype-common/src/main/java/org/apache/maven/archetype/old/OldArchetype.java
    maven/archetype/trunk/archetype-common/src/main/java/org/apache/maven/archetype/source/RemoteCatalogArchetypeDataSource.java

Modified: maven/archetype/trunk/archetype-common/src/main/java/org/apache/maven/archetype/common/Constants.java
URL: http://svn.apache.org/viewvc/maven/archetype/trunk/archetype-common/src/main/java/org/apache/maven/archetype/common/Constants.java?rev=1162541&r1=1162540&r2=1162541&view=diff
==============================================================================
--- maven/archetype/trunk/archetype-common/src/main/java/org/apache/maven/archetype/common/Constants.java
(original)
+++ maven/archetype/trunk/archetype-common/src/main/java/org/apache/maven/archetype/common/Constants.java
Sun Aug 28 15:48:08 2011
@@ -48,9 +48,9 @@ public interface Constants
 
     String ARCHETYPE_LANGUAGES = "archetype.languages";
 
-	String ARCHETYPE_URL = "archetype.url";
+    String ARCHETYPE_URL = "archetype.url";
 
-	String ARCHETYPE_DESCRIPTION = "archetype.description";
+    String ARCHETYPE_DESCRIPTION = "archetype.description";
 
     List<String> DEFAULT_FILTERED_EXTENSIONS =
         Arrays.asList(

Modified: maven/archetype/trunk/archetype-common/src/main/java/org/apache/maven/archetype/common/DefaultPomManager.java
URL: http://svn.apache.org/viewvc/maven/archetype/trunk/archetype-common/src/main/java/org/apache/maven/archetype/common/DefaultPomManager.java?rev=1162541&r1=1162540&r2=1162541&view=diff
==============================================================================
--- maven/archetype/trunk/archetype-common/src/main/java/org/apache/maven/archetype/common/DefaultPomManager.java
(original)
+++ maven/archetype/trunk/archetype-common/src/main/java/org/apache/maven/archetype/common/DefaultPomManager.java
Sun Aug 28 15:48:08 2011
@@ -384,7 +384,7 @@ public class DefaultPomManager
         {
             @SuppressWarnings( "unchecked" )
             List<Profile> modelProfiles = model.getProfiles();
-            Map<String,Profile> modelProfileIdMap = new HashMap<String,Profile>();
+            Map<String, Profile> modelProfileIdMap = new HashMap<String, Profile>();
             if ( modelProfiles == null )
             {
                 modelProfiles = new ArrayList<Profile>();

Modified: maven/archetype/trunk/archetype-common/src/main/java/org/apache/maven/archetype/creator/FilesetArchetypeCreator.java
URL: http://svn.apache.org/viewvc/maven/archetype/trunk/archetype-common/src/main/java/org/apache/maven/archetype/creator/FilesetArchetypeCreator.java?rev=1162541&r1=1162540&r2=1162541&view=diff
==============================================================================
--- maven/archetype/trunk/archetype-common/src/main/java/org/apache/maven/archetype/creator/FilesetArchetypeCreator.java
(original)
+++ maven/archetype/trunk/archetype-common/src/main/java/org/apache/maven/archetype/creator/FilesetArchetypeCreator.java
Sun Aug 28 15:48:08 2011
@@ -88,7 +88,7 @@ public class FilesetArchetypeCreator
     extends AbstractLogEnabled
     implements ArchetypeCreator
 {
-    private final static String DEFAULT_OUTPUT_DIRECTORY = "target" + File.separator + "generated-sources"
+    private static final String DEFAULT_OUTPUT_DIRECTORY = "target" + File.separator + "generated-sources"
         + File.separator + "archetype";
 
     /** @plexus.requirement */
@@ -181,7 +181,8 @@ public class FilesetArchetypeCreator
 
             archetypeDescriptor.setFileSets( filesets );
 
-            createArchetypeFiles( reverseProperties, filesets, packageName, basedir, archetypeFilesDirectory,
defaultEncoding );
+            createArchetypeFiles( reverseProperties, filesets, packageName, basedir, archetypeFilesDirectory,
+                                  defaultEncoding );
             getLogger().debug( "Created files for " + archetypeDescriptor.getName() );
 
             setParentArtifactId( reverseProperties, configurationProperties.getProperty(
Constants.ARTIFACT_ID ) );
@@ -339,7 +340,8 @@ public class FilesetArchetypeCreator
         model.setModelVersion( "4.0.0" );
         // these values should be retrieved from the request with sensible defaults
         model.setGroupId( configurationProperties.getProperty( Constants.ARCHETYPE_GROUP_ID,
project.getGroupId() ) );
-        model.setArtifactId( configurationProperties.getProperty( Constants.ARCHETYPE_ARTIFACT_ID,
project.getArtifactId() ) );
+        model.setArtifactId( configurationProperties.getProperty( Constants.ARCHETYPE_ARTIFACT_ID,
+                                                                  project.getArtifactId()
) );
         model.setVersion( configurationProperties.getProperty( Constants.ARCHETYPE_VERSION,
project.getVersion() ) );
         model.setPackaging( "maven-archetype" );
         model.setName( configurationProperties.getProperty( Constants.ARCHETYPE_ARTIFACT_ID,
project.getArtifactId() ) );
@@ -366,7 +368,8 @@ public class FilesetArchetypeCreator
 
             try
             {
-                MavenProject p = projectBuilder.buildFromRepository( pa, project.getRemoteArtifactRepositories(),
localRepository );
+                MavenProject p =
+                    projectBuilder.buildFromRepository( pa, project.getRemoteArtifactRepositories(),
localRepository );
 
                 if ( p.getDistributionManagement() != null )
                 {
@@ -685,8 +688,8 @@ public class FilesetArchetypeCreator
                     && profile.getDependencyManagement().getDependencies() != null
                     && !profile.getDependencyManagement().getDependencies().isEmpty()
)
                 {
-                    for ( Iterator<Dependency> dependencies = profile.getDependencyManagement().getDependencies().iterator();
-                        dependencies.hasNext(); )
+                    for ( Iterator<Dependency> dependencies =
+                        profile.getDependencyManagement().getDependencies().iterator(); dependencies.hasNext();
)
                     {
                         Dependency dependency = dependencies.next();
 
@@ -1439,7 +1442,8 @@ public class FilesetArchetypeCreator
         }
 
         /* resourcesMainFiles */
-        List<String> resourcesMainFiles = archetypeFilesResolver.findResourcesMainFiles(
files, languageIncludes.toString() );
+        List<String> resourcesMainFiles =
+            archetypeFilesResolver.findResourcesMainFiles( files, languageIncludes.toString()
);
         if ( !resourcesMainFiles.isEmpty() )
         {
             files.removeAll( resourcesMainFiles );
@@ -1479,7 +1483,8 @@ public class FilesetArchetypeCreator
         }
 
         /* ressourcesTestFiles */
-        List<String> resourcesTestFiles = archetypeFilesResolver.findResourcesTestFiles(
files, languageIncludes.toString() );
+        List<String> resourcesTestFiles =
+            archetypeFilesResolver.findResourcesTestFiles( files, languageIncludes.toString()
);
         if ( !resourcesTestFiles.isEmpty() )
         {
             files.removeAll( resourcesTestFiles );
@@ -1519,12 +1524,14 @@ public class FilesetArchetypeCreator
         }
 
         /* thirdLevelSourcesfiles */
-        List<String> thirdLevelSourcesfiles = archetypeFilesResolver.findOtherSources(
3, files, languageIncludes.toString() );
+        List<String> thirdLevelSourcesfiles =
+            archetypeFilesResolver.findOtherSources( 3, files, languageIncludes.toString()
);
         if ( !thirdLevelSourcesfiles.isEmpty() )
         {
             files.removeAll( thirdLevelSourcesfiles );
 
-            List<String> filteredFiles = archetypeFilesResolver.getFilteredFiles( thirdLevelSourcesfiles,
filteredIncludes );
+            List<String> filteredFiles =
+                archetypeFilesResolver.getFilteredFiles( thirdLevelSourcesfiles, filteredIncludes
);
             thirdLevelSourcesfiles.removeAll( filteredFiles );
 
             List<String> unfilteredFiles = thirdLevelSourcesfiles;
@@ -1560,12 +1567,14 @@ public class FilesetArchetypeCreator
         } // end if
 
         /* secondLevelSourcesfiles */
-        List<String> secondLevelSourcesfiles = archetypeFilesResolver.findOtherSources(
2, files, languageIncludes.toString() );
+        List<String> secondLevelSourcesfiles =
+            archetypeFilesResolver.findOtherSources( 2, files, languageIncludes.toString()
);
         if ( !secondLevelSourcesfiles.isEmpty() )
         {
             files.removeAll( secondLevelSourcesfiles );
 
-            List<String> filteredFiles = archetypeFilesResolver.getFilteredFiles( secondLevelSourcesfiles,
filteredIncludes );
+            List<String> filteredFiles =
+                archetypeFilesResolver.getFilteredFiles( secondLevelSourcesfiles, filteredIncludes
);
             secondLevelSourcesfiles.removeAll( filteredFiles );
 
             List<String> unfilteredFiles = secondLevelSourcesfiles;
@@ -1580,12 +1589,14 @@ public class FilesetArchetypeCreator
         }
 
         /* secondLevelResourcesfiles */
-        List<String> secondLevelResourcesfiles = archetypeFilesResolver.findOtherResources(
2, files, languageIncludes.toString() );
+        List<String> secondLevelResourcesfiles =
+            archetypeFilesResolver.findOtherResources( 2, files, languageIncludes.toString()
);
         if ( !secondLevelResourcesfiles.isEmpty() )
         {
             files.removeAll( secondLevelResourcesfiles );
 
-            List<String> filteredFiles = archetypeFilesResolver.getFilteredFiles( secondLevelResourcesfiles,
filteredIncludes );
+            List<String> filteredFiles =
+                archetypeFilesResolver.getFilteredFiles( secondLevelResourcesfiles, filteredIncludes
);
             secondLevelResourcesfiles.removeAll( filteredFiles );
 
             List<String> unfilteredFiles = secondLevelResourcesfiles;
@@ -1600,7 +1611,8 @@ public class FilesetArchetypeCreator
         }
 
         /* rootResourcesfiles */
-        List<String> rootResourcesfiles = archetypeFilesResolver.findOtherResources(
0, files, languageIncludes.toString() );
+        List<String> rootResourcesfiles =
+            archetypeFilesResolver.findOtherResources( 0, files, languageIncludes.toString()
);
         if ( !rootResourcesfiles.isEmpty() )
         {
             files.removeAll( rootResourcesfiles );
@@ -1711,14 +1723,15 @@ public class FilesetArchetypeCreator
         return createFileSet( excludes, false, filtered, group, includes, defaultEncoding
);
     }
 
-    private static final String MAVEN_PROPERTIES = "META-INF/maven/org.apache.maven.archetype/archetype-common/pom.properties";
+    private static final String MAVEN_PROPERTIES =
+        "META-INF/maven/org.apache.maven.archetype/archetype-common/pom.properties";
 
     public String getArchetypeVersion()
     {
         InputStream is = null;
 
-        // This should actually come from the pom.properties at testing but it's not generated
and put into the JAR, it happens
-        // as part of the JAR plugin which is crap as it makes testing inconsistent.
+        // This should actually come from the pom.properties at testing but it's not generated
and put into the JAR, it
+        // happens as part of the JAR plugin which is crap as it makes testing inconsistent.
         String version = "version";
 
         try

Modified: maven/archetype/trunk/archetype-common/src/main/java/org/apache/maven/archetype/downloader/DefaultDownloader.java
URL: http://svn.apache.org/viewvc/maven/archetype/trunk/archetype-common/src/main/java/org/apache/maven/archetype/downloader/DefaultDownloader.java?rev=1162541&r1=1162540&r2=1162541&view=diff
==============================================================================
--- maven/archetype/trunk/archetype-common/src/main/java/org/apache/maven/archetype/downloader/DefaultDownloader.java
(original)
+++ maven/archetype/trunk/archetype-common/src/main/java/org/apache/maven/archetype/downloader/DefaultDownloader.java
Sun Aug 28 15:48:08 2011
@@ -51,8 +51,10 @@ public class DefaultDownloader
                           ArtifactRepository localRepository, List<ArtifactRepository>
remoteRepositories )
         throws DownloadException, DownloadNotFoundException
    {
-        Artifact artifact = artifactFactory.createArtifact( groupId, artifactId, version,
Artifact.SCOPE_RUNTIME, "jar" );
-        Artifact artifactPom = artifactFactory.createArtifact( groupId, artifactId, version,
Artifact.SCOPE_RUNTIME, "pom" );
+        Artifact artifact =
+            artifactFactory.createArtifact( groupId, artifactId, version, Artifact.SCOPE_RUNTIME,
"jar" );
+        Artifact artifactPom =
+            artifactFactory.createArtifact( groupId, artifactId, version, Artifact.SCOPE_RUNTIME,
"pom" );
 
         List<ArtifactRepository> repositories = new ArrayList<ArtifactRepository>(
remoteRepositories );
         if ( repositories.isEmpty() && archetypeRepository != null )
@@ -96,8 +98,9 @@ public class DefaultDownloader
     public File downloadOld( String groupId, String artifactId, String version, ArtifactRepository
archetypeRepository,
                              ArtifactRepository localRepository, List<ArtifactRepository>
remoteRepositories )
         throws DownloadException, DownloadNotFoundException
-   {
-        Artifact artifact = artifactFactory.createArtifact( groupId, artifactId, version,
Artifact.SCOPE_RUNTIME, "jar" );
+    {
+        Artifact artifact =
+            artifactFactory.createArtifact( groupId, artifactId, version, Artifact.SCOPE_RUNTIME,
"jar" );
         try
         {
             artifactResolver.resolve( artifact, remoteRepositories, localRepository );

Modified: maven/archetype/trunk/archetype-common/src/main/java/org/apache/maven/archetype/downloader/Downloader.java
URL: http://svn.apache.org/viewvc/maven/archetype/trunk/archetype-common/src/main/java/org/apache/maven/archetype/downloader/Downloader.java?rev=1162541&r1=1162540&r2=1162541&view=diff
==============================================================================
--- maven/archetype/trunk/archetype-common/src/main/java/org/apache/maven/archetype/downloader/Downloader.java
(original)
+++ maven/archetype/trunk/archetype-common/src/main/java/org/apache/maven/archetype/downloader/Downloader.java
Sun Aug 28 15:48:08 2011
@@ -31,11 +31,11 @@ public interface Downloader
 {
     String ROLE = Downloader.class.getName();
 
-    public File download( String groupId, String artifactId, String version, ArtifactRepository
archetypeRepository,
-                          ArtifactRepository localRepository, List<ArtifactRepository>
remoteRepositories )
+    File download( String groupId, String artifactId, String version, ArtifactRepository
archetypeRepository,
+                   ArtifactRepository localRepository, List<ArtifactRepository> remoteRepositories
)
         throws DownloadException, DownloadNotFoundException;
 
-    public File downloadOld( String groupId, String artifactId, String version, ArtifactRepository
archetypeRepository,
-                             ArtifactRepository localRepository, List<ArtifactRepository>
remoteRepositories )
+    File downloadOld( String groupId, String artifactId, String version, ArtifactRepository
archetypeRepository,
+                      ArtifactRepository localRepository, List<ArtifactRepository>
remoteRepositories )
         throws DownloadException, DownloadNotFoundException;
 }

Modified: maven/archetype/trunk/archetype-common/src/main/java/org/apache/maven/archetype/generator/DefaultArchetypeGenerator.java
URL: http://svn.apache.org/viewvc/maven/archetype/trunk/archetype-common/src/main/java/org/apache/maven/archetype/generator/DefaultArchetypeGenerator.java?rev=1162541&r1=1162540&r2=1162541&view=diff
==============================================================================
--- maven/archetype/trunk/archetype-common/src/main/java/org/apache/maven/archetype/generator/DefaultArchetypeGenerator.java
(original)
+++ maven/archetype/trunk/archetype-common/src/main/java/org/apache/maven/archetype/generator/DefaultArchetypeGenerator.java
Sun Aug 28 15:48:08 2011
@@ -133,7 +133,8 @@ public class DefaultArchetypeGenerator
         oldArchetype.createArchetype( request, archetypeFile );
     }
 
-    public void generateArchetype( ArchetypeGenerationRequest request, File archetypeFile,
ArchetypeGenerationResult result )
+    public void generateArchetype( ArchetypeGenerationRequest request, File archetypeFile,
+                                   ArchetypeGenerationResult result )
     {
         try
         {

Modified: maven/archetype/trunk/archetype-common/src/main/java/org/apache/maven/archetype/old/DefaultOldArchetype.java
URL: http://svn.apache.org/viewvc/maven/archetype/trunk/archetype-common/src/main/java/org/apache/maven/archetype/old/DefaultOldArchetype.java?rev=1162541&r1=1162540&r2=1162541&view=diff
==============================================================================
--- maven/archetype/trunk/archetype-common/src/main/java/org/apache/maven/archetype/old/DefaultOldArchetype.java
(original)
+++ maven/archetype/trunk/archetype-common/src/main/java/org/apache/maven/archetype/old/DefaultOldArchetype.java
Sun Aug 28 15:48:08 2011
@@ -104,7 +104,8 @@ public class DefaultOldArchetype
     // version = latest
 
     public void createArchetype( ArchetypeGenerationRequest request, ArtifactRepository archetypeRepository
)
-        throws UnknownArchetype, ArchetypeNotFoundException, ArchetypeDescriptorException,
ArchetypeTemplateProcessingException
+        throws UnknownArchetype, ArchetypeNotFoundException, ArchetypeDescriptorException,
+        ArchetypeTemplateProcessingException
     {
         // ----------------------------------------------------------------------
         // Download the archetype

Modified: maven/archetype/trunk/archetype-common/src/main/java/org/apache/maven/archetype/old/OldArchetype.java
URL: http://svn.apache.org/viewvc/maven/archetype/trunk/archetype-common/src/main/java/org/apache/maven/archetype/old/OldArchetype.java?rev=1162541&r1=1162540&r2=1162541&view=diff
==============================================================================
--- maven/archetype/trunk/archetype-common/src/main/java/org/apache/maven/archetype/old/OldArchetype.java
(original)
+++ maven/archetype/trunk/archetype-common/src/main/java/org/apache/maven/archetype/old/OldArchetype.java
Sun Aug 28 15:48:08 2011
@@ -49,7 +49,8 @@ public interface OldArchetype
      * Download an archetype then create a project from it.
      */
     void createArchetype( ArchetypeGenerationRequest request, ArtifactRepository archetypeRepository
)
-        throws UnknownArchetype, ArchetypeNotFoundException, ArchetypeDescriptorException,
ArchetypeTemplateProcessingException;
+        throws UnknownArchetype, ArchetypeNotFoundException, ArchetypeDescriptorException,
+        ArchetypeTemplateProcessingException;
 
     /**
      * Create a project from an archetype file.

Modified: maven/archetype/trunk/archetype-common/src/main/java/org/apache/maven/archetype/source/RemoteCatalogArchetypeDataSource.java
URL: http://svn.apache.org/viewvc/maven/archetype/trunk/archetype-common/src/main/java/org/apache/maven/archetype/source/RemoteCatalogArchetypeDataSource.java?rev=1162541&r1=1162540&r2=1162541&view=diff
==============================================================================
--- maven/archetype/trunk/archetype-common/src/main/java/org/apache/maven/archetype/source/RemoteCatalogArchetypeDataSource.java
(original)
+++ maven/archetype/trunk/archetype-common/src/main/java/org/apache/maven/archetype/source/RemoteCatalogArchetypeDataSource.java
Sun Aug 28 15:48:08 2011
@@ -58,7 +58,8 @@ public class RemoteCatalogArchetypeDataS
 
         if ( repository == null )
         {
-            throw new ArchetypeDataSourceException( "To use the remote catalog you must specify
the 'repository' property with an URL." );
+            throw new ArchetypeDataSourceException( "To use the remote catalog you must specify
the 'repository'"
+                + " property with an URL." );
         }
 
         if ( repository.endsWith( "/" ) )



Mime
View raw message