Author: fgiust
Date: Thu Jan 12 14:33:29 2006
New Revision: 368499

URL: http://svn.apache.org/viewcvs?rev=368499&view=rev
Log:
cleanup messages

Modified:
    
maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/EclipseCleanMojo.java
    
maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/EclipsePlugin.java
    
maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/EclipseUtils.java
    
maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/AbstractWtpResourceWriter.java
    
maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/EclipseWtpComponentWriter.java
    
maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/EclipseWtpFacetsWriter.java
    
maven/plugins/trunk/maven-eclipse-plugin/src/main/resources/org/apache/maven/plugin/eclipse/messages.properties

Modified: 
maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/EclipseCleanMojo.java
URL: 
http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/EclipseCleanMojo.java?rev=368499&r1=368498&r2=368499&view=diff
==============================================================================
--- 
maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/EclipseCleanMojo.java
 (original)
+++ 
maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/EclipseCleanMojo.java
 Thu Jan 12 14:33:29 2006
@@ -18,7 +18,6 @@
 
 import java.io.File;
 import java.io.IOException;
-import java.text.MessageFormat;
 
 import org.apache.maven.plugin.AbstractMojo;
 import org.apache.maven.plugin.MojoExecutionException;
@@ -50,8 +49,7 @@
     private static final String FILE_DOT_PROJECT = ".project"; //$NON-NLS-1$
 
     /**
-     * Web Project definition file for Eclipse Web Tools Project (Release 
1.0RC5
-     * compatible).
+     * Web Project definition file for Eclipse Web Tools Project (Release 
1.0RC5 compatible).
      */
     private static final String DIR_DOT_SETTINGS = ".settings"; //$NON-NLS-1$
 
@@ -80,7 +78,7 @@
     private void delete( File f )
         throws MojoExecutionException
     {
-        getLog().info( MessageFormat.format( "Deleting {0} file...", new 
Object[] { f.getName() } ) );
+        getLog().info( Messages.getString( "EclipseCleanMojo.deleting", 
f.getName() ) ); //$NON-NLS-1$
 
         if ( f.exists() )
         {
@@ -88,28 +86,20 @@
             {
                 try
                 {
-                    if ( getLog().isDebugEnabled() )
-                    {
-                        getLog().debug(
-                                        MessageFormat.format( "Forcibly 
deleting {0} file...", new Object[] { f
-                                            .getName() } ) );
-                    }
                     FileUtils.forceDelete( f );
                 }
                 catch ( IOException e )
                 {
-                    throw new MojoExecutionException( MessageFormat.format( 
"Failed to delete {0} file: {0}",
-                                                                            
new Object[] {
-                                                                               
 f.getName(),
-                                                                               
 f.getAbsolutePath() } ) )
-                    {
-                    };
+                    throw new MojoExecutionException( Messages.getString( 
"EclipseCleanMojo.failedtodelete", //$NON-NLS-1$
+                                                                          new 
Object[] {
+                                                                              
f.getName(),
+                                                                              
f.getAbsolutePath() } ) );
                 }
             }
         }
         else
         {
-            getLog().info( MessageFormat.format( "No {0} file found", new 
Object[] { f.getName() } ) );
+            getLog().debug( Messages.getString( 
"EclipseCleanMojo.nofilefound", f.getName() ) ); //$NON-NLS-1$
         }
     }
 

Modified: 
maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/EclipsePlugin.java
URL: 
http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/EclipsePlugin.java?rev=368499&r1=368498&r2=368499&view=diff
==============================================================================
--- 
maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/EclipsePlugin.java
 (original)
+++ 
maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/EclipsePlugin.java
 Thu Jan 12 14:33:29 2006
@@ -73,7 +73,7 @@
     private static final String COMMON_PATH_JDT_LAUNCHING_JRE_CONTAINER = 
"org.eclipse.jdt.launching.JRE_CONTAINER"; //$NON-NLS-1$
 
     //  warning, order is important for binary search
-    public static final String[] WTP_SUPPORTED_VERSIONS = new String[] { 
"1.0", "R7" }; //$NON-NLS-1$ //$NON-NLS-2$
+    public static final String[] WTP_SUPPORTED_VERSIONS = new String[] { 
"1.0", "R7", "none" }; //$NON-NLS-1$ //$NON-NLS-2$  //$NON-NLS-3$
 
     /**
      * Constant for 'artifactId' element in POM.xml.
@@ -314,12 +314,9 @@
         {
             fillDefaultClasspathContainers( packaging );
         }
-        else if ( !classpathContainers.contains( 
COMMON_PATH_JDT_LAUNCHING_JRE_CONTAINER ) )
+        else if ( !classpathContainers.contains( 
COMMON_PATH_JDT_LAUNCHING_JRE_CONTAINER ) ) //$NON-NLS-1$
         {
-            getLog()
-                .warn(
-                       "You did specify a list of classpath containers without 
the base org.eclipse.jdt.launching.JRE_CONTAINER.\n"
-                           + "If you specify custom classpath containers you 
should also add org.eclipse.jdt.launching.JRE_CONTAINER to the list" );
+            getLog().warn( Messages.getString( 
"EclipsePlugin.missingjrecontainer" ) ); //$NON-NLS-1$
             classpathContainers.add( 0, 
COMMON_PATH_JDT_LAUNCHING_JRE_CONTAINER );
         }
 
@@ -363,8 +360,6 @@
         }
         else if ( wtpversion != null && wtpversion.startsWith( "1" ) ) 
//$NON-NLS-1$
         {
-            // we assume we have a version 1.0 for WTP
-            getLog().info( "Generating Eclipse web facet assuming version 1.x 
for WTP..." );
             new EclipseWtpFacetsWriter( getLog(), eclipseProjectDir, project, 
artifacts ).write( reactorArtifacts,
                                                                                
                  sourceDirs,
                                                                                
                  localRepository,

Modified: 
maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/EclipseUtils.java
URL: 
http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/EclipseUtils.java?rev=368499&r1=368498&r2=368499&view=diff
==============================================================================
--- 
maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/EclipseUtils.java
 (original)
+++ 
maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/EclipseUtils.java
 Thu Jan 12 14:33:29 2006
@@ -363,12 +363,14 @@
                 }
                 catch ( ArtifactResolutionException e )
                 {
-                    log.error( "Unable to resolve optional artifact " + 
artifact.getId() );
+                    log.error( Messages.getString( 
"EclipsePlugin.errorresolving", new Object[] { //$NON-NLS-1$
+                                                   artifact.getType(), 
artifact.getId(), e.getMessage() } ) );
                     continue;
                 }
                 catch ( ArtifactNotFoundException e )
                 {
-                    log.error( "Unable to resolve optional artifact " + 
artifact.getId() );
+                    log.error( Messages.getString( 
"EclipsePlugin.errorresolving", new Object[] { //$NON-NLS-1$
+                                                   artifact.getType(), 
artifact.getId(), e.getMessage() } ) );
                     continue;
                 }
                 artifacts.add( artifact );

Modified: 
maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/AbstractWtpResourceWriter.java
URL: 
http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/AbstractWtpResourceWriter.java?rev=368499&r1=368498&r2=368499&view=diff
==============================================================================
--- 
maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/AbstractWtpResourceWriter.java
 (original)
+++ 
maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/AbstractWtpResourceWriter.java
 Thu Jan 12 14:33:29 2006
@@ -300,9 +300,9 @@
             EclipseUtils.getPluginSetting( getProject(), 
"maven-compiler-plugin", "source", null ); //$NON-NLS-1$ //$NON-NLS-2$
         }
 
-        if ( "1.5".equals( version ) || "5".equals( version ) )
+        if ( "1.5".equals( version ) || "5".equals( version ) ) //$NON-NLS-1$ 
//$NON-NLS-2$
         {
-            version = "5.0";// see MECLIPSE-47 eclipse only accept 5.0 as a 
valid version
+            version = "5.0";// see MECLIPSE-47 eclipse only accept 5.0 as a 
valid version //$NON-NLS-1$
         }
 
         return version == null ? "1.4" : version; //$NON-NLS-1$

Modified: 
maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/EclipseWtpComponentWriter.java
URL: 
http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/EclipseWtpComponentWriter.java?rev=368499&r1=368498&r2=368499&view=diff
==============================================================================
--- 
maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/EclipseWtpComponentWriter.java
 (original)
+++ 
maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/EclipseWtpComponentWriter.java
 Thu Jan 12 14:33:29 2006
@@ -196,15 +196,7 @@
         String webInfLibDirAsString = EclipseUtils.toRelativeAndFixSeparator( 
getProject().getBasedir(), webInfLibDir,
                                                                               
false );
 
-        if ( getLog().isWarnEnabled() )
-        {
-            getLog().warn( 
"----------------------------------------------------------------------------" 
);
-            getLog().warn( "Copying over dependencies for WTP1.0 Project to 
directory: " + webInfLibDirAsString );
-            getLog()
-                .warn(
-                       "Please NOTE that this is a patch to allow publishing 
external dependencies for a WTP1.0 project." );
-            getLog().warn( 
"----------------------------------------------------------------------------" 
);
-        }
+        getLog().warn( Messages.getString( 
"EclipseWtpComponentWriter.copyingdepswarning", webInfLibDirAsString ) ); 
//$NON-NLS-1$
 
         // dependencies
         for ( Iterator it = getDependencies().iterator(); it.hasNext(); )
@@ -220,25 +212,19 @@
                 // warSourceDirectory and add a deploy-path so that resources 
get published.
                 try
                 {
-                    getLog().info( "Copying dependency: " + 
artifact.getFile().getName() + "..." );
+                    getLog().info( Messages.getString( 
"EclipseWtpComponentWriter.copyingsingledep", //$NON-NLS-1$ 
+                                                       
artifact.getFile().getName() ) );
                     FileUtils.copyFileToDirectory( artifact.getFile(), 
webInfLibDir );
                 }
                 catch ( IOException e )
                 {
                     // we log the error and still go ahead with the wtp 
project creation.
-
-                    getLog().error(
-                                    "Unable to copy dependency: " + 
artifact.getFile().getAbsolutePath()
-                                        + " over to web app lib directory : " 
+ webInfLibDirAsString );
+                    getLog().error( Messages.getString( 
"EclipseWtpComponentWriter.unabletocopy", new Object[] { //$NON-NLS-1$ 
+                                                        
artifact.getFile().getAbsolutePath(), webInfLibDirAsString } ) );
                 }
             }
         }
-        if ( getLog().isWarnEnabled() )
-        {
-            getLog().warn( 
"----------------------------------------------------------------------------" 
);
-            getLog().warn( "WTP1.0 Project dependencies copied!" );
-            getLog().warn( 
"----------------------------------------------------------------------------" 
);
-        }
+
         writer.startElement( ELT_WB_RESOURCE );
         writer.addAttribute( ATTR_DEPLOY_PATH, "/WEB-INF/lib" ); //$NON-NLS-1$
         writer.addAttribute( ATTR_SOURCE_PATH, webInfLibDirAsString );

Modified: 
maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/EclipseWtpFacetsWriter.java
URL: 
http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/EclipseWtpFacetsWriter.java?rev=368499&r1=368498&r2=368499&view=diff
==============================================================================
--- 
maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/EclipseWtpFacetsWriter.java
 (original)
+++ 
maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/EclipseWtpFacetsWriter.java
 Thu Jan 12 14:33:29 2006
@@ -155,7 +155,7 @@
             writer.endElement(); // fixed
             writer.startElement( ELT_INSTALLED );
             writer.addAttribute( ATTR_FACET, FACET_JST_UTILITY );
-            writer.addAttribute( ATTR_VERSION, "1.0" ); //$NON-NLS-2$
+            writer.addAttribute( ATTR_VERSION, "1.0" ); //$NON-NLS-1$
             writer.endElement(); // installed
         }
 

Modified: 
maven/plugins/trunk/maven-eclipse-plugin/src/main/resources/org/apache/maven/plugin/eclipse/messages.properties
URL: 
http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-eclipse-plugin/src/main/resources/org/apache/maven/plugin/eclipse/messages.properties?rev=368499&r1=368498&r2=368499&view=diff
==============================================================================
--- 
maven/plugins/trunk/maven-eclipse-plugin/src/main/resources/org/apache/maven/plugin/eclipse/messages.properties
 (original)
+++ 
maven/plugins/trunk/maven-eclipse-plugin/src/main/resources/org/apache/maven/plugin/eclipse/messages.properties
 Thu Jan 12 14:33:29 2006
@@ -17,6 +17,7 @@
 EclipsePlugin.artifactpathisnull=The artifact path was null. Artifact id: {0}
 EclipsePlugin.artifactissystemscoped=The artifact has scope ''system''. 
Artifact id: {0}. System path: {1}
 EclipsePlugin.unsupportedwtp=Unsupported WTP version: {0}. This plugin 
currently supports only the following versions: {1}.
+EclipsePlugin.missingjrecontainer=You did specify a list of classpath 
containers without the base org.eclipse.jdt.launching.JRE_CONTAINER.\n       If 
you specify custom classpath containers you should also add 
org.eclipse.jdt.launching.JRE_CONTAINER to the list
 
 EclipseSettingsWriter.wrotesettings=Wrote settings to {0}
 EclipseSettingsWriter.cannotcreatesettings=Cannot create settings file
@@ -29,4 +30,13 @@
 EclipseClasspathWriter.sourcesmissingitem=\n         o {0}
 EclipseClasspathWriter.sourcesavailable=Sources attachment for artifact {0} 
set to {1}
 
-EclipseProjectWriter.notafile=Not adding a file link to {0}; it is not a file
\ No newline at end of file
+EclipseProjectWriter.notafile=Not adding a file link to {0}; it is not a file
+
+EclipseWtpComponentWriter.copyingdepswarning=----------------------------------------------------------------------------\nCopying
 over dependencies for WTP1.0 Project to directory: {0}\nPlease NOTE that this 
is a patch to allow publishing external dependencies for a WTP1.0 
project.\n----------------------------------------------------------------------------
+EclipseWtpComponentWriter.copyingsingledep=Copying dependency: {0}...
+EclipseWtpComponentWriter.unabletocopy=Unable to copy dependency: {0} over to 
web app lib directory: {1}
+
+
+EclipseCleanMojo.deleting=Deleting {0} file...
+EclipseCleanMojo.failedtodelete=Failed to delete {0} file: {0}
+EclipseCleanMojo.nofilefound=No {0} file found
\ No newline at end of file


Reply via email to