continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r696497 - in /continuum/trunk: continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m1/ continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ continuum-webapp/src/main/resources/localization/
Date Wed, 17 Sep 2008 22:30:17 GMT
Author: olamy
Date: Wed Sep 17 15:30:16 2008
New Revision: 696497

URL: http://svn.apache.org/viewvc?rev=696497&view=rev
Log:
[CONTINUUM-1675] Improve error message when scm element is missing from a child pom

sometimes webwork is strange with getText !


Modified:
    continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m1/DefaultMavenOneMetadataHelper.java
    continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/AddMavenProjectAction.java
    continuum/trunk/continuum-webapp/src/main/resources/localization/Continuum.properties
    continuum/trunk/continuum-webapp/src/main/resources/localization/Continuum_fr.properties
    continuum/trunk/continuum-webapp/src/main/resources/localization/Continuum_pt_BR.properties

Modified: continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m1/DefaultMavenOneMetadataHelper.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m1/DefaultMavenOneMetadataHelper.java?rev=696497&r1=696496&r2=696497&view=diff
==============================================================================
--- continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m1/DefaultMavenOneMetadataHelper.java
(original)
+++ continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m1/DefaultMavenOneMetadataHelper.java
Wed Sep 17 15:30:16 2008
@@ -217,7 +217,7 @@
 
             if ( StringUtils.isEmpty( scmConnection ) )
             {
-                result.addError( ContinuumProjectBuildingResult.ERROR_MISSING_SCM );
+                result.addError( ContinuumProjectBuildingResult.ERROR_MISSING_SCM, name );
 
                 // Do not throw an exception or return here, gather up as many results as
possible first.
             }

Modified: continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/AddMavenProjectAction.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/AddMavenProjectAction.java?rev=696497&r1=696496&r2=696497&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/AddMavenProjectAction.java
(original)
+++ continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/AddMavenProjectAction.java
Wed Sep 17 15:30:16 2008
@@ -27,6 +27,8 @@
 import org.apache.maven.continuum.web.exception.AuthorizationRequiredException;
 import org.codehaus.plexus.util.StringUtils;
 
+import com.opensymphony.xwork.TextProviderSupport;
+
 import java.io.File;
 import java.net.MalformedURLException;
 import java.net.URL;
@@ -161,6 +163,12 @@
             {
                 String cause = result.getErrorsWithCause().get( key );
                 String msg = getText( key, new String[] { cause } );
+
+                // olamy : weird getText(key, String[]) must do that something like bla bla
{0}
+                if ( key.equals( ContinuumProjectBuildingResult.ERROR_MISSING_SCM ) )
+                {
+                    msg = getResourceBundle().getString( key ) + " " + cause;
+                }
                 if ( !StringUtils.equals( msg, key ) )
                 {
                     errorMessages.add( msg );
@@ -169,7 +177,7 @@
                 {
                     addActionError( msg );
                 }
-                
+
             }
 
             return doDefault();

Modified: continuum/trunk/continuum-webapp/src/main/resources/localization/Continuum.properties
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp/src/main/resources/localization/Continuum.properties?rev=696497&r1=696496&r2=696497&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp/src/main/resources/localization/Continuum.properties
(original)
+++ continuum/trunk/continuum-webapp/src/main/resources/localization/Continuum.properties
Wed Sep 17 15:30:16 2008
@@ -253,7 +253,7 @@
 add.project.missing.version.error = Missing ''version'' element in the POM.
 add.project.missing.name.error = Missing ''name'' element in the POM.
 add.project.missing.repository.error = Missing ''repository'' element in the POM.
-add.project.missing.scm.error = Missing ''scm'' element in the POM, project {0}
+add.project.missing.scm.error = Missing ''scm'' element in the POM, project 
 add.project.missing.scm.connection.error = Missing ''connection'' sub-element in the ''scm''
element in the POM.
 add.project.missing.notifier.type.error = Missing ''type'' sub-element in the ''notifier''
element in the POM.
 add.project.missing.notifier.configuration.error = Missing ''configuration'' sub-element
in the ''notifier'' element in the POM.

Modified: continuum/trunk/continuum-webapp/src/main/resources/localization/Continuum_fr.properties
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp/src/main/resources/localization/Continuum_fr.properties?rev=696497&r1=696496&r2=696497&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp/src/main/resources/localization/Continuum_fr.properties
(original)
+++ continuum/trunk/continuum-webapp/src/main/resources/localization/Continuum_fr.properties
Wed Sep 17 15:30:16 2008
@@ -245,7 +245,7 @@
 add.project.missing.version.error = L''\u00e9l\u00e9ment "version" est manquant dans le fichier
POM.
 add.project.missing.name.error = L''\u00e9l\u00e9ment "name" est manquant dans le fichier
POM.
 add.project.missing.repository.error = L''\u00e9l\u00e9ment "repository" est manquant dans
le fichier POM.
-add.project.missing.scm.error = L''\u00e9l\u00e9ment "scm" est manquant dans le fichier POM,
projet {0}
+add.project.missing.scm.error = L''\u00e9l\u00e9ment "scm" est manquant dans le fichier POM,
projet 
 add.project.missing.scm.connection.error = Le sous-\u00e9l\u00e9ment "connection est manquant
dans le fichier POM.
 add.project.missing.notifier.type.error = Le sous-\u00e9l\u00e9ment "type" dans l''\u00e9l\u00e9ment
"notifier" est manquant dans le fichier POM.
 add.project.missing.notifier.configuration.error = Le sous-\u00e9l\u00e9ment "configuration"
dans l'\u00e9l\u00e9ment "notifier" est manquant dans le fichier POM.

Modified: continuum/trunk/continuum-webapp/src/main/resources/localization/Continuum_pt_BR.properties
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp/src/main/resources/localization/Continuum_pt_BR.properties?rev=696497&r1=696496&r2=696497&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp/src/main/resources/localization/Continuum_pt_BR.properties
(original)
+++ continuum/trunk/continuum-webapp/src/main/resources/localization/Continuum_pt_BR.properties
Wed Sep 17 15:30:16 2008
@@ -77,7 +77,7 @@
 add.project.missing.pom.error                    = Arquivo POM n\u00E3o existe. Talvez o
POM que voc\u00EA especificou ou um de seus m\u00F3dulos n\u00E3o existam.
 add.project.missing.repository.error             = Falta elemento ''repository'' no POM.
 add.project.missing.scm.connection.error         = Falta sub-elemento ''connection'' no elemento
''scm'' no POM.
-add.project.missing.scm.error                    = Falta o elemento ''scm'' no POM, projet
{0}
+add.project.missing.scm.error                    = Falta o elemento ''scm'' no POM, projet
 add.project.missing.version.error                = Falta o elemento ''version'' no POM.
 add.project.nogroup.error                        = Nenhum grupo de projeto foi fornecido.
 add.project.project.building.error               = Erro desconhecido ao realizar build do
POM.



Mime
View raw message