Author: eworley
Date: Wed Jan  9 19:36:49 2008
New Revision: 610659

URL: http://svn.apache.org/viewvc?rev=610659&view=rev
Log:
Changed concrete source processors to provide their key to denote that the 
source is up to date

Modified:
    
incubator/nmaven/trunk/plugins/maven-compiler-plugin/src/main/java/org/apache/maven/dotnet/plugin/compiler/AbstractSourceProcessorMojo.java
    
incubator/nmaven/trunk/plugins/maven-compiler-plugin/src/main/java/org/apache/maven/dotnet/plugin/compiler/SourceProcessorMojo.java
    
incubator/nmaven/trunk/plugins/maven-compiler-plugin/src/main/java/org/apache/maven/dotnet/plugin/compiler/TestSourceProcessorMojo.java

Modified: 
incubator/nmaven/trunk/plugins/maven-compiler-plugin/src/main/java/org/apache/maven/dotnet/plugin/compiler/AbstractSourceProcessorMojo.java
URL: 
http://svn.apache.org/viewvc/incubator/nmaven/trunk/plugins/maven-compiler-plugin/src/main/java/org/apache/maven/dotnet/plugin/compiler/AbstractSourceProcessorMojo.java?rev=610659&r1=610658&r2=610659&view=diff
==============================================================================
--- 
incubator/nmaven/trunk/plugins/maven-compiler-plugin/src/main/java/org/apache/maven/dotnet/plugin/compiler/AbstractSourceProcessorMojo.java
 (original)
+++ 
incubator/nmaven/trunk/plugins/maven-compiler-plugin/src/main/java/org/apache/maven/dotnet/plugin/compiler/AbstractSourceProcessorMojo.java
 Wed Jan  9 19:36:49 2008
@@ -70,6 +70,12 @@
      * will be placed
      */
     protected abstract File getOutputDirectory();
+    
+    /**
+     * @return <code>String</code> The key used to set the source up to date 
flag
+     * on the plugin context
+     */
+    protected abstract String getSourceUpToDateKey();
 
     protected void processSources()
         throws MojoExecutionException
@@ -106,7 +112,7 @@
         getLog().info( "NMAVEN-904-002: Copying source files: From = " + 
sourceDirectory + ",  To = " +
             outputDirectory + ", File Count = " + files.length );
 
-        super.getPluginContext().put( "SOURCE_FILES_UP_TO_DATE", Boolean.TRUE 
);
+        super.getPluginContext().put( getSourceUpToDateKey(), Boolean.TRUE );
         for ( String file : files )
         {
             try
@@ -115,7 +121,7 @@
                 File targetFile = new File( outputDirectory, file );
                 if ( sourceFile.lastModified() > targetFile.lastModified() )
                 {
-                    super.getPluginContext().put( "SOURCE_FILES_UP_TO_DATE", 
Boolean.FALSE );
+                    super.getPluginContext().put( getSourceUpToDateKey(), 
Boolean.FALSE );
                     FileUtils.copyFile( sourceFile, targetFile );
                     targetFile.setLastModified( System.currentTimeMillis() );
                 }

Modified: 
incubator/nmaven/trunk/plugins/maven-compiler-plugin/src/main/java/org/apache/maven/dotnet/plugin/compiler/SourceProcessorMojo.java
URL: 
http://svn.apache.org/viewvc/incubator/nmaven/trunk/plugins/maven-compiler-plugin/src/main/java/org/apache/maven/dotnet/plugin/compiler/SourceProcessorMojo.java?rev=610659&r1=610658&r2=610659&view=diff
==============================================================================
--- 
incubator/nmaven/trunk/plugins/maven-compiler-plugin/src/main/java/org/apache/maven/dotnet/plugin/compiler/SourceProcessorMojo.java
 (original)
+++ 
incubator/nmaven/trunk/plugins/maven-compiler-plugin/src/main/java/org/apache/maven/dotnet/plugin/compiler/SourceProcessorMojo.java
 Wed Jan  9 19:36:49 2008
@@ -53,4 +53,10 @@
     {
         return new File( project.getBuild().getSourceDirectory() );
     }
+
+    @Override
+    protected String getSourceUpToDateKey()
+    {
+        return "SOURCE_FILES_UP_TO_DATE";
+    }
 }

Modified: 
incubator/nmaven/trunk/plugins/maven-compiler-plugin/src/main/java/org/apache/maven/dotnet/plugin/compiler/TestSourceProcessorMojo.java
URL: 
http://svn.apache.org/viewvc/incubator/nmaven/trunk/plugins/maven-compiler-plugin/src/main/java/org/apache/maven/dotnet/plugin/compiler/TestSourceProcessorMojo.java?rev=610659&r1=610658&r2=610659&view=diff
==============================================================================
--- 
incubator/nmaven/trunk/plugins/maven-compiler-plugin/src/main/java/org/apache/maven/dotnet/plugin/compiler/TestSourceProcessorMojo.java
 (original)
+++ 
incubator/nmaven/trunk/plugins/maven-compiler-plugin/src/main/java/org/apache/maven/dotnet/plugin/compiler/TestSourceProcessorMojo.java
 Wed Jan  9 19:36:49 2008
@@ -59,4 +59,10 @@
     {
         return new File( project.getBuild().getTestSourceDirectory() );
     }
+    
+    @Override
+    protected String getSourceUpToDateKey()
+    {
+        return "TEST_SOURCE_FILES_UP_TO_DATE";
+    }
 }


Reply via email to