incubator-nmaven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sisb...@apache.org
Subject svn commit: r539682 - in /incubator/nmaven/branches/SI_XPT: assemblies/NMaven.Plugin.Loader/src/main/csharp/NMaven/Plugin/Loader/ assemblies/NMaven.Plugin.Runner/src/main/csharp/NMaven/Plugin/Launcher/ components/dotnet-executable/src/main/java/org/apa...
Date Sat, 19 May 2007 03:09:09 GMT
Author: sisbell
Date: Fri May 18 20:09:08 2007
New Revision: 539682

URL: http://svn.apache.org/viewvc?view=rev&rev=539682
Log:
Plugin Runner now handles mono executables.

Modified:
    incubator/nmaven/branches/SI_XPT/assemblies/NMaven.Plugin.Loader/src/main/csharp/NMaven/Plugin/Loader/PluginLoader.cs
    incubator/nmaven/branches/SI_XPT/assemblies/NMaven.Plugin.Runner/src/main/csharp/NMaven/Plugin/Launcher/PluginLauncher.cs
    incubator/nmaven/branches/SI_XPT/components/dotnet-executable/src/main/java/org/apache/maven/dotnet/executable/impl/NetExecutableFactoryImpl.java

Modified: incubator/nmaven/branches/SI_XPT/assemblies/NMaven.Plugin.Loader/src/main/csharp/NMaven/Plugin/Loader/PluginLoader.cs
URL: http://svn.apache.org/viewvc/incubator/nmaven/branches/SI_XPT/assemblies/NMaven.Plugin.Loader/src/main/csharp/NMaven/Plugin/Loader/PluginLoader.cs?view=diff&rev=539682&r1=539681&r2=539682
==============================================================================
--- incubator/nmaven/branches/SI_XPT/assemblies/NMaven.Plugin.Loader/src/main/csharp/NMaven/Plugin/Loader/PluginLoader.cs
(original)
+++ incubator/nmaven/branches/SI_XPT/assemblies/NMaven.Plugin.Loader/src/main/csharp/NMaven/Plugin/Loader/PluginLoader.cs
Fri May 18 20:09:08 2007
@@ -80,7 +80,12 @@
 			string mojoName = GetArgFor("mojoName", args);
 			Console.WriteLine("ParamFile = {0}, AssemblyFile = {1}, MojoName = {2}", 
 			                  paramFile, assemblyFile, mojoName);
-			
+
+			if(paramFile == null || assemblyFile == null || mojoName == null)
+			{
+
+            }
+
 			PluginLoader pluginLoader = new PluginLoader();
 			AppDomain applicationDomain = pluginLoader.LoadPlugin(new FileInfo(assemblyFile));
 			AbstractMojo abstractMojo = pluginLoader.CreateAbstractMojoFor(mojoName, 

Modified: incubator/nmaven/branches/SI_XPT/assemblies/NMaven.Plugin.Runner/src/main/csharp/NMaven/Plugin/Launcher/PluginLauncher.cs
URL: http://svn.apache.org/viewvc/incubator/nmaven/branches/SI_XPT/assemblies/NMaven.Plugin.Runner/src/main/csharp/NMaven/Plugin/Launcher/PluginLauncher.cs?view=diff&rev=539682&r1=539681&r2=539682
==============================================================================
--- incubator/nmaven/branches/SI_XPT/assemblies/NMaven.Plugin.Runner/src/main/csharp/NMaven/Plugin/Launcher/PluginLauncher.cs
(original)
+++ incubator/nmaven/branches/SI_XPT/assemblies/NMaven.Plugin.Runner/src/main/csharp/NMaven/Plugin/Launcher/PluginLauncher.cs
Fri May 18 20:09:08 2007
@@ -17,11 +17,22 @@
 		static void Main(string[] args)
 		{
 
-			Console.WriteLine("Start Process = " + DateTime.Now);
+			Console.WriteLine("NMAVEN: Start Process = " + DateTime.Now);
 			Console.WriteLine(@flattenArgs(args));
+			String vendor = GetArgFor("vendor", args);
 			String startProcessAssembly = @GetArgFor("startProcessAssembly", args);
-			ProcessStartInfo processStartInfo =
-				new ProcessStartInfo(startProcessAssembly, @flattenArgs(args));
+			ProcessStartInfo processStartInfo = null;
+
+			if(vendor != null && vendor.Equals("MONO"))
+			{
+                processStartInfo =
+                    new ProcessStartInfo("mono", startProcessAssembly + " " + @flattenArgs(args));
+            }
+            else
+            {
+                processStartInfo =
+                    new ProcessStartInfo(startProcessAssembly, @flattenArgs(args));
+            }
 
 			processStartInfo.EnvironmentVariables["APPDOMAIN_MANAGER_ASM"]
 				= "NMaven.Plugin, Version=0.14.0.0, PublicKeyToken=4b435f4d76e2f0e6, culture=neutral";
@@ -30,7 +41,7 @@
 
 			processStartInfo.UseShellExecute = false;
 			Process.Start(processStartInfo);
-            Console.WriteLine("End Process = " + DateTime.Now);
+            Console.WriteLine("NMAVEN: End Process = " + DateTime.Now);
 		}
 
 		private static string GetArgFor(string name, string[] args)

Modified: incubator/nmaven/branches/SI_XPT/components/dotnet-executable/src/main/java/org/apache/maven/dotnet/executable/impl/NetExecutableFactoryImpl.java
URL: http://svn.apache.org/viewvc/incubator/nmaven/branches/SI_XPT/components/dotnet-executable/src/main/java/org/apache/maven/dotnet/executable/impl/NetExecutableFactoryImpl.java?view=diff&rev=539682&r1=539681&r2=539682
==============================================================================
--- incubator/nmaven/branches/SI_XPT/components/dotnet-executable/src/main/java/org/apache/maven/dotnet/executable/impl/NetExecutableFactoryImpl.java
(original)
+++ incubator/nmaven/branches/SI_XPT/components/dotnet-executable/src/main/java/org/apache/maven/dotnet/executable/impl/NetExecutableFactoryImpl.java
Fri May 18 20:09:08 2007
@@ -285,6 +285,7 @@
                     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;
                     }
                 }
@@ -296,6 +297,7 @@
                     "NMAVEN-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 )
@@ -362,7 +364,7 @@
         executableRequirement.setVendor( vendorInfo.getVendor() );
         executableRequirement.setFrameworkVersion( vendorInfo.getFrameworkVersion() );
         executableRequirement.setVendorVersion( vendorInfo.getVendorVersion() );
-        executableRequirement.setProfile( "dotnet-jetty:start" );
+        executableRequirement.setProfile( "dotnet-jetty:start" );//TODO: Remove hard-coded
value
 
         ExecutableConfig executableConfig = ExecutableConfig.Factory.createDefaultExecutableConfig();
         executableConfig.setCommands( commands );



Mime
View raw message