continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From c...@apache.org
Subject svn commit: r712588 - in /continuum/trunk: continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java continuum-core/src/main/java/org/apache/maven/continuum/core/action/CreateProjectsFromMetadataAction.java continuum-webapp/pom.xml
Date Mon, 10 Nov 2008 00:42:01 GMT
Author: ctan
Date: Sun Nov  9 16:42:01 2008
New Revision: 712588

URL: http://svn.apache.org/viewvc?rev=712588&view=rev
Log:
merge -r 712586:712587 from continuum-1.2.x branch
[CONTINUUM-1968] add resource filtering for german localization

Modified:
    continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java
    continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/CreateProjectsFromMetadataAction.java
    continuum/trunk/continuum-webapp/pom.xml

Modified: continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java?rev=712588&r1=712587&r2=712588&view=diff
==============================================================================
--- continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java
(original)
+++ continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java
Sun Nov  9 16:42:01 2008
@@ -3394,18 +3394,16 @@
             throw new ContinuumException( "Error while retrieving projects", e );
         }
 
-        int counter = 0;
         String url = "";
 
         for ( Project project : projectsList )
         {
-            if ( counter == 0 || !project.getScmUrl().startsWith( url ) )
+            if ( !project.getScmUrl().startsWith( url ) )
             {
                 // this is a root
                 url = project.getScmUrl();
                 createProjectScmRoot( projectGroup, url );
             }
-            counter++;
         }
     }
     

Modified: continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/CreateProjectsFromMetadataAction.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/CreateProjectsFromMetadataAction.java?rev=712588&r1=712587&r2=712588&view=diff
==============================================================================
--- continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/CreateProjectsFromMetadataAction.java
(original)
+++ continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/CreateProjectsFromMetadataAction.java
Sun Nov  9 16:42:01 2008
@@ -160,7 +160,21 @@
      
             if ( result.getProjects() != null )
             {
-                context.put( KEY_URL, getScmRootUrl( result.getProjects() ) );
+                String scmRootUrl = getScmRootUrl( result.getProjects() );
+         
+                if ( scmRootUrl == null || scmRootUrl.equals( "" ) )
+                {
+                    if ( curl.indexOf( "pom.xml" ) > 0 )
+                    {
+                        scmRootUrl = curl.substring( 0, curl.indexOf( "pom.xml" ) - 1 );
+                    }
+                    else
+                    {
+                        scmRootUrl = curl;
+                    }
+                }
+
+                context.put( KEY_URL, scmRootUrl );
             }
         }
         catch ( MalformedURLException e )
@@ -229,7 +243,7 @@
 
     private String getCommonPath( String path1, String path2 )
     {
-        if ( path2.equals( "" ) )
+        if ( path2 == null || path2.equals( "" ) )
         {
             return path1;
         }

Modified: continuum/trunk/continuum-webapp/pom.xml
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp/pom.xml?rev=712588&r1=712587&r2=712588&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp/pom.xml (original)
+++ continuum/trunk/continuum-webapp/pom.xml Sun Nov  9 16:42:01 2008
@@ -36,6 +36,7 @@
           <include>localization/Continuum.properties</include>
           <include>localization/Continuum_fr.properties</include>
           <include>localization/Continuum_pt_BR.properties</include>
+          <include>localization/Continuum_de.properties</include>
         </includes>
       </resource>
       <resource>
@@ -44,6 +45,7 @@
           <exclude>localization/Continuum.properties</exclude>
           <exclude>localization/Continuum_fr.properties</exclude>
           <exclude>localization/Continuum_pt_BR.properties</exclude>
+          <exclude>localization/Continuum_de.properties</exclude>
         </excludes>
       </resource>
     </resources>



Mime
View raw message