Author: brett
Date: Tue Jul  8 14:41:44 2014
New Revision: 1608808

URL: http://svn.apache.org/r1608808
Log:
[NPANDAY-505] split plugin executables from other executables

The use of the resolver, which in turn needs to use the base executable
factory, caused a circular dependency that works in Maven 3.0+ and fails
in Maven 2.

Added:
    
incubator/npanday/trunk/components/dotnet-executable/src/main/java/npanday/executable/NetPluginExecutableFactory.java
      - copied, changed from r1608767, 
incubator/npanday/trunk/components/dotnet-executable/src/main/java/npanday/executable/NetExecutableFactory.java
    
incubator/npanday/trunk/components/dotnet-executable/src/main/java/npanday/executable/impl/NetPluginExecutableFactoryImpl.java
      - copied, changed from r1608767, 
incubator/npanday/trunk/components/dotnet-executable/src/main/java/npanday/executable/impl/NetExecutableFactoryImpl.java
Modified:
    
incubator/npanday/trunk/components/dotnet-executable/src/main/java/npanday/executable/NetExecutableFactory.java
    
incubator/npanday/trunk/components/dotnet-executable/src/main/java/npanday/executable/impl/NetExecutableFactoryImpl.java
    
incubator/npanday/trunk/components/dotnet-plugin/src/main/java/npanday/plugin/AbstractMojo.java
    
incubator/npanday/trunk/components/dotnet-plugin/src/main/java/npanday/plugin/DotNetMojo.java
    
incubator/npanday/trunk/plugins/maven-mojo-generator-plugin/src/main/java/npanday/plugin/generator/MojoGeneratorMojo.java
    
incubator/npanday/trunk/plugins/netplugins/NPanday.Plugin.Addin/javabinding/src/main/java/NPanday/Plugin/Addin/AutomationExtensibilityMojo.java
    
incubator/npanday/trunk/plugins/netplugins/NPanday.Plugin.Devenv/javabinding/src/main/java/NPanday/Plugin/Devenv/DevenvMojo.java
    
incubator/npanday/trunk/plugins/netplugins/NPanday.Plugin.Settings/javabinding/src/main/java/NPanday/Plugin/Settings/SettingsGeneratorMojo.java
    
incubator/npanday/trunk/plugins/netplugins/NPanday.Plugin.SysRef/javabinding/src/main/java/NPanday/Plugin/SysRef/SysRefMojo.java

Modified: 
incubator/npanday/trunk/components/dotnet-executable/src/main/java/npanday/executable/NetExecutableFactory.java
URL: 
http://svn.apache.org/viewvc/incubator/npanday/trunk/components/dotnet-executable/src/main/java/npanday/executable/NetExecutableFactory.java?rev=1608808&r1=1608807&r2=1608808&view=diff
==============================================================================
--- 
incubator/npanday/trunk/components/dotnet-executable/src/main/java/npanday/executable/NetExecutableFactory.java
 (original)
+++ 
incubator/npanday/trunk/components/dotnet-executable/src/main/java/npanday/executable/NetExecutableFactory.java
 Tue Jul  8 14:41:44 2014
@@ -54,27 +54,4 @@ public interface NetExecutableFactory
     CompilerExecutable getCompilerExecutable(
         CompilerRequirement compilerRequirement, CompilerConfig 
compilerConfig, MavenProject project ) throws
         PlatformUnsupportedException;
-
-    NetExecutable getArtifactExecutable(
-        MavenProject project, Artifact executableArtifact, Set<Artifact> 
additionalDependencies,
-        VendorRequirement vendorRequirement, ArtifactRepository 
localRepository, List<String> commands,
-        File targetDir ) throws
-
-        PlatformUnsupportedException, ArtifactResolutionException, 
ArtifactNotFoundException;
-
-    NetExecutable getPluginExecutable(
-        MavenProject project, Artifact artifact, VendorRequirement 
vendorRequirement,
-        ArtifactRepository localRepository, File parameterFile, String 
mojoName, File targetDir, String npandayVersion ) throws
-        PlatformUnsupportedException,
-        ArtifactResolutionException,
-        ArtifactNotFoundException;
-
-    public NetExecutable getPluginRunner(
-        MavenProject project, Artifact pluginArtifact, Set<Artifact> 
additionalDependencies,
-        VendorRequirement vendorRequirement, ArtifactRepository 
localRepository, List<String> commands, File targetDir,
-        String npandayVersion ) throws
-
-        PlatformUnsupportedException,
-        ArtifactResolutionException,
-        ArtifactNotFoundException;
 }

Copied: 
incubator/npanday/trunk/components/dotnet-executable/src/main/java/npanday/executable/NetPluginExecutableFactory.java
 (from r1608767, 
incubator/npanday/trunk/components/dotnet-executable/src/main/java/npanday/executable/NetExecutableFactory.java)
URL: 
http://svn.apache.org/viewvc/incubator/npanday/trunk/components/dotnet-executable/src/main/java/npanday/executable/NetPluginExecutableFactory.java?p2=incubator/npanday/trunk/components/dotnet-executable/src/main/java/npanday/executable/NetPluginExecutableFactory.java&p1=incubator/npanday/trunk/components/dotnet-executable/src/main/java/npanday/executable/NetExecutableFactory.java&r1=1608767&r2=1608808&rev=1608808&view=diff
==============================================================================
--- 
incubator/npanday/trunk/components/dotnet-executable/src/main/java/npanday/executable/NetExecutableFactory.java
 (original)
+++ 
incubator/npanday/trunk/components/dotnet-executable/src/main/java/npanday/executable/NetPluginExecutableFactory.java
 Tue Jul  8 14:41:44 2014
@@ -26,7 +26,6 @@ import npanday.executable.compiler.Compi
 import npanday.vendor.VendorRequirement;
 import org.apache.maven.artifact.Artifact;
 import org.apache.maven.artifact.repository.ArtifactRepository;
-import org.apache.maven.artifact.repository.DefaultArtifactRepository;
 import org.apache.maven.artifact.resolver.ArtifactNotFoundException;
 import org.apache.maven.artifact.resolver.ArtifactResolutionException;
 import org.apache.maven.project.MavenProject;
@@ -42,37 +41,21 @@ import java.util.Set;
  * @author Shane Isbell
  * @author <a href="m...@lcorneliussen.de">Lars Corneliussen, Faktum 
Software</a>
  */
-public interface NetExecutableFactory
+public interface NetPluginExecutableFactory
 {
-    String ROLE = NetExecutableFactory.class.getName();
-
-
-    NetExecutable getExecutable(
-        ExecutableRequirement executableRequirement, List<String> commands, 
File netHome ) throws
-        PlatformUnsupportedException;
-
-    CompilerExecutable getCompilerExecutable(
-        CompilerRequirement compilerRequirement, CompilerConfig 
compilerConfig, MavenProject project ) throws
-        PlatformUnsupportedException;
-
-    NetExecutable getArtifactExecutable(
-        MavenProject project, Artifact executableArtifact, Set<Artifact> 
additionalDependencies,
-        VendorRequirement vendorRequirement, ArtifactRepository 
localRepository, List<String> commands,
-        File targetDir ) throws
-
-        PlatformUnsupportedException, ArtifactResolutionException, 
ArtifactNotFoundException;
+    String ROLE = NetPluginExecutableFactory.class.getName();
 
     NetExecutable getPluginExecutable(
-        MavenProject project, Artifact artifact, VendorRequirement 
vendorRequirement,
-        ArtifactRepository localRepository, File parameterFile, String 
mojoName, File targetDir, String npandayVersion ) throws
+            MavenProject project, Artifact artifact, VendorRequirement 
vendorRequirement,
+            ArtifactRepository localRepository, File parameterFile, String 
mojoName, File targetDir, String npandayVersion) throws
         PlatformUnsupportedException,
         ArtifactResolutionException,
         ArtifactNotFoundException;
 
     public NetExecutable getPluginRunner(
-        MavenProject project, Artifact pluginArtifact, Set<Artifact> 
additionalDependencies,
-        VendorRequirement vendorRequirement, ArtifactRepository 
localRepository, List<String> commands, File targetDir,
-        String npandayVersion ) throws
+            MavenProject project, Artifact pluginArtifact, Set<Artifact> 
additionalDependencies,
+            VendorRequirement vendorRequirement, ArtifactRepository 
localRepository, List<String> commands, File targetDir,
+            String npandayVersion) throws
 
         PlatformUnsupportedException,
         ArtifactResolutionException,

Modified: 
incubator/npanday/trunk/components/dotnet-executable/src/main/java/npanday/executable/impl/NetExecutableFactoryImpl.java
URL: 
http://svn.apache.org/viewvc/incubator/npanday/trunk/components/dotnet-executable/src/main/java/npanday/executable/impl/NetExecutableFactoryImpl.java?rev=1608808&r1=1608807&r2=1608808&view=diff
==============================================================================
--- 
incubator/npanday/trunk/components/dotnet-executable/src/main/java/npanday/executable/impl/NetExecutableFactoryImpl.java
 (original)
+++ 
incubator/npanday/trunk/components/dotnet-executable/src/main/java/npanday/executable/impl/NetExecutableFactoryImpl.java
 Tue Jul  8 14:41:44 2014
@@ -86,11 +86,6 @@ public class NetExecutableFactoryImpl
     /**
      * @plexus.requirement
      */
-    private RepositoryExecutableContext repositoryExecutableContext;
-
-    /**
-     * @plexus.requirement
-     */
     private ExecutableContext executableContext;
 
     /**
@@ -99,36 +94,6 @@ public class NetExecutableFactoryImpl
     private CompilerContext compilerContext;
 
     /**
-     * @plexus.requirement
-     */
-    private RepositoryRegistry repositoryRegistry;
-
-    /**
-     * @plexus.requirement
-     */
-    private VendorInfoRepository vendorInfoRepository;
-
-    /**
-     * @plexus.requirement
-     */
-    private StateMachineProcessor processor;
-
-    /**
-     * @plexus.requirement
-     */
-    private NPandayArtifactResolver artifactResolver;
-
-    /**
-     * @plexus.requirement
-     */
-    private ArtifactFactory artifactFactory;
-
-    /**
-     * @plexus.requirement
-     */
-    private ArtifactMetadataSource artifactMetadataSource;
-
-    /**
      * @see NetExecutableFactory
      */
     public NetExecutable getExecutable(
@@ -211,227 +176,4 @@ public class NetExecutableFactoryImpl
             throw new PlatformUnsupportedException( "NPANDAY-066-007: Unable 
to find net executable", e );
         }
     }
-
-    public NetExecutable getPluginRunner(
-        MavenProject project, Artifact pluginArtifact, Set<Artifact> 
additionalDependencies,
-        VendorRequirement vendorRequirement, ArtifactRepository 
localRepository, List<String> commands, File targetDir,
-        String npandayVersion ) throws
-
-        PlatformUnsupportedException,
-        ArtifactResolutionException,
-        ArtifactNotFoundException{
-
-        Set dependencies = Sets.newHashSet(pluginArtifact);
-        if (additionalDependencies != null)
-        {
-            dependencies.addAll( additionalDependencies );
-        }
-
-        // need to resolve what we can here since we need the path!
-        Set<Artifact> artifacts = makeAvailable(
-            project.getArtifact(), project.getManagedVersionMap(), 
dependencies, targetDir, localRepository,
-            // TODO: consider, if this must be getRemotePluginRepositories()!!
-            project.getRemoteArtifactRepositories()
-        );
-
-        commands.add( "startProcessAssembly=" + 
pluginArtifact.getFile().getAbsolutePath() );
-
-        String pluginArtifactPath = findArtifact( artifacts, 
"NPanday.Plugin").getFile().getAbsolutePath();
-        commands.add( "pluginArtifactPath=" + pluginArtifactPath );
-
-        return getArtifactExecutable(
-            project, createPluginRunnerArtifact( npandayVersion ), 
dependencies, vendorRequirement, localRepository, commands, targetDir
-        );
-    }
-
-    public NetExecutable getArtifactExecutable(
-        MavenProject project, Artifact executableArtifact, Set<Artifact> 
additionalDependencies,
-        VendorRequirement vendorRequirement, ArtifactRepository 
localRepository, List<String> commands,
-        File targetDir ) throws
-
-        PlatformUnsupportedException,
-        ArtifactResolutionException,
-        ArtifactNotFoundException
-    {
-        Set dependencies = Sets.newHashSet(executableArtifact);
-        if (additionalDependencies != null){
-            dependencies.addAll( additionalDependencies );
-        }
-
-        makeAvailable(
-            project.getArtifact(), project.getManagedVersionMap(), 
dependencies, targetDir, localRepository,
-            // TODO: consider, if this must be getRemotePluginRepositories()!!
-            project.getRemoteArtifactRepositories()
-        );
-
-        File artifactPath = executableArtifact.getFile();
-
-        if ( commands == null )
-        {
-            commands = new ArrayList<String>();
-        }
-
-        // TODO: this should be a separate implementation of NetExecutable, 
configured only for MONO!!!
-
-        VendorInfo vendorInfo;
-        try
-        {
-            vendorInfo = processor.process( vendorRequirement );
-        }
-        catch ( IllegalStateException e )
-        {
-            throw new PlatformUnsupportedException(
-                "NPANDAY-066-010: Illegal State: Vendor Info = " + 
vendorRequirement, e );
-        }
-
-        if ( vendorInfo.getVendor() == null || 
vendorInfo.getFrameworkVersion() == null )
-        {
-            throw new PlatformUnsupportedException( "NPANDAY-066-020: Missing 
Vendor Information: " + vendorInfo );
-        }
-        getLogger().debug( "NPANDAY-066-003: Found Vendor: " + vendorInfo );
-
-
-
-        List<String> modifiedCommands = new ArrayList<String>();
-        String exe = null;
-
-        if ( vendorInfo.getVendor().equals( Vendor.MONO ) )
-        {
-            List<File> executablePaths = vendorInfo.getExecutablePaths();
-            if ( executablePaths != null )
-            {
-                for ( File executablePath : executablePaths )
-                {
-                    if ( new File( executablePath.getAbsolutePath(), 
"mono.exe" ).exists() )
-                    {
-                        exe = new File( executablePath.getAbsolutePath(), 
"mono.exe" ).getAbsolutePath();
-                        commands.add( "vendor=MONO" );//if forked process, it 
needs to know.
-                        break;
-                    }
-                }
-            }
-
-            if ( exe == null )
-            {
-                getLogger().info(
-                    "NPANDAY-066-005: Executable path for mono does not exist. 
Will attempt to execute MONO using" +
-                        " the main PATH variable." );
-                exe = "mono";
-                commands.add( "vendor=MONO" );//if forked process, it needs to 
know.
-            }
-            modifiedCommands.add( artifactPath.getAbsolutePath() );
-            for ( String command : commands )
-            {
-                modifiedCommands.add( command );
-            }
-        }
-        else
-        {
-            exe = artifactPath.getAbsolutePath();
-            modifiedCommands = commands;
-        }
-        //TODO: DotGNU on Linux?
-        ExecutableConfig executableConfig = new ExecutableConfig();
-        executableConfig.setExecutionPaths( Arrays.asList( exe ) );
-        executableConfig.setCommands( modifiedCommands );
-
-        try
-        {
-            repositoryExecutableContext.init( executableConfig );
-        }
-        catch ( InitializationException e )
-        {
-            throw new PlatformUnsupportedException(
-                "NPANDAY-066-006: Unable to initialize the repository 
executable context", e );
-        }
-
-        try
-        {
-            return repositoryExecutableContext.getNetExecutable();
-        }
-        catch ( ExecutionException e )
-        {
-            throw new PlatformUnsupportedException( "NPANDAY-066-004: Unable 
to find net executable", e );
-        }
-    }
-
-    public Artifact findArtifact( Set<Artifact> artifacts, String artifactId ) 
throws ArtifactNotFoundException
-    {
-        List<String> ids = Lists.newArrayList();
-        for ( Artifact a : artifacts )
-        {
-            ids.add( a.getArtifactId() );
-
-            if ( a.getArtifactId().equalsIgnoreCase( artifactId ) )
-            {
-                return a;
-            }
-        }
-
-        throw new ArtifactNotFoundException(
-            "NPANDAY-066-11: Could not find artifact " + artifactId + " among 
" + ids, "*", artifactId, "*", "*", null,
-            null, null, null, null
-        );
-    }
-
-    public NetExecutable getPluginExecutable(
-        MavenProject project, Artifact pluginArtifact, VendorRequirement 
vendorRequirement,
-        ArtifactRepository localRepository, File parameterFile, String 
mojoName, File targetDir, String npandayVersion ) throws
-        PlatformUnsupportedException,
-        ArtifactResolutionException,
-        ArtifactNotFoundException
-    {
-        Set<Artifact> dependencies = Sets.newHashSet(pluginArtifact);
-
-        Artifact loaderArtifact = artifactFactory.createDependencyArtifact(
-            "org.apache.npanday.plugins", "NPanday.Plugin.Loader",
-            VersionRange.createFromVersion( npandayVersion ),
-            ArtifactType.DOTNET_EXECUTABLE.getPackagingType(), null, "runtime"
-        );
-        dependencies.add(
-            pluginArtifact
-        );
-
-        // preresolve this one
-        artifactResolver.resolve( pluginArtifact, 
project.getRemoteArtifactRepositories(), localRepository );
-        File pluginArtifactPath = PathUtil.getPrivateApplicationBaseFileFor( 
pluginArtifact, null, targetDir );
-
-        List<String> commands = new ArrayList<String>();
-        commands.add( "parameterFile=" + parameterFile.getAbsolutePath() );
-        commands.add( "assemblyFile=" + pluginArtifactPath.getAbsolutePath() );
-        commands.add( "mojoName=" + mojoName );//ArtifactId = namespace
-
-        return getPluginRunner(
-            project, loaderArtifact, dependencies, vendorRequirement, 
localRepository, commands, targetDir,
-            npandayVersion
-        );
-    }
-
-    private Artifact createPluginRunnerArtifact( String npandayVersion )
-    {
-        return artifactFactory.createDependencyArtifact(
-                "org.apache.npanday.plugins", "NPanday.Plugin.Runner",
-                VersionRange.createFromVersion( npandayVersion ),
-                ArtifactType.DOTNET_EXECUTABLE.getPackagingType(), null, 
"runtime"
-            );
-    }
-
-    private Set<Artifact> makeAvailable(
-        Artifact originating, Map managedVersions, Set<Artifact> artifacts, 
File targetDir,
-        ArtifactRepository localRepository, List remoteArtifactRepositories ) 
throws
-        ArtifactResolutionException,
-        ArtifactNotFoundException
-    {
-        ArtifactResolutionResult results = 
artifactResolver.resolveTransitively(
-            artifacts, originating, managedVersions, localRepository, 
remoteArtifactRepositories, artifactMetadataSource,
-            new ScopeArtifactFilter( "runtime" )
-        );
-
-        for(Object ao : results.getArtifacts()){
-            Artifact a = (Artifact)ao;
-            a.setFile( PathUtil.getPrivateApplicationBaseFileFor( a, null, 
targetDir ) );
-        }
-
-        return results.getArtifacts();
-    }
 }

Copied: 
incubator/npanday/trunk/components/dotnet-executable/src/main/java/npanday/executable/impl/NetPluginExecutableFactoryImpl.java
 (from r1608767, 
incubator/npanday/trunk/components/dotnet-executable/src/main/java/npanday/executable/impl/NetExecutableFactoryImpl.java)
URL: 
http://svn.apache.org/viewvc/incubator/npanday/trunk/components/dotnet-executable/src/main/java/npanday/executable/impl/NetPluginExecutableFactoryImpl.java?p2=incubator/npanday/trunk/components/dotnet-executable/src/main/java/npanday/executable/impl/NetPluginExecutableFactoryImpl.java&p1=incubator/npanday/trunk/components/dotnet-executable/src/main/java/npanday/executable/impl/NetExecutableFactoryImpl.java&r1=1608767&r2=1608808&rev=1608808&view=diff
==============================================================================
--- 
incubator/npanday/trunk/components/dotnet-executable/src/main/java/npanday/executable/impl/NetExecutableFactoryImpl.java
 (original)
+++ 
incubator/npanday/trunk/components/dotnet-executable/src/main/java/npanday/executable/impl/NetPluginExecutableFactoryImpl.java
 Tue Jul  8 14:41:44 2014
@@ -25,28 +25,12 @@ import npanday.ArtifactType;
 import npanday.InitializationException;
 import npanday.PathUtil;
 import npanday.PlatformUnsupportedException;
-import npanday.executable.CapabilityMatcher;
-import npanday.executable.ExecutableCapability;
-import npanday.executable.ExecutableConfig;
-import npanday.executable.ExecutableContext;
-import npanday.executable.ExecutableRequirement;
-import npanday.executable.ExecutionException;
-import npanday.executable.NetExecutable;
-import npanday.executable.NetExecutableFactory;
-import npanday.executable.RepositoryExecutableContext;
-import npanday.executable.compiler.CompilerCapability;
-import npanday.executable.compiler.CompilerConfig;
-import npanday.executable.compiler.CompilerContext;
-import npanday.executable.compiler.CompilerExecutable;
-import npanday.executable.compiler.CompilerRequirement;
+import npanday.executable.*;
+import npanday.executable.compiler.*;
 import npanday.registry.RepositoryRegistry;
 import npanday.resolver.NPandayArtifactResolver;
 import npanday.vendor.IllegalStateException;
-import npanday.vendor.StateMachineProcessor;
-import npanday.vendor.Vendor;
-import npanday.vendor.VendorInfo;
-import npanday.vendor.VendorInfoRepository;
-import npanday.vendor.VendorRequirement;
+import npanday.vendor.*;
 import org.apache.maven.artifact.Artifact;
 import org.apache.maven.artifact.factory.ArtifactFactory;
 import org.apache.maven.artifact.metadata.ArtifactMetadataSource;
@@ -60,29 +44,19 @@ import org.apache.maven.project.MavenPro
 import org.codehaus.plexus.logging.AbstractLogEnabled;
 
 import java.io.File;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
+import java.util.*;
 
 /**
  * Provides an implementation of <code>NetExecutableFactory</code>.
  *
  * @author Shane Isbell
  * @author <a href="mailto:lcornelius...@apache.org";>Lars Corneliussen</a>
- * @plexus.component role="npanday.executable.NetExecutableFactory"
+ * @plexus.component role="npanday.executable.NetPluginExecutableFactory"
  */
-public class NetExecutableFactoryImpl
+public class NetPluginExecutableFactoryImpl
     extends AbstractLogEnabled
-    implements NetExecutableFactory
+    implements NetPluginExecutableFactory
 {
-
-    /**
-     * @plexus.requirement
-     */
-    private CapabilityMatcher capabilityMatcher;
-
     /**
      * @plexus.requirement
      */
@@ -91,26 +65,6 @@ public class NetExecutableFactoryImpl
     /**
      * @plexus.requirement
      */
-    private ExecutableContext executableContext;
-
-    /**
-     * @plexus.requirement
-     */
-    private CompilerContext compilerContext;
-
-    /**
-     * @plexus.requirement
-     */
-    private RepositoryRegistry repositoryRegistry;
-
-    /**
-     * @plexus.requirement
-     */
-    private VendorInfoRepository vendorInfoRepository;
-
-    /**
-     * @plexus.requirement
-     */
     private StateMachineProcessor processor;
 
     /**
@@ -128,90 +82,6 @@ public class NetExecutableFactoryImpl
      */
     private ArtifactMetadataSource artifactMetadataSource;
 
-    /**
-     * @see NetExecutableFactory
-     */
-    public NetExecutable getExecutable(
-        ExecutableRequirement executableRequirement, List<String> commands, 
File netHome )
-        throws PlatformUnsupportedException
-    {
-        // TODO: construct ExcecutableConfig from the outside
-        ExecutableConfig executableConfig = new ExecutableConfig();
-        executableConfig.setCommands( commands );
-
-
-        List<String> executablePaths = ( executableConfig.getExecutionPaths() 
== null )
-            ? new ArrayList<String>()
-            : executableConfig.getExecutionPaths();
-
-        if ( netHome != null )
-        {
-            getLogger().info( "NPANDAY-066-014: Found executable path in pom: 
Path = " + netHome.getAbsolutePath() );
-            executableConfig.getExecutionPaths().add( 
netHome.getAbsolutePath() );
-        }
-
-
-        executableConfig.setExecutionPaths( executablePaths );
-
-        final ExecutableCapability executableCapability =
-                    capabilityMatcher.matchExecutableCapabilityFor( 
executableRequirement );
-
-        executableContext.init( executableCapability, executableConfig );
-
-        try
-        {
-            return executableContext.getNetExecutable();
-        }
-        catch ( ExecutionException e )
-        {
-            throw new PlatformUnsupportedException( "NPANDAY-066-001: Unable 
to find net executable", e );
-        }
-    }
-
-    /**
-     * @see 
NetExecutableFactory#getCompilerExecutable(npanday.executable.compiler.CompilerRequirement,
-     *      npanday.executable.compiler.CompilerConfig, 
org.apache.maven.project.MavenProject)
-     */
-    public CompilerExecutable getCompilerExecutable(
-        CompilerRequirement compilerRequirement, CompilerConfig 
compilerConfig, MavenProject project )
-        throws PlatformUnsupportedException
-    {
-        File targetDir = PathUtil.getPrivateApplicationBaseDirectory( project 
);
-
-        final CompilerCapability compilerCapability =
-            capabilityMatcher.matchCompilerCapabilityFor( compilerRequirement 
);
-
-        // init does not need the executable paths to be set
-        compilerContext.init( compilerCapability, compilerConfig, project );
-
-        List<String> executionPaths = ( compilerConfig.getExecutionPaths() == 
null )
-            ? new ArrayList<String>()
-            : compilerConfig.getExecutionPaths();
-
-        if ( executionPaths == null || executionPaths.size() == 0 )
-        {
-            getLogger().warn( "NPANDAY-231: previously netDependencyId was 
used to resolve some private bin path..." );
-            // TODO: remove!
-            Artifact artifact = null;
-            if ( artifact != null )
-            {
-                File artifactPath = PathUtil.getPrivateApplicationBaseFileFor( 
artifact, compilerConfig.getLocalRepository(), targetDir );
-                executionPaths.add( 
artifactPath.getParentFile().getAbsolutePath() );
-            }
-
-            compilerConfig.setExecutionPaths( executionPaths );
-        }
-
-        try
-        {
-            return compilerContext.getCompilerExecutable();
-        }
-        catch ( ExecutionException e )
-        {
-            throw new PlatformUnsupportedException( "NPANDAY-066-007: Unable 
to find net executable", e );
-        }
-    }
-
     public NetExecutable getPluginRunner(
         MavenProject project, Artifact pluginArtifact, Set<Artifact> 
additionalDependencies,
         VendorRequirement vendorRequirement, ArtifactRepository 
localRepository, List<String> commands, File targetDir,

Modified: 
incubator/npanday/trunk/components/dotnet-plugin/src/main/java/npanday/plugin/AbstractMojo.java
URL: 
http://svn.apache.org/viewvc/incubator/npanday/trunk/components/dotnet-plugin/src/main/java/npanday/plugin/AbstractMojo.java?rev=1608808&r1=1608807&r2=1608808&view=diff
==============================================================================
--- 
incubator/npanday/trunk/components/dotnet-plugin/src/main/java/npanday/plugin/AbstractMojo.java
 (original)
+++ 
incubator/npanday/trunk/components/dotnet-plugin/src/main/java/npanday/plugin/AbstractMojo.java
 Tue Jul  8 14:41:44 2014
@@ -25,6 +25,7 @@ import npanday.PathUtil;
 import npanday.PlatformUnsupportedException;
 import npanday.executable.ExecutionException;
 import npanday.executable.NetExecutableFactory;
+import npanday.executable.NetPluginExecutableFactory;
 import npanday.vendor.VendorRequirement;
 import org.apache.maven.artifact.Artifact;
 import org.apache.maven.artifact.factory.ArtifactFactory;
@@ -164,7 +165,7 @@ public abstract class AbstractMojo
                 "runtime"
             );
 
-            getNetExecutableFactory().getPluginExecutable(
+            getNetPluginExecutableFactory().getPluginExecutable(
                 project, artifact, vendorRequirement, localRepository, 
paramFile, getClassName(), targetDir,
                 getNPandayVersion()
             ).execute();
@@ -244,9 +245,9 @@ public abstract class AbstractMojo
     public abstract MavenProject getMavenProject();
 
     /**
-     * @see DotNetMojo#getNetExecutableFactory()
+     * @see DotNetMojo#getNetPluginExecutableFactory()
      */
-    public abstract NetExecutableFactory getNetExecutableFactory();
+    public abstract NetPluginExecutableFactory getNetPluginExecutableFactory();
 
     public abstract PluginContext getNetPluginContext();
 

Modified: 
incubator/npanday/trunk/components/dotnet-plugin/src/main/java/npanday/plugin/DotNetMojo.java
URL: 
http://svn.apache.org/viewvc/incubator/npanday/trunk/components/dotnet-plugin/src/main/java/npanday/plugin/DotNetMojo.java?rev=1608808&r1=1608807&r2=1608808&view=diff
==============================================================================
--- 
incubator/npanday/trunk/components/dotnet-plugin/src/main/java/npanday/plugin/DotNetMojo.java
 (original)
+++ 
incubator/npanday/trunk/components/dotnet-plugin/src/main/java/npanday/plugin/DotNetMojo.java
 Tue Jul  8 14:41:44 2014
@@ -19,8 +19,8 @@ package npanday.plugin;
  * under the License.
  */
 
+import npanday.executable.NetPluginExecutableFactory;
 import org.apache.maven.project.MavenProject;
-import npanday.executable.NetExecutableFactory;
 import org.w3c.dom.Document;
 
 import javax.xml.transform.dom.DOMSource;
@@ -67,7 +67,7 @@ public interface DotNetMojo
      *
      * @return the net executable factory
      */
-    NetExecutableFactory getNetExecutableFactory();
+    NetPluginExecutableFactory getNetPluginExecutableFactory();
 
    // PluginContext getPluginContext();
 }

Modified: 
incubator/npanday/trunk/plugins/maven-mojo-generator-plugin/src/main/java/npanday/plugin/generator/MojoGeneratorMojo.java
URL: 
http://svn.apache.org/viewvc/incubator/npanday/trunk/plugins/maven-mojo-generator-plugin/src/main/java/npanday/plugin/generator/MojoGeneratorMojo.java?rev=1608808&r1=1608807&r2=1608808&view=diff
==============================================================================
--- 
incubator/npanday/trunk/plugins/maven-mojo-generator-plugin/src/main/java/npanday/plugin/generator/MojoGeneratorMojo.java
 (original)
+++ 
incubator/npanday/trunk/plugins/maven-mojo-generator-plugin/src/main/java/npanday/plugin/generator/MojoGeneratorMojo.java
 Tue Jul  8 14:41:44 2014
@@ -114,7 +114,7 @@ public class MojoGeneratorMojo
     /**
      * @component
      */
-    private npanday.executable.NetExecutableFactory netExecutableFactory;
+    private npanday.executable.NetPluginExecutableFactory 
netPluginExecutableFactory;
 
     /**
      * @component
@@ -157,7 +157,7 @@ public class MojoGeneratorMojo
                 "runtime"
             );
 
-            netExecutableFactory.getPluginRunner(
+            netPluginExecutableFactory.getPluginRunner(
                 project, artifact, null, vendorRequirement, 
LocalRepositoryUtil.create( localRepository ), commands,
                 targetDir, pluginVersion
             ).execute();

Modified: 
incubator/npanday/trunk/plugins/netplugins/NPanday.Plugin.Addin/javabinding/src/main/java/NPanday/Plugin/Addin/AutomationExtensibilityMojo.java
URL: 
http://svn.apache.org/viewvc/incubator/npanday/trunk/plugins/netplugins/NPanday.Plugin.Addin/javabinding/src/main/java/NPanday/Plugin/Addin/AutomationExtensibilityMojo.java?rev=1608808&r1=1608807&r2=1608808&view=diff
==============================================================================
--- 
incubator/npanday/trunk/plugins/netplugins/NPanday.Plugin.Addin/javabinding/src/main/java/NPanday/Plugin/Addin/AutomationExtensibilityMojo.java
 (original)
+++ 
incubator/npanday/trunk/plugins/netplugins/NPanday.Plugin.Addin/javabinding/src/main/java/NPanday/Plugin/Addin/AutomationExtensibilityMojo.java
 Tue Jul  8 14:41:44 2014
@@ -69,7 +69,7 @@ public class AutomationExtensibilityMojo
        /**
         * @component
         */
-        private npanday.executable.NetExecutableFactory netExecutableFactory;
+        private npanday.executable.NetPluginExecutableFactory 
netPluginExecutableFactory;
 
        /**
         * @component
@@ -108,10 +108,10 @@ public class AutomationExtensibilityMojo
             return pluginContext;
         }
 
-        public npanday.executable.NetExecutableFactory 
getNetExecutableFactory()
-        {
-            return netExecutableFactory;
-        }
+        public npanday.executable.NetPluginExecutableFactory 
getNetPluginExecutableFactory()
+    {
+        return netPluginExecutableFactory;
+    }
 
         public org.apache.maven.project.MavenProject getMavenProject()
         {

Modified: 
incubator/npanday/trunk/plugins/netplugins/NPanday.Plugin.Devenv/javabinding/src/main/java/NPanday/Plugin/Devenv/DevenvMojo.java
URL: 
http://svn.apache.org/viewvc/incubator/npanday/trunk/plugins/netplugins/NPanday.Plugin.Devenv/javabinding/src/main/java/NPanday/Plugin/Devenv/DevenvMojo.java?rev=1608808&r1=1608807&r2=1608808&view=diff
==============================================================================
--- 
incubator/npanday/trunk/plugins/netplugins/NPanday.Plugin.Devenv/javabinding/src/main/java/NPanday/Plugin/Devenv/DevenvMojo.java
 (original)
+++ 
incubator/npanday/trunk/plugins/netplugins/NPanday.Plugin.Devenv/javabinding/src/main/java/NPanday/Plugin/Devenv/DevenvMojo.java
 Tue Jul  8 14:41:44 2014
@@ -69,7 +69,7 @@ public class DevenvMojo
        /**
         * @component
         */
-        private npanday.executable.NetExecutableFactory netExecutableFactory;
+        private npanday.executable.NetPluginExecutableFactory 
netPluginExecutableFactory;
 
        /**
         * @component
@@ -108,9 +108,9 @@ public class DevenvMojo
             return pluginContext;
         }
 
-        public npanday.executable.NetExecutableFactory 
getNetExecutableFactory()
+        public npanday.executable.NetPluginExecutableFactory 
getNetPluginExecutableFactory()
         {
-            return netExecutableFactory;
+            return netPluginExecutableFactory;
         }
 
         public org.apache.maven.project.MavenProject getMavenProject()

Modified: 
incubator/npanday/trunk/plugins/netplugins/NPanday.Plugin.Settings/javabinding/src/main/java/NPanday/Plugin/Settings/SettingsGeneratorMojo.java
URL: 
http://svn.apache.org/viewvc/incubator/npanday/trunk/plugins/netplugins/NPanday.Plugin.Settings/javabinding/src/main/java/NPanday/Plugin/Settings/SettingsGeneratorMojo.java?rev=1608808&r1=1608807&r2=1608808&view=diff
==============================================================================
--- 
incubator/npanday/trunk/plugins/netplugins/NPanday.Plugin.Settings/javabinding/src/main/java/NPanday/Plugin/Settings/SettingsGeneratorMojo.java
 (original)
+++ 
incubator/npanday/trunk/plugins/netplugins/NPanday.Plugin.Settings/javabinding/src/main/java/NPanday/Plugin/Settings/SettingsGeneratorMojo.java
 Tue Jul  8 14:41:44 2014
@@ -80,7 +80,7 @@ public class SettingsGeneratorMojo
     /**
      * @component
      */
-    private npanday.executable.NetExecutableFactory netExecutableFactory;
+    private npanday.executable.NetPluginExecutableFactory 
netPluginExecutableFactory;
 
     /**
      * @component
@@ -130,9 +130,9 @@ public class SettingsGeneratorMojo
         return pluginContext;
     }
 
-    public npanday.executable.NetExecutableFactory getNetExecutableFactory()
+    public npanday.executable.NetPluginExecutableFactory 
getNetPluginExecutableFactory()
     {
-        return netExecutableFactory;
+        return netPluginExecutableFactory;
     }
 
     public org.apache.maven.project.MavenProject getMavenProject()

Modified: 
incubator/npanday/trunk/plugins/netplugins/NPanday.Plugin.SysRef/javabinding/src/main/java/NPanday/Plugin/SysRef/SysRefMojo.java
URL: 
http://svn.apache.org/viewvc/incubator/npanday/trunk/plugins/netplugins/NPanday.Plugin.SysRef/javabinding/src/main/java/NPanday/Plugin/SysRef/SysRefMojo.java?rev=1608808&r1=1608807&r2=1608808&view=diff
==============================================================================
--- 
incubator/npanday/trunk/plugins/netplugins/NPanday.Plugin.SysRef/javabinding/src/main/java/NPanday/Plugin/SysRef/SysRefMojo.java
 (original)
+++ 
incubator/npanday/trunk/plugins/netplugins/NPanday.Plugin.SysRef/javabinding/src/main/java/NPanday/Plugin/SysRef/SysRefMojo.java
 Tue Jul  8 14:41:44 2014
@@ -69,7 +69,7 @@ public class SysRefMojo
        /**
         * @component
         */
-        private npanday.executable.NetExecutableFactory netExecutableFactory;
+        private npanday.executable.NetPluginExecutableFactory 
netPluginExecutableFactory;
 
        /**
         * @component
@@ -108,9 +108,9 @@ public class SysRefMojo
             return pluginContext;
         }
 
-        public npanday.executable.NetExecutableFactory 
getNetExecutableFactory()
+        public npanday.executable.NetPluginExecutableFactory 
getNetPluginExecutableFactory()
         {
-            return netExecutableFactory;
+            return netPluginExecutableFactory;
         }
 
         public org.apache.maven.project.MavenProject getMavenProject()


Reply via email to