You are viewing a plain text version of this content. The canonical link for it is here.
Posted to npanday-commits@incubator.apache.org by lc...@apache.org on 2011/12/19 16:27:42 UTC

svn commit: r1220830 - in /incubator/npanday/trunk: components/dotnet-executable/src/main/java/npanday/executable/ components/dotnet-executable/src/main/java/npanday/executable/compiler/ components/dotnet-executable/src/main/java/npanday/executable/com...

Author: lcorneliussen
Date: Mon Dec 19 16:27:41 2011
New Revision: 1220830

URL: http://svn.apache.org/viewvc?rev=1220830&view=rev
Log:
[NPANDAY-499] Make configuration for compiler-plugins and executable-plugins more flexible

o Removed resetCommands from NetExecutable
o Fixed type in windows registry access
o fixed: Settings were accessed before initialization

Added:
    incubator/npanday/trunk/plugins/msdeploy-maven-plugin/   (with props)
    incubator/npanday/trunk/plugins/msdeploy-maven-plugin/src/   (with props)
    incubator/npanday/trunk/plugins/msdeploy-maven-plugin/src/main/   (with props)
Modified:
    incubator/npanday/trunk/components/dotnet-executable/src/main/java/npanday/executable/MutableExecutableCapability.java
    incubator/npanday/trunk/components/dotnet-executable/src/main/java/npanday/executable/NetExecutable.java
    incubator/npanday/trunk/components/dotnet-executable/src/main/java/npanday/executable/compiler/MutableCompilerCapability.java
    incubator/npanday/trunk/components/dotnet-executable/src/main/java/npanday/executable/compiler/impl/AspxCompiler.java
    incubator/npanday/trunk/components/dotnet-executable/src/main/java/npanday/executable/compiler/impl/CSharpCompilerForProfile.java
    incubator/npanday/trunk/components/dotnet-executable/src/main/java/npanday/executable/compiler/impl/DefaultCompiler.java
    incubator/npanday/trunk/components/dotnet-executable/src/main/java/npanday/executable/compiler/impl/DotGNUCompiler.java
    incubator/npanday/trunk/components/dotnet-executable/src/main/java/npanday/executable/compiler/impl/JavaCompiler.java
    incubator/npanday/trunk/components/dotnet-executable/src/main/java/npanday/executable/compiler/impl/NemerleCompiler.java
    incubator/npanday/trunk/components/dotnet-executable/src/main/java/npanday/executable/compiler/impl/PhpCompiler.java
    incubator/npanday/trunk/components/dotnet-executable/src/main/java/npanday/executable/compiler/impl/RubyCompiler.java
    incubator/npanday/trunk/components/dotnet-executable/src/main/java/npanday/executable/impl/CapabilityMatcherImpl.java
    incubator/npanday/trunk/components/dotnet-executable/src/main/java/npanday/executable/impl/DefaultNetExecutable.java
    incubator/npanday/trunk/components/dotnet-executable/src/main/java/npanday/executable/impl/DefaultRepositoryNetExecutable.java
    incubator/npanday/trunk/components/dotnet-executable/src/main/java/npanday/executable/impl/ExecutablePluginsRepository.java
    incubator/npanday/trunk/components/dotnet-model/pom.xml
    incubator/npanday/trunk/components/dotnet-registry/src/main/java/npanday/registry/WindowsRegistryAccessProvider.java
    incubator/npanday/trunk/components/dotnet-registry/src/main/java/npanday/registry/impl/AbstractMultisourceRepository.java
    incubator/npanday/trunk/components/dotnet-registry/src/main/java/npanday/registry/impl/WindowsRegistryValueSource.java
    incubator/npanday/trunk/components/dotnet-registry/src/test/groovy/WindowsRegistryValueSourceTest.groovy
    incubator/npanday/trunk/components/dotnet-vendor/src/main/java/npanday/vendor/impl/StateMachineProcessorImpl.java

Modified: incubator/npanday/trunk/components/dotnet-executable/src/main/java/npanday/executable/MutableExecutableCapability.java
URL: http://svn.apache.org/viewvc/incubator/npanday/trunk/components/dotnet-executable/src/main/java/npanday/executable/MutableExecutableCapability.java?rev=1220830&r1=1220829&r2=1220830&view=diff
==============================================================================
--- incubator/npanday/trunk/components/dotnet-executable/src/main/java/npanday/executable/MutableExecutableCapability.java (original)
+++ incubator/npanday/trunk/components/dotnet-executable/src/main/java/npanday/executable/MutableExecutableCapability.java Mon Dec 19 16:27:41 2011
@@ -173,4 +173,11 @@ public class MutableExecutableCapability
     {
         this.probingPaths = probingPaths;
     }
+
+    @Override
+    public String toString()
+    {
+        return "ExecutableCapability [" + "vendorInfo=" + vendorInfo + ", operatingSystem='" + operatingSystem
+            + '\'' + ", profile='" + profile + '\'' + ']';
+    }
 }

Modified: incubator/npanday/trunk/components/dotnet-executable/src/main/java/npanday/executable/NetExecutable.java
URL: http://svn.apache.org/viewvc/incubator/npanday/trunk/components/dotnet-executable/src/main/java/npanday/executable/NetExecutable.java?rev=1220830&r1=1220829&r2=1220830&view=diff
==============================================================================
--- incubator/npanday/trunk/components/dotnet-executable/src/main/java/npanday/executable/NetExecutable.java (original)
+++ incubator/npanday/trunk/components/dotnet-executable/src/main/java/npanday/executable/NetExecutable.java Mon Dec 19 16:27:41 2011
@@ -29,6 +29,8 @@ import java.io.File;
  * Provides services for executing programs.
  *
  * @author Shane Isbell
+ * @author <a href="mailto:lcorneliussen@apache.org">Lars Corneliussen</a>
+ *
  * @see npanday.executable.compiler.CompilerExecutable
  */
 public interface NetExecutable
@@ -44,14 +46,6 @@ public interface NetExecutable
     List<String> getCommands() throws ExecutionException, PlatformUnsupportedException;
 
     /**
-     * Resets the commands to be used by the executable. This should only be used if the executable is being reused with
-     * different commands from the one that it was initialized with.
-     *
-     * @param commands
-     */
-    void resetCommands(List<String> commands);
-
-    /**
      * Compiles class files.
      *
      * @throws npanday.executable.ExecutionException

Modified: incubator/npanday/trunk/components/dotnet-executable/src/main/java/npanday/executable/compiler/MutableCompilerCapability.java
URL: http://svn.apache.org/viewvc/incubator/npanday/trunk/components/dotnet-executable/src/main/java/npanday/executable/compiler/MutableCompilerCapability.java?rev=1220830&r1=1220829&r2=1220830&view=diff
==============================================================================
--- incubator/npanday/trunk/components/dotnet-executable/src/main/java/npanday/executable/compiler/MutableCompilerCapability.java (original)
+++ incubator/npanday/trunk/components/dotnet-executable/src/main/java/npanday/executable/compiler/MutableCompilerCapability.java Mon Dec 19 16:27:41 2011
@@ -75,10 +75,10 @@ public class MutableCompilerCapability
         this.hasJustInTime = hasJustInTime;
     }
 
-
+    @Override
     public String toString()
     {
-        return "ID = " + identifier + ", Plugin Class: " + pluginClassName + ", OS = " + operatingSystem
-            + ", Language = " + language + ", Vendor = " + vendorInfo;
+        return "CompilerCapability [" + "vendorInfo=" + vendorInfo + ", operatingSystem='" + operatingSystem
+            + '\'' + ", language='" + language + '\'' + ']';
     }
 }

Modified: incubator/npanday/trunk/components/dotnet-executable/src/main/java/npanday/executable/compiler/impl/AspxCompiler.java
URL: http://svn.apache.org/viewvc/incubator/npanday/trunk/components/dotnet-executable/src/main/java/npanday/executable/compiler/impl/AspxCompiler.java?rev=1220830&r1=1220829&r2=1220830&view=diff
==============================================================================
--- incubator/npanday/trunk/components/dotnet-executable/src/main/java/npanday/executable/compiler/impl/AspxCompiler.java (original)
+++ incubator/npanday/trunk/components/dotnet-executable/src/main/java/npanday/executable/compiler/impl/AspxCompiler.java Mon Dec 19 16:27:41 2011
@@ -70,9 +70,4 @@ public class AspxCompiler
         commandExecutor.executeCommand( getExecutable(), getCommands(), getExecutionPath(), failOnErrorOutput() );
     }
 
-    public void resetCommands( List<String> commands )
-    {
-        // TODO Auto-generated method stub
-    }
-
 }
\ No newline at end of file

Modified: incubator/npanday/trunk/components/dotnet-executable/src/main/java/npanday/executable/compiler/impl/CSharpCompilerForProfile.java
URL: http://svn.apache.org/viewvc/incubator/npanday/trunk/components/dotnet-executable/src/main/java/npanday/executable/compiler/impl/CSharpCompilerForProfile.java?rev=1220830&r1=1220829&r2=1220830&view=diff
==============================================================================
--- incubator/npanday/trunk/components/dotnet-executable/src/main/java/npanday/executable/compiler/impl/CSharpCompilerForProfile.java (original)
+++ incubator/npanday/trunk/components/dotnet-executable/src/main/java/npanday/executable/compiler/impl/CSharpCompilerForProfile.java Mon Dec 19 16:27:41 2011
@@ -80,8 +80,4 @@ public final class CSharpCompilerForProf
         return commands;
     }
 
-    public void resetCommands( List<String> commands )
-    {
-        
-    }
 }

Modified: incubator/npanday/trunk/components/dotnet-executable/src/main/java/npanday/executable/compiler/impl/DefaultCompiler.java
URL: http://svn.apache.org/viewvc/incubator/npanday/trunk/components/dotnet-executable/src/main/java/npanday/executable/compiler/impl/DefaultCompiler.java?rev=1220830&r1=1220829&r2=1220830&view=diff
==============================================================================
--- incubator/npanday/trunk/components/dotnet-executable/src/main/java/npanday/executable/compiler/impl/DefaultCompiler.java (original)
+++ incubator/npanday/trunk/components/dotnet-executable/src/main/java/npanday/executable/compiler/impl/DefaultCompiler.java Mon Dec 19 16:27:41 2011
@@ -245,7 +245,8 @@ public final class DefaultCompiler
         
         Date date = new Date();
         String Now =""+date.getDate()+date.getHours()+date.getMinutes()+date.getSeconds();
-               
+
+        // TODO: Why can't the tmp dir just be a static one?
         TempDir = targetDir+File.separator+Now;
         
         try
@@ -330,10 +331,6 @@ public final class DefaultCompiler
         return filteredCommands;
     }
 
-    public void resetCommands( List<String> commands )
-    {
-
-    }
     // escaped to make use of dotnet style of command escapes .
     // Eg. /define:"CONFIG=\"Debug\",DEBUG=-1,TRACE=-1,_MyType=\"Windows\",PLATFORM=\"AnyCPU\""
     private String escapeCmdParams(String param)

Modified: incubator/npanday/trunk/components/dotnet-executable/src/main/java/npanday/executable/compiler/impl/DotGNUCompiler.java
URL: http://svn.apache.org/viewvc/incubator/npanday/trunk/components/dotnet-executable/src/main/java/npanday/executable/compiler/impl/DotGNUCompiler.java?rev=1220830&r1=1220829&r2=1220830&view=diff
==============================================================================
--- incubator/npanday/trunk/components/dotnet-executable/src/main/java/npanday/executable/compiler/impl/DotGNUCompiler.java (original)
+++ incubator/npanday/trunk/components/dotnet-executable/src/main/java/npanday/executable/compiler/impl/DotGNUCompiler.java Mon Dec 19 16:27:41 2011
@@ -92,8 +92,4 @@ public final class DotGNUCompiler
         return commands;
     }
 
-    public void resetCommands( List<String> commands )
-    {
-        
-    }
 }

Modified: incubator/npanday/trunk/components/dotnet-executable/src/main/java/npanday/executable/compiler/impl/JavaCompiler.java
URL: http://svn.apache.org/viewvc/incubator/npanday/trunk/components/dotnet-executable/src/main/java/npanday/executable/compiler/impl/JavaCompiler.java?rev=1220830&r1=1220829&r2=1220830&view=diff
==============================================================================
--- incubator/npanday/trunk/components/dotnet-executable/src/main/java/npanday/executable/compiler/impl/JavaCompiler.java (original)
+++ incubator/npanday/trunk/components/dotnet-executable/src/main/java/npanday/executable/compiler/impl/JavaCompiler.java Mon Dec 19 16:27:41 2011
@@ -35,8 +35,4 @@ public class JavaCompiler extends BaseCo
         return null;  
     }
 
-    public void resetCommands( List<String> commands )
-    {
-
-    }
 }

Modified: incubator/npanday/trunk/components/dotnet-executable/src/main/java/npanday/executable/compiler/impl/NemerleCompiler.java
URL: http://svn.apache.org/viewvc/incubator/npanday/trunk/components/dotnet-executable/src/main/java/npanday/executable/compiler/impl/NemerleCompiler.java?rev=1220830&r1=1220829&r2=1220830&view=diff
==============================================================================
--- incubator/npanday/trunk/components/dotnet-executable/src/main/java/npanday/executable/compiler/impl/NemerleCompiler.java (original)
+++ incubator/npanday/trunk/components/dotnet-executable/src/main/java/npanday/executable/compiler/impl/NemerleCompiler.java Mon Dec 19 16:27:41 2011
@@ -82,8 +82,4 @@ public final class NemerleCompiler
         return commands;
     }
 
-    public void resetCommands( List<String> commands )
-    {
-        
-    }
 }

Modified: incubator/npanday/trunk/components/dotnet-executable/src/main/java/npanday/executable/compiler/impl/PhpCompiler.java
URL: http://svn.apache.org/viewvc/incubator/npanday/trunk/components/dotnet-executable/src/main/java/npanday/executable/compiler/impl/PhpCompiler.java?rev=1220830&r1=1220829&r2=1220830&view=diff
==============================================================================
--- incubator/npanday/trunk/components/dotnet-executable/src/main/java/npanday/executable/compiler/impl/PhpCompiler.java (original)
+++ incubator/npanday/trunk/components/dotnet-executable/src/main/java/npanday/executable/compiler/impl/PhpCompiler.java Mon Dec 19 16:27:41 2011
@@ -68,8 +68,4 @@ public final class PhpCompiler
         return commands;
     }
 
-    public void resetCommands( List<String> commands )
-    {
-        
-    }
 }

Modified: incubator/npanday/trunk/components/dotnet-executable/src/main/java/npanday/executable/compiler/impl/RubyCompiler.java
URL: http://svn.apache.org/viewvc/incubator/npanday/trunk/components/dotnet-executable/src/main/java/npanday/executable/compiler/impl/RubyCompiler.java?rev=1220830&r1=1220829&r2=1220830&view=diff
==============================================================================
--- incubator/npanday/trunk/components/dotnet-executable/src/main/java/npanday/executable/compiler/impl/RubyCompiler.java (original)
+++ incubator/npanday/trunk/components/dotnet-executable/src/main/java/npanday/executable/compiler/impl/RubyCompiler.java Mon Dec 19 16:27:41 2011
@@ -67,8 +67,4 @@ public final class RubyCompiler
         return commands;
     }
 
-    public void resetCommands( List<String> commands )
-    {
-        
-    }
 }

Modified: incubator/npanday/trunk/components/dotnet-executable/src/main/java/npanday/executable/impl/CapabilityMatcherImpl.java
URL: http://svn.apache.org/viewvc/incubator/npanday/trunk/components/dotnet-executable/src/main/java/npanday/executable/impl/CapabilityMatcherImpl.java?rev=1220830&r1=1220829&r2=1220830&view=diff
==============================================================================
--- incubator/npanday/trunk/components/dotnet-executable/src/main/java/npanday/executable/impl/CapabilityMatcherImpl.java (original)
+++ incubator/npanday/trunk/components/dotnet-executable/src/main/java/npanday/executable/impl/CapabilityMatcherImpl.java Mon Dec 19 16:27:41 2011
@@ -138,17 +138,19 @@ public class CapabilityMatcherImpl
     {
         for ( ExecutableCapability executableCapability : executableCapabilities )
         {
-            getLogger().debug( "NPANDAY-065-005: Attempting to match capability: " + executableCapability );
             if ( matchExecutableCapability( executableCapability, matchPolicies ) )
             {
-                getLogger().debug( "NPANDAY-065-001: Made a Platform Capability Match: " + executableCapability );
+                getLogger().debug( "NPANDAY-065-001: Found matching capability: " + executableCapability );
                 return executableCapability;
             }
+            else
+            {
+                getLogger().debug( "NPANDAY-065-005: Capability doesn't match: " + executableCapability );
+            }
         }
         throw new PlatformUnsupportedException(
-            "NPANDAY-065-002: Could not match platform: OS = " + System.getProperty( "os.name" )
-                + ", Number of Capabilities = " + executableCapabilities.size() + ", Number of Policies = "
-                + matchPolicies.size() );
+            "NPANDAY-065-002: Could not match any of the " + executableCapabilities.size() + " capabilities with "
+                + matchPolicies );
     }
 
     private VendorInfo matchVendorInfo(ExecutableRequirement executableRequirement)
@@ -176,7 +178,7 @@ public class CapabilityMatcherImpl
             boolean match = executableMatchPolicy.match( executableCapability );
             if ( !match )
             {
-                getLogger().debug( "Failed to match policy: " + executableMatchPolicy );
+                getLogger().debug( "NPANDAY-065-009: Failed to match policy: " + executableMatchPolicy );
                 return false;
             }
         }

Modified: incubator/npanday/trunk/components/dotnet-executable/src/main/java/npanday/executable/impl/DefaultNetExecutable.java
URL: http://svn.apache.org/viewvc/incubator/npanday/trunk/components/dotnet-executable/src/main/java/npanday/executable/impl/DefaultNetExecutable.java?rev=1220830&r1=1220829&r2=1220830&view=diff
==============================================================================
--- incubator/npanday/trunk/components/dotnet-executable/src/main/java/npanday/executable/impl/DefaultNetExecutable.java (original)
+++ incubator/npanday/trunk/components/dotnet-executable/src/main/java/npanday/executable/impl/DefaultNetExecutable.java Mon Dec 19 16:27:41 2011
@@ -30,7 +30,6 @@ import npanday.vendor.Vendor;
 import org.codehaus.plexus.logging.Logger;
 
 import java.io.File;
-import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Collections;
 import java.util.List;
@@ -60,12 +59,6 @@ public class DefaultNetExecutable
         return Collections.unmodifiableList(filter.filter( commands ));
     }
 
-    public void resetCommands(List<String> commands)
-    {
-        this.commands = new ArrayList<String>();
-        this.commands.addAll(commands);//TODO: should be unmodifiable here: fail on filter?
-    }
-
     public File getExecutionPath()
     {
         String executable;
@@ -85,7 +78,7 @@ public class DefaultNetExecutable
             {
                 if ( PathUtil.containsExecutable(executablePath, executable) )
                 {
-                    logger.info("NPANDAY-070-003: Found executable path for " + executable + ": " + executablePath);
+                    logger.info("NPANDAY-070-003: Found executable path for " + executable + ": \"" + executablePath + "\"");
                     return new File( executablePath );
                 }
             }

Modified: incubator/npanday/trunk/components/dotnet-executable/src/main/java/npanday/executable/impl/DefaultRepositoryNetExecutable.java
URL: http://svn.apache.org/viewvc/incubator/npanday/trunk/components/dotnet-executable/src/main/java/npanday/executable/impl/DefaultRepositoryNetExecutable.java?rev=1220830&r1=1220829&r2=1220830&view=diff
==============================================================================
--- incubator/npanday/trunk/components/dotnet-executable/src/main/java/npanday/executable/impl/DefaultRepositoryNetExecutable.java (original)
+++ incubator/npanday/trunk/components/dotnet-executable/src/main/java/npanday/executable/impl/DefaultRepositoryNetExecutable.java Mon Dec 19 16:27:41 2011
@@ -27,7 +27,6 @@ import org.codehaus.plexus.logging.Logge
 
 import java.util.List;
 import java.util.Collections;
-import java.util.ArrayList;
 import java.io.File;
 
 /**
@@ -52,13 +51,6 @@ public class DefaultRepositoryNetExecuta
         return commands;
     }
 
-    public void resetCommands( List<String> commands )
-    {
-        List<String> tmp = new ArrayList<String>();
-        tmp.addAll(commands);
-        this.commands = Collections.unmodifiableList( tmp );
-    }
-
     public File getExecutionPath()
     {
         if ( executableContext == null )

Modified: incubator/npanday/trunk/components/dotnet-executable/src/main/java/npanday/executable/impl/ExecutablePluginsRepository.java
URL: http://svn.apache.org/viewvc/incubator/npanday/trunk/components/dotnet-executable/src/main/java/npanday/executable/impl/ExecutablePluginsRepository.java?rev=1220830&r1=1220829&r2=1220830&view=diff
==============================================================================
--- incubator/npanday/trunk/components/dotnet-executable/src/main/java/npanday/executable/impl/ExecutablePluginsRepository.java (original)
+++ incubator/npanday/trunk/components/dotnet-executable/src/main/java/npanday/executable/impl/ExecutablePluginsRepository.java Mon Dec 19 16:27:41 2011
@@ -20,13 +20,14 @@ package npanday.executable.impl;
 
 import com.google.common.base.Predicate;
 import com.google.common.collect.Iterables;
+import com.google.common.collect.Lists;
 import npanday.executable.CommandCapability;
 import npanday.executable.ExecutableCapability;
 import npanday.executable.MutableExecutableCapability;
-import npanday.model.executable.plugins.Platform;
 import npanday.model.executable.plugins.CommandFilter;
 import npanday.model.executable.plugins.ExecutablePlugin;
 import npanday.model.executable.plugins.ExecutablePluginsModel;
+import npanday.model.executable.plugins.Platform;
 import npanday.model.executable.plugins.io.xpp3.ExecutablePluginXpp3Reader;
 import npanday.registry.ModelInterpolator;
 import npanday.registry.NPandayRepositoryException;
@@ -75,6 +76,32 @@ public final class ExecutablePluginsRepo
         executablePlugins.addAll( model.getExecutablePlugins() );
     }
 
+    @Override
+    protected void normalizeInterpolatedModelNodes( ExecutablePluginsModel model )
+    {
+        for(ExecutablePlugin plugin : model.getExecutablePlugins()){
+            plugin.setProbingPaths(
+                removeNullOrEmptyOrWhitespaceItems( plugin.getProbingPaths() )
+            );
+        }
+    }
+
+    private List<String> removeNullOrEmptyOrWhitespaceItems( List<String> items )
+    {
+        if (items != null && items.size() > 0){
+            ArrayList<String> itemsCopy = Lists.newArrayList( );
+            for(String item : items)
+            {
+                if ( item != null && !item.trim().equals( "" ) )
+                {
+                    itemsCopy.add( item );
+                }
+            }
+            return itemsCopy;
+        }
+        return items;
+    }
+
     /**
      * Remove all stored values in preparation for a reload.
      */

Modified: incubator/npanday/trunk/components/dotnet-model/pom.xml
URL: http://svn.apache.org/viewvc/incubator/npanday/trunk/components/dotnet-model/pom.xml?rev=1220830&r1=1220829&r2=1220830&view=diff
==============================================================================
--- incubator/npanday/trunk/components/dotnet-model/pom.xml (original)
+++ incubator/npanday/trunk/components/dotnet-model/pom.xml Mon Dec 19 16:27:41 2011
@@ -51,7 +51,7 @@ under the License.
           <artifactId>modello-maven-plugin</artifactId>
           <version>1.5</version>
           <configuration>
-            <useJava5>false</useJava5>
+            <useJava5>true</useJava5>
           </configuration>
           <executions>
             <execution>

Modified: incubator/npanday/trunk/components/dotnet-registry/src/main/java/npanday/registry/WindowsRegistryAccessProvider.java
URL: http://svn.apache.org/viewvc/incubator/npanday/trunk/components/dotnet-registry/src/main/java/npanday/registry/WindowsRegistryAccessProvider.java?rev=1220830&r1=1220829&r2=1220830&view=diff
==============================================================================
--- incubator/npanday/trunk/components/dotnet-registry/src/main/java/npanday/registry/WindowsRegistryAccessProvider.java (original)
+++ incubator/npanday/trunk/components/dotnet-registry/src/main/java/npanday/registry/WindowsRegistryAccessProvider.java Mon Dec 19 16:27:41 2011
@@ -19,8 +19,8 @@ public interface WindowsRegistryAccessPr
 
     public static enum RegistryHKey
     {
-        HKLM( "HKEY_LOCAL_MACHINE", 0x80000001 ),
-        HKCU( "HKEY_CURRENT_USER",0x80000002 );
+        HKLM( "HKEY_LOCAL_MACHINE", 0x80000002 ),
+        HKCU( "HKEY_CURRENT_USER",  0x80000001 );
 
         private String longName;
         private int hkey;

Modified: incubator/npanday/trunk/components/dotnet-registry/src/main/java/npanday/registry/impl/AbstractMultisourceRepository.java
URL: http://svn.apache.org/viewvc/incubator/npanday/trunk/components/dotnet-registry/src/main/java/npanday/registry/impl/AbstractMultisourceRepository.java?rev=1220830&r1=1220829&r2=1220830&view=diff
==============================================================================
--- incubator/npanday/trunk/components/dotnet-registry/src/main/java/npanday/registry/impl/AbstractMultisourceRepository.java (original)
+++ incubator/npanday/trunk/components/dotnet-registry/src/main/java/npanday/registry/impl/AbstractMultisourceRepository.java Mon Dec 19 16:27:41 2011
@@ -81,10 +81,23 @@ public abstract class AbstractMultisourc
                 "NPANDAY-111-001: Error on interpolating model from " + sourceUrl, e );
         }
 
+        normalizeInterpolatedModelNodes( model );
+
         mergeLoadedModel( model );
         incrementContentVersion();
     }
 
+    protected void normalizeInterpolatedModelNodes( T model ){
+
+    }
+
+    /**
+     * Filters in properties from windows registry, environment variables, and (hopefully soon)
+     * the running mojos Maven project.
+     *
+     * @param model
+     * @throws InterpolationException
+     */
     private void interpolateModel( T model )
         throws InterpolationException
     {

Modified: incubator/npanday/trunk/components/dotnet-registry/src/main/java/npanday/registry/impl/WindowsRegistryValueSource.java
URL: http://svn.apache.org/viewvc/incubator/npanday/trunk/components/dotnet-registry/src/main/java/npanday/registry/impl/WindowsRegistryValueSource.java?rev=1220830&r1=1220829&r2=1220830&view=diff
==============================================================================
--- incubator/npanday/trunk/components/dotnet-registry/src/main/java/npanday/registry/impl/WindowsRegistryValueSource.java (original)
+++ incubator/npanday/trunk/components/dotnet-registry/src/main/java/npanday/registry/impl/WindowsRegistryValueSource.java Mon Dec 19 16:27:41 2011
@@ -51,12 +51,12 @@ public class WindowsRegistryValueSource
         {
             final String value = registry.getValue( registryHKey, key, valueName );
             addFeedback( "NPANDAY-118-001: Retrieved the registry value for " + expression + ": " + value);
-            return value;
+            return value == null ? "" : value;
         }
         catch ( WindowsRegistryAccessException e )
         {
             addFeedback( "NPANDAY-118-000: Could not retrieve the registry value for " + expression, e );
-            return null;
+            return "";
         }
     }
 }

Modified: incubator/npanday/trunk/components/dotnet-registry/src/test/groovy/WindowsRegistryValueSourceTest.groovy
URL: http://svn.apache.org/viewvc/incubator/npanday/trunk/components/dotnet-registry/src/test/groovy/WindowsRegistryValueSourceTest.groovy?rev=1220830&r1=1220829&r2=1220830&view=diff
==============================================================================
--- incubator/npanday/trunk/components/dotnet-registry/src/test/groovy/WindowsRegistryValueSourceTest.groovy (original)
+++ incubator/npanday/trunk/components/dotnet-registry/src/test/groovy/WindowsRegistryValueSourceTest.groovy Mon Dec 19 16:27:41 2011
@@ -35,7 +35,25 @@ class WindowsRegistryValueSourceTest ext
     play{
       def source = new WindowsRegistryValueSource(provider)
 
-      assert source.getValue("HKLM\\Key@ValueName") == null
+      assert source.getValue("HKLM\\Key@ValueName") == ""
+    }
+  }
+
+  @Test
+  void testWrongKeysAreNull()
+  {
+    def provider = mock(WindowsRegistryAccessProvider);
+
+    provider.getValue(RegistryHKey.HKLM, "Key", "ValueName")
+      .raises(new WindowsRegistryAccessException("Trouble here!!"))
+      .stub()
+
+    play {
+      def source = new WindowsRegistryValueSource(provider)
+
+      assert source.getValue("ABC\\Key@ValueName") == null
+      assert source.getValue("HKLM\\Key?ValueName") == null
+      assert source.getValue("HKLM") == null
     }
   }
 
@@ -52,4 +70,38 @@ class WindowsRegistryValueSourceTest ext
       assert source.getValue("HKLM\\Key@ValueName") == "value"
     }
   }
+
+  @Test
+  void testHKLMLongAndShortNames()
+  {
+    def provider = mock(WindowsRegistryAccessProvider);
+
+    provider.getValue(RegistryHKey.HKLM, "Key", "ValueName")
+      .returns("value")
+      .times(2)
+
+    play{
+      def source = new WindowsRegistryValueSource(provider)
+
+      assert source.getValue("HKLM\\Key@ValueName") == "value"
+      assert source.getValue("HKEY_LOCAL_MACHINE\\Key@ValueName") == "value"
+    }
+  }
+
+  @Test
+  void testHKCULongAndShortNames()
+  {
+    def provider = mock(WindowsRegistryAccessProvider);
+
+    provider.getValue(RegistryHKey.HKCU, "Key", "ValueName")
+      .returns("value")
+      .times(2)
+
+    play{
+      def source = new WindowsRegistryValueSource(provider)
+
+      assert source.getValue("HKCU\\Key@ValueName") == "value"
+      assert source.getValue("HKEY_CURRENT_USER\\Key@ValueName") == "value"
+    }
+  }
 }

Modified: incubator/npanday/trunk/components/dotnet-vendor/src/main/java/npanday/vendor/impl/StateMachineProcessorImpl.java
URL: http://svn.apache.org/viewvc/incubator/npanday/trunk/components/dotnet-vendor/src/main/java/npanday/vendor/impl/StateMachineProcessorImpl.java?rev=1220830&r1=1220829&r2=1220830&view=diff
==============================================================================
--- incubator/npanday/trunk/components/dotnet-vendor/src/main/java/npanday/vendor/impl/StateMachineProcessorImpl.java (original)
+++ incubator/npanday/trunk/components/dotnet-vendor/src/main/java/npanday/vendor/impl/StateMachineProcessorImpl.java Mon Dec 19 16:27:41 2011
@@ -83,8 +83,6 @@ public final class StateMachineProcessor
     public void initialize()
         throws InitializationException
     {
-        SettingsUtil.warnIfSettingsAreEmpty( logger, repositoryRegistry );
-
         VendorInfoTransitionRuleFactory factory = new VendorInfoTransitionRuleFactory();
 
         try
@@ -120,6 +118,8 @@ public final class StateMachineProcessor
     public VendorInfo process( VendorRequirement vendorRequirement )
         throws IllegalStateException, PlatformUnsupportedException
     {
+        SettingsUtil.warnIfSettingsAreEmpty( logger, repositoryRegistry );
+
         if ( !vendorRequirement.isComplete() )
         {
             VendorRequirementState startState = VendorRequirementState.START.getState( vendorRequirement );

Propchange: incubator/npanday/trunk/plugins/msdeploy-maven-plugin/
------------------------------------------------------------------------------
    bugtraq:number = true

Propchange: incubator/npanday/trunk/plugins/msdeploy-maven-plugin/src/
------------------------------------------------------------------------------
    bugtraq:number = true

Propchange: incubator/npanday/trunk/plugins/msdeploy-maven-plugin/src/main/
------------------------------------------------------------------------------
    bugtraq:number = true