You are viewing a plain text version of this content. The canonical link for it is here.
Posted to nmaven-commits@incubator.apache.org by si...@apache.org on 2007/02/28 06:44:44 UTC

svn commit: r512624 - in /incubator/nmaven/branches/SI_IDE/assemblies: NMaven.Core/src/main/csharp/Core/ NMaven.Core/src/main/csharp/Core/Impl/ NMaven.Plugin.Resx/src/main/csharp/Plugin/Resx/ NMaven.Plugin.Settings/src/main/csharp/Plugin/Settings/ NMav...

Author: sisbell
Date: Tue Feb 27 22:44:43 2007
New Revision: 512624

URL: http://svn.apache.org/viewvc?view=rev&rev=512624
Log:
Updated license info and api docs.

Modified:
    incubator/nmaven/branches/SI_IDE/assemblies/NMaven.Core/src/main/csharp/Core/ExecutionException.cs
    incubator/nmaven/branches/SI_IDE/assemblies/NMaven.Core/src/main/csharp/Core/IProjectGenerator.cs
    incubator/nmaven/branches/SI_IDE/assemblies/NMaven.Core/src/main/csharp/Core/IProjectReference.cs
    incubator/nmaven/branches/SI_IDE/assemblies/NMaven.Core/src/main/csharp/Core/Impl/ProjectGeneratorImpl.cs
    incubator/nmaven/branches/SI_IDE/assemblies/NMaven.Core/src/main/csharp/Core/Impl/ProjectReferenceImpl.cs
    incubator/nmaven/branches/SI_IDE/assemblies/NMaven.Plugin.Resx/src/main/csharp/Plugin/Resx/MimeType.cs
    incubator/nmaven/branches/SI_IDE/assemblies/NMaven.Plugin.Resx/src/main/csharp/Plugin/Resx/ResX.cs
    incubator/nmaven/branches/SI_IDE/assemblies/NMaven.Plugin.Settings/src/main/csharp/Plugin/Settings/ExecutionException.cs
    incubator/nmaven/branches/SI_IDE/assemblies/NMaven.Plugin.Settings/src/main/csharp/Plugin/Settings/SettingsGenerator.cs
    incubator/nmaven/branches/SI_IDE/assemblies/NMaven.Plugin.Solution/src/main/csharp/Plugin/Solution/SolutionPlugin.cs

Modified: incubator/nmaven/branches/SI_IDE/assemblies/NMaven.Core/src/main/csharp/Core/ExecutionException.cs
URL: http://svn.apache.org/viewvc/incubator/nmaven/branches/SI_IDE/assemblies/NMaven.Core/src/main/csharp/Core/ExecutionException.cs?view=diff&rev=512624&r1=512623&r2=512624
==============================================================================
--- incubator/nmaven/branches/SI_IDE/assemblies/NMaven.Core/src/main/csharp/Core/ExecutionException.cs (original)
+++ incubator/nmaven/branches/SI_IDE/assemblies/NMaven.Core/src/main/csharp/Core/ExecutionException.cs Tue Feb 27 22:44:43 2007
@@ -1,17 +1,20 @@
 //
-//  Copyright 2006 Shane Isbell
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
 //
-//  Licensed under the Apache License, Version 2.0 (the "License");
-//  you may not use this file except in compliance with the License.
-//  You may obtain a copy of the License at
+//   http://www.apache.org/licenses/LICENSE-2.0
 //
-//      http://www.apache.org/licenses/LICENSE-2.0
-//
-//  Unless required by applicable law or agreed to in writing, software
-//  distributed under the License is distributed on an "AS IS" BASIS,
-//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-//  See the License for the specific language governing permissions and
-//  limitations under the License.
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
 //
 
 using System;

Modified: incubator/nmaven/branches/SI_IDE/assemblies/NMaven.Core/src/main/csharp/Core/IProjectGenerator.cs
URL: http://svn.apache.org/viewvc/incubator/nmaven/branches/SI_IDE/assemblies/NMaven.Core/src/main/csharp/Core/IProjectGenerator.cs?view=diff&rev=512624&r1=512623&r2=512624
==============================================================================
--- incubator/nmaven/branches/SI_IDE/assemblies/NMaven.Core/src/main/csharp/Core/IProjectGenerator.cs (original)
+++ incubator/nmaven/branches/SI_IDE/assemblies/NMaven.Core/src/main/csharp/Core/IProjectGenerator.cs Tue Feb 27 22:44:43 2007
@@ -1,3 +1,22 @@
+//
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+//
+
 using System;
 using System.IO;
 using System.Collections.Generic;
@@ -6,18 +25,36 @@
 namespace NMaven.Core
 {
 	/// <summary>
-	/// Description of Interface1.
+	/// Provides services for generating .NET project and solution files.
 	/// </summary>
 	public interface IProjectGenerator
 	{
 		
+        /// <summary>
+        /// Generates a .csproj file from the specified maven model.
+        /// </summary>
+        /// <param name="model">the pom model</param>
+        /// <param name="sourceFileDirectory">the directory containing the source files </param>
+        /// <param name="projectFileName">the name of the project: usually corresponds to the artifact id</param>
+        /// <param name="projectReferences">references to other projects that this project is dependent upon</param>
+        /// <returns></returns>
 		IProjectReference generateProjectFor(NMaven.Model.Model model, 
 		                            DirectoryInfo sourceFileDirectory,
 		                            string projectFileName,
 		                            List<IProjectReference> projectReferences);
 		
+        /// <summary>
+        /// Generates a solution file that references the specified projects.
+        /// </summary>
+        /// <param name="fileInfo">the solution file</param>
+        /// <param name="projectReferences">csproj references</param>
 		void generateSolutionFor(FileInfo fileInfo, List<IProjectReference> projectReferences);
 		
+        /// <summary>
+        /// Creates a model from the pom.
+        /// </summary>
+        /// <param name="fileName">file name of the pom.xml file</param>
+        /// <returns>a model binding of the pom file</returns>
 		NMaven.Model.Model createPomModelFor(string fileName);
 		
 	}

Modified: incubator/nmaven/branches/SI_IDE/assemblies/NMaven.Core/src/main/csharp/Core/IProjectReference.cs
URL: http://svn.apache.org/viewvc/incubator/nmaven/branches/SI_IDE/assemblies/NMaven.Core/src/main/csharp/Core/IProjectReference.cs?view=diff&rev=512624&r1=512623&r2=512624
==============================================================================
--- incubator/nmaven/branches/SI_IDE/assemblies/NMaven.Core/src/main/csharp/Core/IProjectReference.cs (original)
+++ incubator/nmaven/branches/SI_IDE/assemblies/NMaven.Core/src/main/csharp/Core/IProjectReference.cs Tue Feb 27 22:44:43 2007
@@ -1,3 +1,21 @@
+//
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+//
 
 using System;
 using System.IO;
@@ -5,7 +23,7 @@
 namespace NMaven.Core
 {
 	/// <summary>
-	/// Description of IProjectReference.
+	/// Provides services for obtaining information about a project (.csproj) reference
 	/// </summary>
 	public interface IProjectReference
 	{

Modified: incubator/nmaven/branches/SI_IDE/assemblies/NMaven.Core/src/main/csharp/Core/Impl/ProjectGeneratorImpl.cs
URL: http://svn.apache.org/viewvc/incubator/nmaven/branches/SI_IDE/assemblies/NMaven.Core/src/main/csharp/Core/Impl/ProjectGeneratorImpl.cs?view=diff&rev=512624&r1=512623&r2=512624
==============================================================================
--- incubator/nmaven/branches/SI_IDE/assemblies/NMaven.Core/src/main/csharp/Core/Impl/ProjectGeneratorImpl.cs (original)
+++ incubator/nmaven/branches/SI_IDE/assemblies/NMaven.Core/src/main/csharp/Core/Impl/ProjectGeneratorImpl.cs Tue Feb 27 22:44:43 2007
@@ -1,3 +1,22 @@
+//
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+//
+
 using System;
 using NMaven.Core;
 using NMaven.Model;
@@ -11,11 +30,14 @@
 namespace NMaven.Core.Impl
 {
 	/// <summary>
-	/// Description of ProjectGeneratorImpl.
+	/// Implementation of the IProjectGenerator.
 	/// </summary>
 	public class ProjectGeneratorImpl : IProjectGenerator
 	{
 		
+        /// <summary>
+        /// Constructor
+        /// </summary>
 		public ProjectGeneratorImpl()
 		{
 		}
@@ -28,7 +50,7 @@
 			Guid projectGuid = Guid.NewGuid();
 			
 			if(projectReferences == null) projectReferences = new List<IProjectReference>();
-			Project project = getProjectFromPomModel(model, 
+			Project project = GetProjectFromPomModel(model, 
 			                                         sourceFileDirectory,
 			                                         projectFileName, 
 			                                         projectGuid,
@@ -89,7 +111,19 @@
 		}
 		
 
-		private Project getProjectFromPomModel(NMaven.Model.Model model, 
+        /// <summary>
+        /// Returns a project binding (xmlns="http://schemas.microsoft.com/developer/msbuild/2003") from the given model 
+        /// (pom.xml) file
+        /// </summary>
+        /// <param name="model">the model binding for a pom.xml file</param>
+        /// <param name="sourceFileDirectory">the directory containing the source files</param>
+        /// <param name="assemblyName">the name of the assembly: often corresponds to the artifact id from the pom</param>
+        /// <param name="projectGuid">the GUID of the project</param>
+        /// <param name="assemblyOutputPath">directory where the IDE output files are placed</param>
+        /// <param name="baseIntermediateOutputPath">directory where the IDE output files are placed</param>
+        /// <param name="projectReferences">references to other projects that this project is dependent upon</param>
+        /// <returns>Returns a project binding for the specified model</returns>
+		private Project GetProjectFromPomModel(NMaven.Model.Model model, 
 		                                       DirectoryInfo sourceFileDirectory,
 		                                       string assemblyName,
 		                                       Guid projectGuid,
@@ -225,8 +259,7 @@
             		DirectoryInfo fileInfo = new DirectoryInfo(@"C:\WINDOWS\assembly\GAC_MSIL\" + dependency);
             		if(fileInfo.Exists) {
             			group.AddNewItem("Reference", dependency);	
-            		} else 
-            			Console.WriteLine("FNE: " + fileInfo.FullName);
+            		} 
             	}
             	catch(Exception e) 
             	{

Modified: incubator/nmaven/branches/SI_IDE/assemblies/NMaven.Core/src/main/csharp/Core/Impl/ProjectReferenceImpl.cs
URL: http://svn.apache.org/viewvc/incubator/nmaven/branches/SI_IDE/assemblies/NMaven.Core/src/main/csharp/Core/Impl/ProjectReferenceImpl.cs?view=diff&rev=512624&r1=512623&r2=512624
==============================================================================
--- incubator/nmaven/branches/SI_IDE/assemblies/NMaven.Core/src/main/csharp/Core/Impl/ProjectReferenceImpl.cs (original)
+++ incubator/nmaven/branches/SI_IDE/assemblies/NMaven.Core/src/main/csharp/Core/Impl/ProjectReferenceImpl.cs Tue Feb 27 22:44:43 2007
@@ -1,3 +1,22 @@
+//
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+//
+
 using System;
 using System.IO;
 

Modified: incubator/nmaven/branches/SI_IDE/assemblies/NMaven.Plugin.Resx/src/main/csharp/Plugin/Resx/MimeType.cs
URL: http://svn.apache.org/viewvc/incubator/nmaven/branches/SI_IDE/assemblies/NMaven.Plugin.Resx/src/main/csharp/Plugin/Resx/MimeType.cs?view=diff&rev=512624&r1=512623&r2=512624
==============================================================================
--- incubator/nmaven/branches/SI_IDE/assemblies/NMaven.Plugin.Resx/src/main/csharp/Plugin/Resx/MimeType.cs (original)
+++ incubator/nmaven/branches/SI_IDE/assemblies/NMaven.Plugin.Resx/src/main/csharp/Plugin/Resx/MimeType.cs Tue Feb 27 22:44:43 2007
@@ -1,17 +1,20 @@
 //
-//  Copyright 2006 Shane Isbell
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
 //
-//  Licensed under the Apache License, Version 2.0 (the "License");
-//  you may not use this file except in compliance with the License.
-//  You may obtain a copy of the License at
+//   http://www.apache.org/licenses/LICENSE-2.0
 //
-//      http://www.apache.org/licenses/LICENSE-2.0
-//
-//  Unless required by applicable law or agreed to in writing, software
-//  distributed under the License is distributed on an "AS IS" BASIS,
-//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-//  See the License for the specific language governing permissions and
-//  limitations under the License.
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
 //
 
 using System;

Modified: incubator/nmaven/branches/SI_IDE/assemblies/NMaven.Plugin.Resx/src/main/csharp/Plugin/Resx/ResX.cs
URL: http://svn.apache.org/viewvc/incubator/nmaven/branches/SI_IDE/assemblies/NMaven.Plugin.Resx/src/main/csharp/Plugin/Resx/ResX.cs?view=diff&rev=512624&r1=512623&r2=512624
==============================================================================
--- incubator/nmaven/branches/SI_IDE/assemblies/NMaven.Plugin.Resx/src/main/csharp/Plugin/Resx/ResX.cs (original)
+++ incubator/nmaven/branches/SI_IDE/assemblies/NMaven.Plugin.Resx/src/main/csharp/Plugin/Resx/ResX.cs Tue Feb 27 22:44:43 2007
@@ -1,17 +1,20 @@
 //
-//  Copyright 2006 Shane Isbell
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
 //
-//  Licensed under the Apache License, Version 2.0 (the "License");
-//  you may not use this file except in compliance with the License.
-//  You may obtain a copy of the License at
+//   http://www.apache.org/licenses/LICENSE-2.0
 //
-//      http://www.apache.org/licenses/LICENSE-2.0
-//
-//  Unless required by applicable law or agreed to in writing, software
-//  distributed under the License is distributed on an "AS IS" BASIS,
-//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-//  See the License for the specific language governing permissions and
-//  limitations under the License.
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
 //
 
 using System;

Modified: incubator/nmaven/branches/SI_IDE/assemblies/NMaven.Plugin.Settings/src/main/csharp/Plugin/Settings/ExecutionException.cs
URL: http://svn.apache.org/viewvc/incubator/nmaven/branches/SI_IDE/assemblies/NMaven.Plugin.Settings/src/main/csharp/Plugin/Settings/ExecutionException.cs?view=diff&rev=512624&r1=512623&r2=512624
==============================================================================
--- incubator/nmaven/branches/SI_IDE/assemblies/NMaven.Plugin.Settings/src/main/csharp/Plugin/Settings/ExecutionException.cs (original)
+++ incubator/nmaven/branches/SI_IDE/assemblies/NMaven.Plugin.Settings/src/main/csharp/Plugin/Settings/ExecutionException.cs Tue Feb 27 22:44:43 2007
@@ -1,17 +1,20 @@
 //
-//  Copyright 2006 Shane Isbell
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
 //
-//  Licensed under the Apache License, Version 2.0 (the "License");
-//  you may not use this file except in compliance with the License.
-//  You may obtain a copy of the License at
+//   http://www.apache.org/licenses/LICENSE-2.0
 //
-//      http://www.apache.org/licenses/LICENSE-2.0
-//
-//  Unless required by applicable law or agreed to in writing, software
-//  distributed under the License is distributed on an "AS IS" BASIS,
-//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-//  See the License for the specific language governing permissions and
-//  limitations under the License.
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
 //
 
 using System;

Modified: incubator/nmaven/branches/SI_IDE/assemblies/NMaven.Plugin.Settings/src/main/csharp/Plugin/Settings/SettingsGenerator.cs
URL: http://svn.apache.org/viewvc/incubator/nmaven/branches/SI_IDE/assemblies/NMaven.Plugin.Settings/src/main/csharp/Plugin/Settings/SettingsGenerator.cs?view=diff&rev=512624&r1=512623&r2=512624
==============================================================================
--- incubator/nmaven/branches/SI_IDE/assemblies/NMaven.Plugin.Settings/src/main/csharp/Plugin/Settings/SettingsGenerator.cs (original)
+++ incubator/nmaven/branches/SI_IDE/assemblies/NMaven.Plugin.Settings/src/main/csharp/Plugin/Settings/SettingsGenerator.cs Tue Feb 27 22:44:43 2007
@@ -1,17 +1,20 @@
 //
-//  Copyright 2006 Shane Isbell
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
 //
-//  Licensed under the Apache License, Version 2.0 (the "License");
-//  you may not use this file except in compliance with the License.
-//  You may obtain a copy of the License at
+//   http://www.apache.org/licenses/LICENSE-2.0
 //
-//      http://www.apache.org/licenses/LICENSE-2.0
-//
-//  Unless required by applicable law or agreed to in writing, software
-//  distributed under the License is distributed on an "AS IS" BASIS,
-//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-//  See the License for the specific language governing permissions and
-//  limitations under the License.
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
 //
 
 using System;

Modified: incubator/nmaven/branches/SI_IDE/assemblies/NMaven.Plugin.Solution/src/main/csharp/Plugin/Solution/SolutionPlugin.cs
URL: http://svn.apache.org/viewvc/incubator/nmaven/branches/SI_IDE/assemblies/NMaven.Plugin.Solution/src/main/csharp/Plugin/Solution/SolutionPlugin.cs?view=diff&rev=512624&r1=512623&r2=512624
==============================================================================
--- incubator/nmaven/branches/SI_IDE/assemblies/NMaven.Plugin.Solution/src/main/csharp/Plugin/Solution/SolutionPlugin.cs (original)
+++ incubator/nmaven/branches/SI_IDE/assemblies/NMaven.Plugin.Solution/src/main/csharp/Plugin/Solution/SolutionPlugin.cs Tue Feb 27 22:44:43 2007
@@ -1,3 +1,22 @@
+//
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+//
+
 using System;
 using System.Collections.Generic;
 using System.IO;
@@ -15,7 +34,7 @@
 		{
 		}
 
-		private string[] getModulesForProfile(string profile,  NMaven.Model.Model model)
+		private string[] GetModulesForProfile(string profile,  NMaven.Model.Model model)
 		{
 			NMaven.Model.Profile[] profiles = model.profiles;
 			if(profiles == null)
@@ -23,7 +42,6 @@
 			
 			foreach(NMaven.Model.Profile p in profiles)
 			{
-				Console.WriteLine( p.activation.property.name.ToString() );
 				if(p.activation.property.name.Equals(profile))
 				{
 					return p.modules;
@@ -32,7 +50,7 @@
 			return model.modules;
         }
 		
-		public List<IProjectReference> execute(DirectoryInfo currentDirectory, NMaven.Model.Model model, string profile)
+		public List<IProjectReference> Execute(DirectoryInfo currentDirectory, NMaven.Model.Model model, string profile)
 		{	
 			if(model == null)
 			{
@@ -52,12 +70,12 @@
 			IProjectGenerator projectGenerator = new ProjectGeneratorImpl();
 			if(model.packaging.Equals("pom"))
 			{
-				foreach(String module in getModulesForProfile(profile, model))
+				foreach(String module in GetModulesForProfile(profile, model))
 				{
 					DirectoryInfo newDir = new DirectoryInfo(currentDirectory.FullName + @"\" + module );
 					Console.WriteLine("NMAVEN-000-000: Generating model for pom: File Name = " + newDir.FullName + @"\pom.xml");
 					NMaven.Model.Model m = projectGenerator.createPomModelFor(newDir.FullName + @"\pom.xml");
-					projectReferences.AddRange(execute(newDir, m, profile));
+					projectReferences.AddRange(Execute(newDir, m, profile));
 				}					   	
 			} 
 			else
@@ -90,13 +108,30 @@
 		
 		public static void Main(string[] args)
 		{
+            SolutionPlugin plugin = new SolutionPlugin();
+            string pomFile = plugin.GetArgFor("pomFile", args);
+            if (pomFile == null) pomFile = "pom.xml";
+
+            string profile = plugin.GetArgFor("profile", args); ;
+
 			IProjectGenerator projectGenerator = new ProjectGeneratorImpl();
-			NMaven.Model.Model rootPom = projectGenerator.createPomModelFor("pom.xml");	
-			
-			SolutionPlugin plugin = new SolutionPlugin();
-			List<IProjectReference> projectReferences = plugin.execute(new DirectoryInfo(Environment.CurrentDirectory), 
-			                                                           rootPom, "withIde");
-		 	projectGenerator.generateSolutionFor(new FileInfo(@"test-1.sln"), projectReferences);			
+			NMaven.Model.Model rootPom = projectGenerator.createPomModelFor(pomFile);	
+				
+
+			List<IProjectReference> projectReferences = plugin.Execute(new DirectoryInfo(Environment.CurrentDirectory), 
+			                                                           rootPom, profile);
+		 	projectGenerator.generateSolutionFor(new FileInfo(@rootPom.artifactId + "." + profile + ".sln"), projectReferences);			
+		}
+		
+		private string GetArgFor(string name, string[] args)
+		{
+			char[] delim = {'='};
+			foreach(string arg in args)
+			{
+                string[] tokens = arg.Split(delim);
+                if (tokens[0].Equals(name)) return tokens[1];
+			}
+            return null;
 		}
 	}
 }