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/11/16 17:19:59 UTC
svn commit: r1202791 [2/3] - in /incubator/npanday/trunk: dotnet/assemblies/
dotnet/assemblies/NPanday.Artifact/
dotnet/assemblies/NPanday.Artifact/src/main/csharp/
dotnet/assemblies/NPanday.Artifact/src/main/csharp/NPanday/Artifact/
dotnet/assemblies/...
Modified: incubator/npanday/trunk/dotnet/assemblies/NPanday.ProjectImporter/Engine/src/test/csharp/NPanday.ProjectImporterEngine-Test.csproj
URL: http://svn.apache.org/viewvc/incubator/npanday/trunk/dotnet/assemblies/NPanday.ProjectImporter/Engine/src/test/csharp/NPanday.ProjectImporterEngine-Test.csproj?rev=1202791&r1=1202790&r2=1202791&view=diff
==============================================================================
--- incubator/npanday/trunk/dotnet/assemblies/NPanday.ProjectImporter/Engine/src/test/csharp/NPanday.ProjectImporterEngine-Test.csproj (original)
+++ incubator/npanday/trunk/dotnet/assemblies/NPanday.ProjectImporter/Engine/src/test/csharp/NPanday.ProjectImporterEngine-Test.csproj Wed Nov 16 17:19:58 2011
@@ -39,14 +39,6 @@ under the License.
<OutputPath>..\..\..\target\</OutputPath>
</PropertyGroup>
<ItemGroup>
- <Reference Include="NPanday.ProjectImporterEngine, Version=1.2.0.0, Culture=neutral, processorArchitecture=MSIL">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\..\target\NPanday.ProjectImporterEngine.dll</HintPath>
- </Reference>
- <Reference Include="NPanday.Utils, Version=0.14.0.0, Culture=neutral, processorArchitecture=MSIL">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\..\..\..\NPanday.Utils\target\NPanday.Utils.dll</HintPath>
- </Reference>
<Reference Include="NUnit.Framework">
<HintPath>C:\Documents and Settings\user\.m2\uac\gac_msil\NUnit.Framework\2.2.8.0__NUnit\NUnit.Framework.dll</HintPath>
</Reference>
@@ -74,6 +66,15 @@ under the License.
<Compile Include="ImporterTests\SingleModuleCSharpTest.cs" />
<Compile Include="ImporterTests\WebSiteWithCSharpProjectFile.cs" />
</ItemGroup>
- <ItemGroup />
+ <ItemGroup>
+ <ProjectReference Include="..\..\..\..\..\NPanday.Utils\src\main\csharp\NPanday.Utils.csproj">
+ <Project>{CAA4864F-F4C8-4024-8535-8B8C112307CE}</Project>
+ <Name>NPanday.Utils</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\..\main\csharp\NPanday.ProjectImporterEngine.csproj">
+ <Project>{91FC215D-C041-4000-8F71-C04A9EEABE55}</Project>
+ <Name>NPanday.ProjectImporterEngine</Name>
+ </ProjectReference>
+ </ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.Targets" />
</Project>
\ No newline at end of file
Modified: incubator/npanday/trunk/dotnet/assemblies/NPanday.Utils/pom.xml
URL: http://svn.apache.org/viewvc/incubator/npanday/trunk/dotnet/assemblies/NPanday.Utils/pom.xml?rev=1202791&r1=1202790&r2=1202791&view=diff
==============================================================================
--- incubator/npanday/trunk/dotnet/assemblies/NPanday.Utils/pom.xml (original)
+++ incubator/npanday/trunk/dotnet/assemblies/NPanday.Utils/pom.xml Wed Nov 16 17:19:58 2011
@@ -43,29 +43,44 @@
</dependency>
<dependency>
<groupId>org.apache.npanday</groupId>
- <artifactId>NPanday.Artifact</artifactId>
- <version>1.4.1-incubating-SNAPSHOT</version>
- <type>library</type>
- </dependency>
- <dependency>
- <groupId>org.apache.npanday</groupId>
<artifactId>NPanday.Model.Settings</artifactId>
<version>1.4.1-incubating-SNAPSHOT</version>
<type>library</type>
- </dependency>
- <dependency>
- <groupId>EnvDTE</groupId>
- <artifactId>EnvDTE</artifactId>
- <version>8.0.0.0</version>
- <type>gac</type>
- <classifier>b03f5f7f11d50a3a</classifier>
- </dependency>
- <dependency>
- <groupId>EnvDTE80</groupId>
- <artifactId>EnvDTE80</artifactId>
- <version>8.0.0.0</version>
- <type>gac</type>
- <classifier>b03f5f7f11d50a3a</classifier>
- </dependency>
+ </dependency>
+ <dependency>
+ <groupId>NUnit</groupId>
+ <artifactId>NUnit.Framework</artifactId>
+ <version>2.2.8.0</version>
+ <type>library</type>
+ <scope>test</scope>
+ </dependency>
</dependencies>
+ <profiles>
+ <profile>
+ <id>partcover</id>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.npanday.plugins</groupId>
+ <artifactId>partcover-maven-plugin</artifactId>
+ <configuration>
+ <!--<nUnit>C:\\Program Files\\NUnit 2.5.7\\bin\net-2.0\\nunit-console.exe</nUnit>-->
+ <!--<partCover>C:\\Program Files\PartCover\\PartCover .NET 4.0\\PartCover.exe</partCover>-->
+ <assemblyName>${project.build.directory}/test-assemblies/NPanday.Utils-test.dll</assemblyName>
+ <!--<msxsl>C:\\WINDOWS\\msxsl.exe</msxsl>-->
+ <!--<xslt>C:\\Program Files\\PartCover\\PartCover .NET 4.0\\xslt\\Report By Assembly.xslt"<xslt>-->
+ </configuration>
+ <executions>
+ <execution>
+ <goals>
+ <goal>generate</goal>
+ <goal>convert</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ </profiles>
</project>
Modified: incubator/npanday/trunk/dotnet/assemblies/NPanday.Utils/src/main/csharp/NPanday.Utils.csproj
URL: http://svn.apache.org/viewvc/incubator/npanday/trunk/dotnet/assemblies/NPanday.Utils/src/main/csharp/NPanday.Utils.csproj?rev=1202791&r1=1202790&r2=1202791&view=diff
==============================================================================
--- incubator/npanday/trunk/dotnet/assemblies/NPanday.Utils/src/main/csharp/NPanday.Utils.csproj (original)
+++ incubator/npanday/trunk/dotnet/assemblies/NPanday.Utils/src/main/csharp/NPanday.Utils.csproj Wed Nov 16 17:19:58 2011
@@ -34,25 +34,11 @@ under the License.
<OutputPath>..\..\..\target\</OutputPath>
</PropertyGroup>
<ItemGroup>
- <Reference Include="EnvDTE">
- <HintPath>C:\Documents and Settings\Melvin Sembrano\.m2\uac\gac_msil\EnvDTE\8.0.0.0__EnvDTE\EnvDTE</HintPath>
- </Reference>
- <Reference Include="EnvDTE80">
- <HintPath>C:\Documents and Settings\Melvin Sembrano\.m2\uac\gac_msil\EnvDTE80\8.0.0.0__EnvDTE80\EnvDTE80</HintPath>
- </Reference>
- <Reference Include="Extensibility">
- <HintPath>C:\Documents and Settings\Melvin Sembrano\.m2\uac\gac_msil\Extensibility\7.0.3300.0__Extensibility\Extensibility</HintPath>
- </Reference>
- <Reference Include="Microsoft.Build.Engine" />
- <Reference Include="Microsoft.VisualStudio.CommandBars">
- <HintPath>C:\Documents and Settings\Melvin Sembrano\.m2\uac\gac_msil\Microsoft.VisualStudio.CommandBars\8.0.0.0__Microsoft.VisualStudio.CommandBars\Microsoft.VisualStudio.CommandBars</HintPath>
- </Reference>
<Reference Include="NPanday.Model.Pom, Version=0.14.0.0, Culture=neutral, PublicKeyToken=4b435f4d76e2f0e6, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\NPanday.Model.Pom\target\NPanday.Model.Pom.dll</HintPath>
</Reference>
- <Reference Include="NPanday.Model.Settings, Version=0.14.0.0, Culture=neutral, processorArchitecture=MSIL">
- <SpecificVersion>False</SpecificVersion>
+ <Reference Include="NPanday.Model.Settings">
<HintPath>..\..\..\..\NPanday.Model.Settings\target\NPanday.Model.Settings.dll</HintPath>
</Reference>
<Reference Include="System" />
@@ -63,18 +49,16 @@ under the License.
</ItemGroup>
<ItemGroup>
<Compile Include="NPanday\Utils\GacUtility.cs" />
- <Compile Include="NPanday\Utils\MavenRunner.cs" />
+ <Compile Include="NPanday\Utils\ConstantNamespaceXmlTextReader.cs" />
<Compile Include="NPanday\Utils\PomHelperUtility.cs" />
<Compile Include="NPanday\Utils\RepositoryUtility.cs" />
<Compile Include="NPanday\Utils\RspUtility.cs" />
+ <Compile Include="NPanday\Utils\PathUtility.cs" />
+ <Compile Include="NPanday\Utils\SettingsUtil.cs" />
</ItemGroup>
<ItemGroup />
<ItemGroup />
<ItemGroup>
- <ProjectReference Include="..\..\..\..\NPanday.Artifact\src\main\csharp\NPanday.Artifact.csproj">
- <Project>{701803D4-90F5-44D7-919D-4844FEB7F936}</Project>
- <Name>NPanday.Artifact</Name>
- </ProjectReference>
<ProjectReference Include="..\..\..\..\NPanday.Logging\src\main\csharp\NPanday.Logging.csproj">
<Project>{C511B03B-8AB7-4E61-9F6E-5E6F9F65E8CE}</Project>
<Name>NPanday.Logging</Name>
Added: incubator/npanday/trunk/dotnet/assemblies/NPanday.Utils/src/main/csharp/NPanday/Utils/ConstantNamespaceXmlTextReader.cs
URL: http://svn.apache.org/viewvc/incubator/npanday/trunk/dotnet/assemblies/NPanday.Utils/src/main/csharp/NPanday/Utils/ConstantNamespaceXmlTextReader.cs?rev=1202791&view=auto
==============================================================================
--- incubator/npanday/trunk/dotnet/assemblies/NPanday.Utils/src/main/csharp/NPanday/Utils/ConstantNamespaceXmlTextReader.cs (added)
+++ incubator/npanday/trunk/dotnet/assemblies/NPanday.Utils/src/main/csharp/NPanday/Utils/ConstantNamespaceXmlTextReader.cs Wed Nov 16 17:19:58 2011
@@ -0,0 +1,47 @@
+using System;
+using System.Xml;
+
+namespace NPanday.Utils
+{
+ /// <summary>
+ /// An XmlTextReader that overrides the namespaces to always be empty, effectively ignoring them when deserializing
+ /// This avoids inconsistencies in Maven settings.xml files that sometimes include the namespace declaration and
+ /// sometimes omit it.
+ /// </summary>
+ /// <seealso cref="http://stackoverflow.com/questions/870293/can-i-make-xmlserializer-ignore-the-namespace-on-deserialization"/>
+ public class ConstantNamespaceXmlTextReader : XmlTextReader
+ {
+ private readonly string _fromNs;
+ private readonly string _toNs;
+
+ public ConstantNamespaceXmlTextReader(System.IO.TextReader reader, string fromNs, string toNs)
+ : base(reader)
+ {
+ _fromNs = fromNs;
+ _toNs = toNs;
+ }
+
+ public override string NamespaceURI
+ {
+ get
+ {
+ if (base.NamespaceURI == _fromNs)
+ return _toNs;
+
+ return base.NamespaceURI;
+ }
+ }
+
+ public override string Value
+ {
+ get
+ {
+ if (base.Value == _fromNs)
+ {
+ return _toNs;
+ }
+ return base.Value;
+ }
+ }
+ }
+}
\ No newline at end of file
Added: incubator/npanday/trunk/dotnet/assemblies/NPanday.Utils/src/main/csharp/NPanday/Utils/PathUtility.cs
URL: http://svn.apache.org/viewvc/incubator/npanday/trunk/dotnet/assemblies/NPanday.Utils/src/main/csharp/NPanday/Utils/PathUtility.cs?rev=1202791&view=auto
==============================================================================
--- incubator/npanday/trunk/dotnet/assemblies/NPanday.Utils/src/main/csharp/NPanday/Utils/PathUtility.cs (added)
+++ incubator/npanday/trunk/dotnet/assemblies/NPanday.Utils/src/main/csharp/NPanday/Utils/PathUtility.cs Wed Nov 16 17:19:58 2011
@@ -0,0 +1,71 @@
+using System;
+using System.Collections.Generic;
+using System.IO;
+
+namespace NPanday.Utils
+{
+ /// <summary>
+ /// Whereever NPanday needs to construct or parse a file or directory path, it should happen here.
+ /// </summary>
+ public class PathUtility
+ {
+ /// <summary>
+ /// Usually all maven projects must have a pom.xml. You can specify a different name
+ /// via a command line parameter, though.
+ /// </summary>
+ public static readonly string DefaultPomFileName = "pom.xml";
+
+ /// <summary>
+ /// Instead of using this constant, we rather find a way to get the build directory from
+ /// the pom, as it can be overridden there.
+ /// </summary>
+ public static readonly string DefaultBuildDirectoryName = "target";
+
+ /// <summary>
+ /// Tries to find the project root for the given file or directory, by locating the first pom.xml on the way up.
+ /// </summary>
+ public static DirectoryInfo FindProjectRoot(FileSystemInfo projectFileOrDirectory)
+ {
+ DirectoryInfo projectRoot;
+ if (TryFindProjectRoot(projectFileOrDirectory, out projectRoot))
+ {
+ return projectRoot;
+ }
+ else
+ {
+ throw new Exception("Could not find project root for " + projectFileOrDirectory.FullName);
+ }
+ }
+
+ public static bool TryFindProjectRoot(FileSystemInfo projectFileOrDirectory, out DirectoryInfo projectRoot)
+ {
+ if (projectFileOrDirectory == null) throw new ArgumentNullException("projectFileOrDirectory");
+
+ DirectoryInfo directory = projectFileOrDirectory as DirectoryInfo;
+
+ if (directory == null)
+ {
+ directory = ((FileInfo)projectFileOrDirectory).Directory;
+ }
+
+ if (directory.GetFiles(DefaultPomFileName).Length == 1)
+ {
+ projectRoot = directory;
+ return true;
+ }
+
+ if (directory.Parent == null)
+ {
+ projectRoot = null;
+ return false;
+ }
+
+ return TryFindProjectRoot(directory.Parent, out projectRoot);
+ }
+
+ public static DirectoryInfo GetBuildDirectory(DirectoryInfo projectRoot)
+ {
+ return new DirectoryInfo(Path.Combine(projectRoot.FullName, DefaultBuildDirectoryName));
+ }
+ }
+}
\ No newline at end of file
Modified: incubator/npanday/trunk/dotnet/assemblies/NPanday.Utils/src/main/csharp/NPanday/Utils/PomHelperUtility.cs
URL: http://svn.apache.org/viewvc/incubator/npanday/trunk/dotnet/assemblies/NPanday.Utils/src/main/csharp/NPanday/Utils/PomHelperUtility.cs?rev=1202791&r1=1202790&r2=1202791&view=diff
==============================================================================
--- incubator/npanday/trunk/dotnet/assemblies/NPanday.Utils/src/main/csharp/NPanday/Utils/PomHelperUtility.cs (original)
+++ incubator/npanday/trunk/dotnet/assemblies/NPanday.Utils/src/main/csharp/NPanday/Utils/PomHelperUtility.cs Wed Nov 16 17:19:58 2011
@@ -27,13 +27,11 @@ using System.Xml;
using System.Xml.Serialization;
using System.Xml.XPath;
-using NPanday.Artifact;
using NPanday.Logging;
using NPanday.Model.Pom;
-using NPanday.Model.Setting;
+using NPanday.Model.Settings;
using System.Windows.Forms;
-using EnvDTE;
namespace NPanday.Utils
{
@@ -45,11 +43,11 @@ namespace NPanday.Utils
RspUtility rspUtil = new RspUtility();
- public PomHelperUtility(Solution solution, Project project)
+ public PomHelperUtility(FileInfo solutionFile, FileInfo projectFile)
{
FileInfo pomFile = PomHelperUtility.FindPomFileUntil(
- new FileInfo(project.FullName).Directory,
- new FileInfo(solution.FileName).Directory);
+ solutionFile.Directory,
+ projectFile.Directory);
this.pom = pomFile;
}
@@ -111,8 +109,8 @@ namespace NPanday.Utils
}
}
- public bool HasPlugin(string pluginGroupId,string pluginArtifactId)
- {
+ public bool HasPlugin(string pluginGroupId, string pluginArtifactId)
+ {
NPanday.Model.Pom.Model model = ReadPomAsModel();
foreach (Plugin plugin in model.build.plugins)
@@ -126,7 +124,7 @@ namespace NPanday.Utils
return false;
}
- public void AddPlugin(string groupId, string artifactId, string version, bool extensions,PluginConfiguration pluginConf)
+ public void AddPlugin(string groupId, string artifactId, string version, bool extensions, PluginConfiguration pluginConf)
{
NPanday.Model.Pom.Model model = ReadPomAsModel();
@@ -142,7 +140,7 @@ namespace NPanday.Utils
plugin.artifactId = artifactId;
plugin.version = version;
plugin.extensions = extensions;
-
+
if (pluginConf != null)
{
plugin.configuration = pluginConf;
@@ -307,7 +305,7 @@ namespace NPanday.Utils
return PomHelperUtility.ReadPomAsModel(pomfile, null);
}
- public static NPanday.Model.Pom.Model ReadPomAsModel(FileInfo pomfile, NPanday.Logging.Logger logger)
+ public static NPanday.Model.Pom.Model ReadPomAsModel(FileInfo pomfile, NPanday.Logging.Logger logger)
{
if (!pomfile.Exists)
{
@@ -354,14 +352,14 @@ namespace NPanday.Utils
if (reader != null)
{
reader.Close();
- ((IDisposable) reader).Dispose();
+ ((IDisposable)reader).Dispose();
}
}
catch
{
if (logger != null)
{
- logger.Log(NPanday.Logging.Level.WARNING, "Failed to close stream reader after accessing pom.xml.");
+ logger.Log(NPanday.Logging.Level.WARNING, "Failed to close stream reader after accessing pom.xml.");
}
}
@@ -375,7 +373,7 @@ namespace NPanday.Utils
PomHelperUtility.WriteModelToPom(this.pom, model);
}
- public bool IsWebReferenceEmpty()
+ public bool IsWebReferenceEmpty()
{
string[] directories;
if (Directory.Exists(pom.DirectoryName + "/Web References"))
@@ -391,7 +389,7 @@ namespace NPanday.Utils
return isEmpty;
}
- public void DeletePlugin(Plugin plugin)
+ public void DeletePlugin(Plugin plugin)
{
NPanday.Model.Pom.Model model = ReadPomAsModel();
List<NPanday.Model.Pom.Plugin> plugins = new List<NPanday.Model.Pom.Plugin>();
@@ -409,17 +407,17 @@ namespace NPanday.Utils
model.build.plugins = plugins.ToArray();
WriteModelToPom(model);
-
+
}
-
+
public static void WriteModelToPom(FileInfo pomFile, NPanday.Model.Pom.Model model)
{
PomHelperUtility.WriteModelToPom(pomFile, model, null);
}
public static void WriteModelToPom(FileInfo pomFile, NPanday.Model.Pom.Model model, NPanday.Logging.Logger logger)
- {
- if (!pomFile.Directory.Exists)
+ {
+ if (!pomFile.Directory.Exists)
{
pomFile.Directory.Create();
}
@@ -441,7 +439,7 @@ namespace NPanday.Utils
try
{
writer = new StreamWriter(pomFile.FullName);
- serializer =new XmlSerializer(typeof(NPanday.Model.Pom.Model));
+ serializer = new XmlSerializer(typeof(NPanday.Model.Pom.Model));
serializer.Serialize(writer, model);
}
catch
@@ -465,7 +463,7 @@ namespace NPanday.Utils
logger.Log(NPanday.Logging.Level.WARNING, "Failed to close stream writer after writing to pom.xml.");
}
}
-
+
}
}
@@ -811,13 +809,13 @@ namespace NPanday.Utils
public void AddPomDependency(NPanday.Model.Pom.Dependency dependency)
{
-
+
if ("vb".Equals(NPandayCompilerPluginLanguage))
{
if (rspUtil.IsVbcRspIncluded(dependency.artifactId))
return;
}
- else
+ else
{
if (rspUtil.IsCscRspIncluded((dependency.artifactId)))
return;
@@ -1151,57 +1149,57 @@ namespace NPanday.Utils
}
- public void AddMavenCompilePluginConfiguration(string pluginGroupId,string pluginArtifactId, string confPropCollection,string confProp, string confPropVal)
+ public void AddMavenCompilePluginConfiguration(string pluginGroupId, string pluginArtifactId, string confPropCollection, string confProp, string confPropVal)
{
NPanday.Model.Pom.Model model = ReadPomAsModel();
-
- foreach (Plugin plugin in model.build.plugins)
- {
- XmlDocument xmlDocument = new XmlDocument();
- if (pluginGroupId.Equals(plugin.groupId.ToLower(), StringComparison.InvariantCultureIgnoreCase)
- && pluginArtifactId.Equals(plugin.artifactId.ToLower(), StringComparison.InvariantCultureIgnoreCase))
+ foreach (Plugin plugin in model.build.plugins)
+ {
+ XmlDocument xmlDocument = new XmlDocument();
+
+ if (pluginGroupId.Equals(plugin.groupId.ToLower(), StringComparison.InvariantCultureIgnoreCase)
+ && pluginArtifactId.Equals(plugin.artifactId.ToLower(), StringComparison.InvariantCultureIgnoreCase))
+ {
+ if (plugin.configuration == null && plugin.configuration.Any == null)
{
- if (plugin.configuration == null && plugin.configuration.Any == null)
- {
- return;
- }
- XmlElement[] elems = ((XmlElement[])plugin.configuration.Any);
- for (int count = elems.Length; count-- > 0; )
+ return;
+ }
+ XmlElement[] elems = ((XmlElement[])plugin.configuration.Any);
+ for (int count = elems.Length; count-- > 0; )
+ {
+ if (confPropCollection.Equals(elems[count].Name))
{
- if (confPropCollection.Equals(elems[count].Name))
- {
- XmlElement elem = xmlDocument.CreateElement(confPropCollection, @"http://maven.apache.org/POM/4.0.0");
+ XmlElement elem = xmlDocument.CreateElement(confPropCollection, @"http://maven.apache.org/POM/4.0.0");
- //Loop throught existing item and
- //append everything including the newly added item
- foreach (XmlNode n in elems[count].ChildNodes)
+ //Loop throught existing item and
+ //append everything including the newly added item
+ foreach (XmlNode n in elems[count].ChildNodes)
+ {
+ if (confProp.Equals(n.Name))
{
- if (confProp.Equals(n.Name))
- {
- XmlNode node = xmlDocument.CreateNode(XmlNodeType.Element, n.Name, @"http://maven.apache.org/POM/4.0.0");
- node.InnerText = n.InnerText.Replace("\\", "/");
- elem.AppendChild(node);
- }
+ XmlNode node = xmlDocument.CreateNode(XmlNodeType.Element, n.Name, @"http://maven.apache.org/POM/4.0.0");
+ node.InnerText = n.InnerText.Replace("\\", "/");
+ elem.AppendChild(node);
}
+ }
- XmlNode nodeAdded = xmlDocument.CreateNode(XmlNodeType.Element, confProp, @"http://maven.apache.org/POM/4.0.0");
+ XmlNode nodeAdded = xmlDocument.CreateNode(XmlNodeType.Element, confProp, @"http://maven.apache.org/POM/4.0.0");
- nodeAdded.InnerText = confPropVal.Replace("\\", "/");
- if (!elems[count].InnerXml.Contains(nodeAdded.InnerText))
- {
- elem.AppendChild(nodeAdded);
- }
- elems[count] = elem;
-
- break;
+ nodeAdded.InnerText = confPropVal.Replace("\\", "/");
+ if (!elems[count].InnerXml.Contains(nodeAdded.InnerText))
+ {
+ elem.AppendChild(nodeAdded);
}
+ elems[count] = elem;
+
+ break;
}
}
}
+ }
+
+ WriteModelToPom(model);
- WriteModelToPom(model);
-
}
public void RenameMavenCompilePluginConfiguration(string pluginGroupId, string pluginArtifactId, string confPropCollection, string confProp, string confPropVal, string newPropVal)
@@ -1245,7 +1243,7 @@ namespace NPanday.Utils
elem.AppendChild(node);
}
}
-
+
elems[count] = elem;
break;
@@ -1306,8 +1304,8 @@ namespace NPanday.Utils
}
-
-
+
+
public void AddMavenResxPluginConfiguration(string pluginGroupId, string pluginArtifactId, string confPropCollection, string confProp, string sourceFile, string resxName)
{
NPanday.Model.Pom.Model model = ReadPomAsModel();
@@ -1333,14 +1331,14 @@ namespace NPanday.Utils
//Loop throught existing item and
//append everything including the newly added item
-
-
+
+
foreach (XmlNode n in elems[count].ChildNodes)
{
if (confProp.Equals(n.Name))
{
-
+
XmlNode node = xmlDocument.CreateNode(XmlNodeType.Element, n.Name, @"http://maven.apache.org/POM/4.0.0");
XmlNodeList nList = n.ChildNodes;
foreach (XmlNode nChild in nList)
@@ -1349,13 +1347,13 @@ namespace NPanday.Utils
innerChild.InnerText = nChild.InnerText;
node.AppendChild(innerChild);
}
-
-
+
+
elem.AppendChild(node);
}
}
-
+
XmlNode confPropNode = xmlDocument.CreateNode(XmlNodeType.Element, confProp, @"http://maven.apache.org/POM/4.0.0");
XmlNode nodeSourceFile = xmlDocument.CreateNode(XmlNodeType.Element, "sourceFile", @"http://maven.apache.org/POM/4.0.0");
XmlNode nodeResxName = xmlDocument.CreateNode(XmlNodeType.Element, "name", @"http://maven.apache.org/POM/4.0.0");
@@ -1419,17 +1417,17 @@ namespace NPanday.Utils
{
innerChild.InnerText = newSourceFile;
}
- else if(nChild.InnerText.Equals(resxName) && nChild.Name.Equals("name"))
+ else if (nChild.InnerText.Equals(resxName) && nChild.Name.Equals("name"))
{
innerChild.InnerText = newResxName;
}
else
{
innerChild.InnerText = nChild.InnerText;
-
+
}
node.AppendChild(innerChild);
-
+
}
elem.AppendChild(node);
@@ -1491,10 +1489,10 @@ namespace NPanday.Utils
node.AppendChild(innerChild);
}
}
-
+
if (nChild.Name.Equals("name"))
{
- if(!nChild.InnerText.Equals(resxName))
+ if (!nChild.InnerText.Equals(resxName))
{
innerChild.InnerText = nChild.InnerText;
node.AppendChild(innerChild);
@@ -1505,7 +1503,7 @@ namespace NPanday.Utils
{
elem.AppendChild(node);
}
-
+
}
}
elems[count] = elem;
@@ -1518,7 +1516,7 @@ namespace NPanday.Utils
WriteModelToPom(model);
}
-
+
void addPluginExecution(Plugin plugin, string goal, string phase)
{
if (string.IsNullOrEmpty(goal))
@@ -1589,7 +1587,7 @@ namespace NPanday.Utils
// there is nothing to write
return;
}
-
+
if (string.IsNullOrEmpty(path))
{
// there is nothing to write
@@ -1607,7 +1605,7 @@ namespace NPanday.Utils
output = path.Substring(0, endIndex);
}
}
-
+
if (plugin.configuration == null)
{
plugin.configuration = new PluginConfiguration();
@@ -1631,9 +1629,9 @@ namespace NPanday.Utils
XmlNode nodePath = xmlDocument.CreateNode(XmlNodeType.Element, "path", @"http://maven.apache.org/POM/4.0.0");
XmlNode nodeOutput = xmlDocument.CreateNode(XmlNodeType.Element, "output", @"http://maven.apache.org/POM/4.0.0");
nodeName.InnerText = name;
- nodePath.InnerText = path != null? path.Replace("\\", "/") : path;
- nodeOutput.InnerText = output != null? output.Replace("\\", "/") : output;
-
+ nodePath.InnerText = path != null ? path.Replace("\\", "/") : path;
+ nodeOutput.InnerText = output != null ? output.Replace("\\", "/") : output;
+
node.AppendChild(nodeName);
node.AppendChild(nodePath);
node.AppendChild(nodeOutput);
@@ -1652,7 +1650,7 @@ namespace NPanday.Utils
plugin.configuration.Any = elems.ToArray();
}
-
+
XmlElement getWebReferencesElement(XmlElement[] elems, string elementName)
{
foreach (XmlElement elem in elems)
@@ -1701,7 +1699,7 @@ namespace NPanday.Utils
{
if ("includeSource".Equals(n.Name))
{
- if (n.InnerText != null && !n.InnerText.Trim().StartsWith(compareStr.Replace("\\","/")))
+ if (n.InnerText != null && !n.InnerText.Trim().StartsWith(compareStr.Replace("\\", "/")))
{
if (!n.InnerText.Contains(name))
{
@@ -1727,7 +1725,7 @@ namespace NPanday.Utils
void removeWebConfiguration(Plugin plugin, string name)
{
-
+
if (string.IsNullOrEmpty(name))
{
//nothing to remove
@@ -1739,7 +1737,7 @@ namespace NPanday.Utils
{
elems = plugin.configuration.Any;
-
+
foreach (XmlElement elem in elems)
{
XmlNode removeMe = null;
@@ -1772,12 +1770,12 @@ namespace NPanday.Utils
}
}
-
- if(isWebRefEmpty)
+
+ if (isWebRefEmpty)
{
DeletePlugin(plugin);
}
-
+
}
}
@@ -1851,7 +1849,7 @@ namespace NPanday.Utils
}
return exists;
}
-
+
//Gets the frameworkVersion of a given project and plugin
public static string GetFrameworkVersion(NPanday.Model.Pom.Model mavenProject, string pluginName)
{
@@ -1882,7 +1880,7 @@ namespace NPanday.Utils
{
frameworkVersion = "3.5";
}
-
+
//Set to default value of 2.0.50727 framework if no frameworkVersion configured
if ("".Equals(frameworkVersion) || null == frameworkVersion)
{
@@ -1895,11 +1893,11 @@ namespace NPanday.Utils
//Reading the npanday-settings.xml file to get the sdkInstallRoot
public static string GetSdkInstallRoot(String npandaySettings, string frameworkVersion)
{
- String userHomePath = (Environment.OSVersion.Platform == PlatformID.Unix ||
- Environment.OSVersion.Platform == PlatformID.MacOSX)
-? Environment.GetEnvironmentVariable("HOME")
-: Environment.ExpandEnvironmentVariables("%HOMEDRIVE%%HOMEPATH%");
-
+ String userHomePath = (Environment.OSVersion.Platform == PlatformID.Unix ||
+ Environment.OSVersion.Platform == PlatformID.MacOSX)
+ ? Environment.GetEnvironmentVariable("HOME")
+ : Environment.ExpandEnvironmentVariables("%HOMEDRIVE%%HOMEPATH%");
+
userHomePath += "/.m2/npanday-settings.xml";
if (File.Exists(userHomePath))
@@ -1911,7 +1909,7 @@ namespace NPanday.Utils
//Use the USERPROFILE for machines without homedrive homepath env var setup
npandaySettings = Environment.GetEnvironmentVariable("USERPROFILE") + "/.m2/npanday-settings.xml";
}
-
+
XmlDocument doc = new XmlDocument();
doc.Load(npandaySettings);
Added: incubator/npanday/trunk/dotnet/assemblies/NPanday.Utils/src/main/csharp/NPanday/Utils/SettingsUtil.cs
URL: http://svn.apache.org/viewvc/incubator/npanday/trunk/dotnet/assemblies/NPanday.Utils/src/main/csharp/NPanday/Utils/SettingsUtil.cs?rev=1202791&view=auto
==============================================================================
--- incubator/npanday/trunk/dotnet/assemblies/NPanday.Utils/src/main/csharp/NPanday/Utils/SettingsUtil.cs (added)
+++ incubator/npanday/trunk/dotnet/assemblies/NPanday.Utils/src/main/csharp/NPanday/Utils/SettingsUtil.cs Wed Nov 16 17:19:58 2011
@@ -0,0 +1,609 @@
+#region licence
+/*
+ * 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.
+ */
+#endregion
+
+#region Using
+
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Xml;
+using System.Xml.Serialization;
+using NPanday.Model.Settings;
+
+#endregion
+
+namespace NPanday.Utils
+{
+ #region SettingsUtil
+
+ public static class SettingsUtil
+ {
+ public static string MavenSettingsNamespace = "http://maven.apache.org/SETTINGS/1.0.0";
+ public static string defaultProfileID = "NPanday.id";
+
+ #region GetDefaultSettingsPath()
+ /// <summary>
+ /// Gets the default settings path.
+ /// </summary>
+ /// <returns>
+ /// The default settings path.
+ /// </returns>
+ public static string GetDefaultSettingsPath()
+ {
+ string m2Dir = Environment.GetEnvironmentVariable("M2_HOME");
+
+ if ((!string.IsNullOrEmpty(m2Dir)) && Directory.Exists(m2Dir))
+ {
+ string confDir = m2Dir + @"\conf";
+
+ if (Directory.Exists(confDir))
+ {
+ string settingsPath = confDir + @"\settings.xml";
+
+ if (File.Exists(settingsPath))
+ {
+ return settingsPath;
+ }
+ }
+ }
+
+ return null;
+ }
+ #endregion
+
+ #region GetUserSettingsPath()
+ /// <summary>
+ /// Gets the user settings path.
+ /// </summary>
+ /// <returns>
+ /// The user settings path.
+ /// </returns>
+ public static string GetUserSettingsPath()
+ {
+ string profileDir = Environment.GetEnvironmentVariable("USERPROFILE");
+
+ if ((!string.IsNullOrEmpty(profileDir)) && Directory.Exists(profileDir))
+ {
+ string m2Dir = profileDir + @"\.m2";
+
+ if (Directory.Exists(m2Dir))
+ {
+ string settingsPath = m2Dir + @"\settings.xml";
+
+ if (File.Exists(settingsPath))
+ {
+ return settingsPath;
+ }
+ }
+ }
+
+ return null;
+ }
+ #endregion
+
+ #region GetLocalRepositoryPath()
+ /// <summary>
+ /// Gets the local repository path.
+ /// </summary>
+ /// <returns>
+ /// The local repository path
+ /// </returns>
+ public static string GetLocalRepositoryPath()
+ {
+ string path = null;
+ string userSettingsPath = GetUserSettingsPath();
+
+ if (!string.IsNullOrEmpty(userSettingsPath))
+ {
+ try
+ {
+ Settings settings = ReadSettings(userSettingsPath);
+
+ if (settings != null)
+ {
+ path = settings.localRepository;
+ }
+ }
+ catch
+ {
+ }
+
+ if (!string.IsNullOrEmpty(path))
+ {
+ return path;
+ }
+ }
+
+ string defaultSettingsPath = GetDefaultSettingsPath();
+
+ if (!string.IsNullOrEmpty(defaultSettingsPath))
+ {
+ try
+ {
+ Settings settings = ReadSettings(defaultSettingsPath);
+
+ if (settings != null)
+ {
+ path = settings.localRepository;
+ }
+ }
+ catch
+ {
+ }
+
+ if (!string.IsNullOrEmpty(path))
+ {
+ return path;
+ }
+ }
+
+ string profileDir = Environment.GetEnvironmentVariable("USERPROFILE");
+
+ return profileDir + @"\.m2\repository";
+ }
+ #endregion
+
+ public static Settings ReadSettings(string path)
+ {
+ if (path == null)
+ {
+ throw new ArgumentNullException("path");
+ }
+
+ path = path.Trim();
+
+ if (path.Length == 0)
+ {
+ throw new ArgumentException("Value is empty", "path");
+ }
+
+ return ReadSettings(new FileInfo(path));
+ }
+
+ #region ReadSettings(FileInfo)
+ /// <summary>
+ /// Reads the settings.
+ /// </summary>
+ /// <param name="fileInfo">The file info.</param>
+ /// <returns>
+ /// The settings read from the file
+ /// </returns>
+ public static Settings ReadSettings(FileInfo fileInfo)
+ {
+ if (fileInfo == null)
+ {
+ throw new ArgumentNullException("fileInfo");
+ }
+
+ TextReader reader = null;
+ try
+ {
+ reader = new System.IO.StreamReader(fileInfo.FullName);
+ XmlSerializer serializer = new XmlSerializer(typeof(Settings));
+
+ return (Settings)serializer.Deserialize(new ConstantNamespaceXmlTextReader(reader, "", MavenSettingsNamespace));
+ }
+ finally
+ {
+ if (reader != null)
+ {
+ reader.Close();
+ }
+ }
+ }
+ #endregion
+
+ #region MergeSettings(Settings,string)
+ /// <summary>
+ /// Merges the settings in <paramref name="settings"/> with the current ones saved to <paramref name="path"/>.
+ /// </summary>
+ public static void MergeSettings(Settings settings, string path)
+ {
+ // read original settings.xml
+ XmlDocument settingsXmlDoc = new XmlDocument();
+ settingsXmlDoc.Load(path);
+
+ Profile profile = GetProfile(settings, defaultProfileID, false);
+
+ // TODO: current code does not support removal of the npanday profile!
+ if (profile != null)
+ {
+ //convert NPanday Profile to XmlNode
+ XmlDocument newProfileDocument = new XmlDocument();
+ newProfileDocument.LoadXml(SerializeProfileToXml(profile));
+ XmlElement newProfileNode = newProfileDocument.DocumentElement;
+ XmlElement importedNewProfileNode = importWithDocumentNamespace(newProfileNode, settingsXmlDoc);
+
+
+ // search for npanday profile in settings.xml
+ XmlNode oldProfileNode =
+ settingsXmlDoc.SelectSingleNode("(//*[local-name()='profiles']/*[local-name()='profile'])[*[local-name()='id']='" + defaultProfileID + "']");
+ if (oldProfileNode != null)
+ {
+ oldProfileNode.RemoveAll();
+
+ while (importedNewProfileNode.HasChildNodes)
+ {
+ oldProfileNode.AppendChild(importedNewProfileNode.FirstChild);
+ }
+ }
+ else
+ {
+ XmlNode profilesNode = settingsXmlDoc.SelectSingleNode("//*[local-name='profiles']");
+ if (profilesNode == null)
+ {
+ // create profiles
+ profilesNode = createElementWithDocumentNamespace("profiles", settingsXmlDoc);
+ settingsXmlDoc.DocumentElement.AppendChild(profilesNode);
+ }
+
+ profilesNode.AppendChild(importedNewProfileNode);
+ }
+
+ bool createActiveProfile = false;
+ XmlNode activeProfileNode;
+
+ // search for activeProfiles in settings.xml
+ XmlNode activeProfilesNode = settingsXmlDoc.SelectSingleNode("//*[local-name() = 'activeProfiles']");
+ if (activeProfilesNode == null)
+ {
+ activeProfilesNode = createElementWithDocumentNamespace("activeProfiles", settingsXmlDoc);
+ settingsXmlDoc.DocumentElement.AppendChild(activeProfilesNode);
+ createActiveProfile = true;
+ }
+ else
+ {
+ activeProfileNode =
+ settingsXmlDoc.SelectSingleNode("(//*[local-name() = 'activeProfiles']/*[local-name() = 'activeProfile'])[text()='" + defaultProfileID + "']");
+ if (activeProfileNode == null)
+ {
+ createActiveProfile = true;
+ }
+ }
+
+ // add NPanday.id to <activeProfiles>
+ if (createActiveProfile)
+ {
+ activeProfileNode = createElementWithDocumentNamespace("activeProfile", settingsXmlDoc);
+ activeProfileNode.InnerText = defaultProfileID;
+ activeProfilesNode.AppendChild(activeProfileNode);
+ }
+ }
+
+ settingsXmlDoc.Save(path);
+ }
+
+ private static XmlElement importWithDocumentNamespace(XmlElement newProfileNode, XmlDocument settingsXmlDoc)
+ {
+ Console.Write(newProfileNode.OuterXml);
+
+
+ if (settingsXmlDoc.DocumentElement.NamespaceURI != newProfileNode.NamespaceURI)
+ {
+ return (XmlElement)settingsXmlDoc.ReadNode(new ConstantNamespaceXmlTextReader(new StringReader(newProfileNode.OuterXml), newProfileNode.NamespaceURI, settingsXmlDoc.DocumentElement.NamespaceURI));
+ }
+
+ return (XmlElement)settingsXmlDoc.ImportNode(newProfileNode, true);
+ }
+
+ private static XmlElement createElementWithDocumentNamespace(string localName, XmlDocument settingsXmlDoc)
+ {
+ return settingsXmlDoc.CreateElement("", localName, settingsXmlDoc.DocumentElement.NamespaceURI);
+ }
+
+ #endregion
+
+
+ private static string SerializeProfileToXml(Profile profile)
+ {
+ if (profile == null) throw new ArgumentNullException("profile");
+
+ XmlRootAttribute profileRoot = new XmlRootAttribute("profile");
+ profileRoot.Namespace = MavenSettingsNamespace;
+
+ XmlAttributes attributes = new XmlAttributes();
+ attributes.XmlRoot = profileRoot;
+
+ XmlAttributeOverrides overrides = new XmlAttributeOverrides();
+ overrides.Add(profile.GetType(), attributes);
+
+ XmlSerializerNamespaces xmlnsEmpty = new XmlSerializerNamespaces();
+ xmlnsEmpty.Add("", MavenSettingsNamespace);
+
+ XmlSerializer xs = new XmlSerializer(profile.GetType(), overrides);
+ StringWriter xout = new StringWriter();
+ xs.Serialize(xout, profile, xmlnsEmpty);
+ String SerializedProfile = xout.ToString();
+ xout.Close();
+
+ return SerializedProfile;
+ }
+
+ #region AddActiveProfile(Settings, string)
+ /// <summary>
+ /// Add a profile as active
+ /// </summary>
+ /// <param name="settings">The settings</param>
+ /// <param name="profileId">The profile id</param>
+ public static void AddActiveProfile(Settings settings, string profileId)
+ {
+ bool isActive = false;
+ if (settings.activeProfiles == null)
+ {
+ settings.activeProfiles = new string[] { profileId };
+ isActive = true;
+ }
+ else
+ {
+ foreach (string id in settings.activeProfiles)
+ {
+ if (id == profileId)
+ {
+ isActive = true;
+ break;
+ }
+ }
+ }
+
+ if (!isActive)
+ {
+ string[] newActiveProfiles = new string[settings.activeProfiles.Length + 1];
+ settings.activeProfiles.CopyTo(newActiveProfiles, 0);
+ newActiveProfiles[settings.activeProfiles.Length] = profileId;
+ settings.activeProfiles = newActiveProfiles;
+ }
+ }
+ #endregion
+
+ #region GetProfile(Settings, string)
+
+ /// <summary>
+ /// Get profile
+ /// </summary>
+ /// <param name="settings">The settings info</param>
+ /// <param name="profileId">The profile id</param>
+ /// <param name="create"></param>
+ /// <returns>The profile from the settings</returns>
+ public static Profile GetProfile(Settings settings, string profileId, bool create)
+ {
+ if (settings.profiles != null)
+ {
+ foreach (Profile profile in settings.profiles)
+ {
+ if (profileId.Equals(profile.id))
+ {
+ return profile;
+ }
+ }
+ }
+
+ if (create)
+ {
+ Profile profile = new Profile();
+ profile.id = profileId;
+ if (settings.profiles == null)
+ {
+ settings.profiles = new Profile[] { profile };
+ }
+ else
+ {
+ List<Profile> profiles = new List<Profile>();
+ profiles.AddRange(settings.profiles);
+ profiles.Add(profile);
+ settings.profiles = profiles.ToArray();
+ }
+ return profile;
+ }
+
+ return null;
+ }
+ #endregion
+
+ #region GetAllRepositories()
+ /// <summary>
+ /// Get all repositories from the settings.xml
+ /// </summary>
+ /// <param name="settings">The settings info</param>
+ /// <returns>
+ /// All repositories from the settings
+ /// </returns>
+ public static List<Repository> GetAllRepositories(Settings settings)
+ {
+ List<Repository> repos = new List<Repository>();
+
+ foreach (Profile profile in settings.profiles)
+ {
+ if (profile.repositories != null)
+ {
+ repos.AddRange(profile.repositories);
+ }
+ }
+ return repos;
+ }
+ #endregion
+
+ #region GetRepositoryByUrl(Settings, string)
+ /// <summary>
+ /// Get repository from settings by url
+ /// </summary>
+ /// <param name="settings">The settings</param>
+ /// <param name="url">The repository url</param>
+ /// <returns>The repository from the settings.xml</returns>
+ public static Repository GetRepositoryByUrl(Settings settings, string url)
+ {
+ if (settings.profiles != null)
+ {
+ foreach (Profile profile in settings.profiles)
+ {
+ if (profile.repositories != null)
+ {
+ foreach (Repository repo in profile.repositories)
+ {
+ if (url.Equals(repo.url))
+ {
+ return repo;
+ }
+ }
+ }
+ }
+ }
+ return null;
+ }
+ #endregion
+
+ #region GetRepositoryFromProfile(Profile, string)
+ /// <summary>
+ /// Gets the repository object from the profile
+ /// </summary>
+ /// <param name="profile">The profile</param>
+ /// <param name="url">The repository url</param>
+ /// <returns>
+ /// The repository object from the profile
+ /// </returns>
+ public static Repository GetRepositoryFromProfile(Profile profile, string url)
+ {
+ if (profile.repositories != null)
+ {
+ foreach (Repository repo in profile.repositories)
+ {
+ if (url.Equals(repo.url))
+ {
+ return repo;
+ }
+ }
+ }
+ return null;
+ }
+ #endregion
+
+ #region AddRepositoryToProfile(Profile, string, bool, bool, Settings)
+ /// <summary>
+ /// Add repository to profile
+ /// </summary>
+ /// <param name="profile">The profile</param>
+ /// <param name="url">The repository url to be added</param>
+ /// <param name="isReleaseEnabled">True if release is enabled</param>
+ /// <param name="isSnapshotEnabled">True if snapshot is enabled</param>
+ /// <param name="settings">The settings</param>
+ /// <returns>The repository</returns>
+ public static Repository AddRepositoryToProfile(Profile profile, string url, bool isReleaseEnabled, bool isSnapshotEnabled)
+ {
+ Repository repository = GetRepositoryFromProfile(profile, url);
+
+ if (repository == null)
+ {
+ repository = new Repository();
+ repository.url = url;
+ UpdateRepository(profile, repository, isReleaseEnabled, isSnapshotEnabled);
+
+ // add repository to profile
+ if (profile.repositories == null)
+ {
+ profile.repositories = new Repository[] { repository };
+ }
+ else
+ {
+ List<Repository> repositories = new List<Repository>();
+ repositories.AddRange(profile.repositories);
+ repositories.Insert(0, repository);
+ profile.repositories = repositories.ToArray();
+ }
+ }
+ return repository;
+ }
+ #endregion
+
+ #region RemoveRepositoryFromProfile
+ /// <summary>
+ /// Remove repository from profile
+ /// </summary>
+ /// <param name="profile">The profile</param>
+ /// <param name="repository">The repository to remove</param>
+ public static void RemoveRepositoryFromProfile(Profile profile, Repository repository)
+ {
+ List<Repository> repositories = new List<Repository>();
+ repositories.AddRange(profile.repositories);
+ repositories.Remove(repository);
+ profile.repositories = repositories.ToArray();
+ }
+ #endregion
+
+ #region
+ /// <summary>
+ /// Update repository information
+ /// </summary>
+ /// <param name="profile">The profile</param>
+ /// <param name="repository">The repository</param>
+ /// <param name="isReleaseEnabled">True if release is enabled</param>
+ /// <param name="isSnapshotEnabled">True if snapshot is enabled</param>
+ public static void UpdateRepository(Profile profile, Repository repository, bool isReleaseEnabled, bool isSnapshotEnabled)
+ {
+ Activation activation = new Activation();
+ activation.activeByDefault = true;
+ profile.activation = activation;
+
+ RepositoryPolicy releasesPolicy = new RepositoryPolicy();
+ RepositoryPolicy snapshotsPolicy = new RepositoryPolicy();
+ releasesPolicy.enabled = isReleaseEnabled;
+ snapshotsPolicy.enabled = isSnapshotEnabled;
+ repository.releases = releasesPolicy;
+ repository.snapshots = snapshotsPolicy;
+ if (repository.id == null)
+ {
+ repository.id = generateRepositoryId(profile);
+ }
+ }
+ #endregion
+
+ private static string generateRepositoryId(Profile profile)
+ {
+ int ctr = 0;
+ if (profile.repositories != null)
+ {
+ foreach (Repository repo in profile.repositories)
+ {
+ if (repo.id != null && repo.id.StartsWith("npanday.repo."))
+ {
+ int index = int.Parse(repo.id.Substring(13));
+
+ if (index >= ctr)
+ {
+ ctr = index + 1;
+ }
+ }
+ }
+ }
+ return "npanday.repo." + ctr;
+ }
+
+ public static Profile GetDefaultProfile(Settings settings)
+ {
+ return GetDefaultProfile(settings, false);
+ }
+
+ public static Profile GetDefaultProfile(Settings settings, bool create)
+ {
+ return GetProfile(settings, SettingsUtil.defaultProfileID, create);
+ }
+ }
+
+ #endregion
+}
Propchange: incubator/npanday/trunk/dotnet/assemblies/NPanday.Utils/src/test/csharp/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Wed Nov 16 17:19:58 2011
@@ -0,0 +1,7 @@
+[Bb]in
+obj
+[Dd]ebug
+[Rr]elease
+*.user
+*.aps
+*.eto
Added: incubator/npanday/trunk/dotnet/assemblies/NPanday.Utils/src/test/csharp/NPanday.Utils-Test.csproj
URL: http://svn.apache.org/viewvc/incubator/npanday/trunk/dotnet/assemblies/NPanday.Utils/src/test/csharp/NPanday.Utils-Test.csproj?rev=1202791&view=auto
==============================================================================
--- incubator/npanday/trunk/dotnet/assemblies/NPanday.Utils/src/test/csharp/NPanday.Utils-Test.csproj (added)
+++ incubator/npanday/trunk/dotnet/assemblies/NPanday.Utils/src/test/csharp/NPanday.Utils-Test.csproj Wed Nov 16 17:19:58 2011
@@ -0,0 +1,122 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+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.
+-->
+<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProductVersion>8.0.50727</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{FEEC01CB-2577-4059-9609-531A4913BCDA}</ProjectGuid>
+ <OutputType>Library</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>NPanday.Utils_Test</RootNamespace>
+ <AssemblyName>NPanday.Utils-Test</AssemblyName>
+ <TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
+ <FileUpgradeFlags>
+ </FileUpgradeFlags>
+ <OldToolsVersion>2.0</OldToolsVersion>
+ <UpgradeBackupLocation />
+ <PublishUrl>publish\</PublishUrl>
+ <Install>true</Install>
+ <InstallFrom>Disk</InstallFrom>
+ <UpdateEnabled>false</UpdateEnabled>
+ <UpdateMode>Foreground</UpdateMode>
+ <UpdateInterval>7</UpdateInterval>
+ <UpdateIntervalUnits>Days</UpdateIntervalUnits>
+ <UpdatePeriodically>false</UpdatePeriodically>
+ <UpdateRequired>false</UpdateRequired>
+ <MapFileExtensions>true</MapFileExtensions>
+ <ApplicationRevision>0</ApplicationRevision>
+ <ApplicationVersion>1.0.0.%2a</ApplicationVersion>
+ <IsWebBootstrapper>false</IsWebBootstrapper>
+ <UseApplicationTrust>false</UseApplicationTrust>
+ <BootstrapperEnabled>true</BootstrapperEnabled>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>bin\Debug\</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>bin\Release\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="NPanday.Model.Settings, Version=1.4.1.0, Culture=neutral, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\..\..\..\NPanday.Model.Settings\target\NPanday.Model.Settings.dll</HintPath>
+ </Reference>
+ <Reference Include="NUnit.Framework, Version=2.2.8.0, Culture=neutral, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\..\..\.references\NUnit.Framework.dll</HintPath>
+ </Reference>
+ <Reference Include="System" />
+ <Reference Include="System.Data" />
+ <Reference Include="System.Windows.Forms" />
+ <Reference Include="System.Xml" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="SettingsUtilTest.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Folder Include="Properties\" />
+ </ItemGroup>
+ <ItemGroup>
+ <BootstrapperPackage Include="Microsoft.Net.Client.3.5">
+ <Visible>False</Visible>
+ <ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
+ <Install>false</Install>
+ </BootstrapperPackage>
+ <BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
+ <Visible>False</Visible>
+ <ProductName>.NET Framework 3.5 SP1</ProductName>
+ <Install>true</Install>
+ </BootstrapperPackage>
+ <BootstrapperPackage Include="Microsoft.Windows.Installer.3.1">
+ <Visible>False</Visible>
+ <ProductName>Windows Installer 3.1</ProductName>
+ <Install>true</Install>
+ </BootstrapperPackage>
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\..\main\csharp\NPanday.Utils.csproj">
+ <Project>{CAA4864F-F4C8-4024-8535-8B8C112307CE}</Project>
+ <Name>NPanday.Utils</Name>
+ </ProjectReference>
+ </ItemGroup>
+ <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
+ <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
+ Other similar extension points exist, see Microsoft.Common.targets.
+ <Target Name="BeforeBuild">
+ </Target>
+ <Target Name="AfterBuild">
+ </Target>
+ -->
+</Project>
\ No newline at end of file
Added: incubator/npanday/trunk/dotnet/assemblies/NPanday.Utils/src/test/csharp/SettingsUtilTest.cs
URL: http://svn.apache.org/viewvc/incubator/npanday/trunk/dotnet/assemblies/NPanday.Utils/src/test/csharp/SettingsUtilTest.cs?rev=1202791&view=auto
==============================================================================
--- incubator/npanday/trunk/dotnet/assemblies/NPanday.Utils/src/test/csharp/SettingsUtilTest.cs (added)
+++ incubator/npanday/trunk/dotnet/assemblies/NPanday.Utils/src/test/csharp/SettingsUtilTest.cs Wed Nov 16 17:19:58 2011
@@ -0,0 +1,246 @@
+#region licence
+/*
+ * 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.
+ */
+#endregion
+
+using System;
+using System.Xml;
+using NPanday.Utils;
+using NUnit.Framework;
+using NPanday.Model.Settings;
+using System.IO;
+
+namespace NPanday.Utils_Test
+{
+ [TestFixture]
+ public class SettingsUtilTest
+ {
+ private string _repoUrl1 = "http://repo1.maven.org/maven2";
+ private string _repoUrl2 = "http://repo.exist.com/maven2";
+ private Settings _settings;
+
+ private NameTable _nameTable;
+ private XmlNamespaceManager _namespaceManager;
+
+ public SettingsUtilTest()
+ {
+ _nameTable = new NameTable();
+ _namespaceManager = new XmlNamespaceManager(_nameTable);
+
+ }
+
+ [Test]
+ public void AddRepository_NoProfileTag__AddsRepoToModel()
+ {
+ _settings = ReadTestSettings("test-settings.xml");
+
+ Profile profile = SettingsUtil.GetDefaultProfile(_settings, true);
+ Assert.IsNotNull(profile);
+ SettingsUtil.AddRepositoryToProfile(profile, _repoUrl1, true, false);
+
+ Assert.AreEqual(1, _settings.profiles.Length, "Settings does not contain a profile");
+
+ Repository repository = SettingsUtil.GetRepositoryFromProfile(profile, _repoUrl1);
+
+ Assert.IsNotNull(repository, "Repository '" + _repoUrl1 + "' was not added to profile");
+
+ Assert.AreEqual("npanday.repo.0", repository.id);
+ Assert.AreEqual(_repoUrl1, repository.url);
+ }
+
+ [Test]
+ public void AddRepository_WithProfileTag_AddsRepoToModel()
+ {
+ _settings = ReadTestSettings("test-settings-with-profile.xml");
+
+ Profile profile = SettingsUtil.GetDefaultProfile(_settings, false);
+ Assert.IsNotNull(profile);
+
+ SettingsUtil.AddRepositoryToProfile(profile, _repoUrl2, true, false);
+
+ Assert.AreEqual(1, _settings.profiles.Length, "Settings does not contain a profile");
+ Assert.AreEqual(2, _settings.profiles[0].repositories.Length);
+
+ Repository repository = SettingsUtil.GetRepositoryFromProfile(profile, _repoUrl1);
+ Assert.IsNotNull(repository, "Repository '" + _repoUrl1 + "' was not in the profile");
+ Assert.AreEqual("npanday.repo.0", repository.id);
+ Assert.AreEqual(_repoUrl1, repository.url);
+
+ repository = SettingsUtil.GetRepositoryFromProfile(profile, _repoUrl2);
+ Assert.IsNotNull(repository, "Repository '" + _repoUrl2 + "' was not added to profile");
+ Assert.AreEqual("npanday.repo.1", repository.id);
+ Assert.AreEqual(_repoUrl2, repository.url);
+ }
+
+ [Test]
+ public void AddRepository_WithProfileAndWithoutNs__AddsRepoToModel()
+ {
+ _settings = ReadTestSettings("test-settings-with-profile.xml");
+
+ Profile profile = SettingsUtil.GetDefaultProfile(_settings, false);
+ Assert.IsNotNull(profile);
+ }
+
+ [Test]
+ public void AddRepository_WithProfileAndNs__AddsRepoToModel()
+ {
+ string fullPath;
+ _settings = ReadTestSettings("test-settings-with-profile-and-namespace.xml", out fullPath);
+
+ Profile profile = SettingsUtil.GetDefaultProfile(_settings, false);
+ Assert.IsNotNull(profile);
+ }
+
+ [Test]
+ public void ReadWrite_WithoutNSAndProfileTag_DoesNotChangeContent()
+ {
+ ReadWrite_LeavesContentUnchanged("test-settings.xml");
+ }
+
+ [Test]
+ public void ReadWrite_WithNsWithoutProfileTag_DoesNotChangeContent()
+ {
+ ReadWrite_LeavesContentUnchanged("test-settings-with-namespace.xml");
+ }
+
+ [Test]
+ public void ReadWrite_WithoutNsWithProfileTag_DoesNotChangeContent()
+ {
+ ReadWrite_LeavesContentUnchanged("test-settings-with-profile.xml");
+ }
+
+ [Test]
+ public void ReadWrite_WithNsAndProfileTag_DoesNotChangeContent()
+ {
+ ReadWrite_LeavesContentUnchanged("test-settings-with-profile-and-namespace.xml");
+ }
+
+ private void ReadWrite_LeavesContentUnchanged(string testSettingsXml)
+ {
+ string fullPath;
+ _settings = ReadTestSettings(testSettingsXml, out fullPath);
+
+ Console.WriteLine("file:///" + new Uri(fullPath).AbsolutePath);
+
+ Assert.IsNotNull(_settings);
+
+ XmlDocument beforeXd = new XmlDocument();
+ beforeXd.Load(fullPath);
+ string before = beforeXd.OuterXml;
+
+ SettingsUtil.MergeSettings(_settings, fullPath);
+
+ XmlDocument afterXd = new XmlDocument();
+ afterXd.Load(fullPath);
+ string after = afterXd.OuterXml;
+
+ Assert.AreEqual(before, after);
+ }
+
+ [Test]
+ public void CreateDefaultProfile_WithoutNsAndProfileTag_AddsProfileTagsWithoutNamespace()
+ {
+ string fullPath;
+ _settings = ReadTestSettings("test-settings.xml", out fullPath);
+
+ Assert.IsNotNull(_settings);
+
+ SettingsUtil.GetDefaultProfile(_settings, true);
+
+ SettingsUtil.MergeSettings(_settings, fullPath);
+
+ XmlDocument afterXd = new XmlDocument();
+ afterXd.Load(fullPath);
+
+ assertNodeExists(afterXd, "/settings/profiles");
+ assertNodeExists(afterXd, "/settings/profiles/profile[id='" + SettingsUtil.defaultProfileID + "']");
+ assertNodeExists(afterXd, "/settings/activeProfiles");
+ assertNodeExists(afterXd, "/settings/activeProfiles/activeProfile[text()='" + SettingsUtil.defaultProfileID + "']");
+ }
+
+ [Test]
+ public void CreateDefaultProfile_WithNsWithoutProfileTag_AddsProfileTagsWithNamespace()
+ {
+ string fullPath;
+ _settings = ReadTestSettings("test-settings-with-namespace.xml", out fullPath);
+
+ Assert.IsNotNull(_settings);
+
+ SettingsUtil.GetDefaultProfile(_settings, true);
+
+ SettingsUtil.MergeSettings(_settings, fullPath);
+
+
+ _namespaceManager.AddNamespace("settings", SettingsUtil.MavenSettingsNamespace);
+
+ XmlDocument afterXd = new XmlDocument(_nameTable);
+ afterXd.Load(fullPath);
+
+ assertNodeExists(afterXd, "/settings:settings");
+ assertNodeExists(afterXd, "/settings:settings/settings:profiles");
+ assertNodeExists(afterXd, "/settings:settings/settings:profiles/settings:profile[settings:id='" + SettingsUtil.defaultProfileID + "']");
+ assertNodeExists(afterXd, "/settings:settings/settings:activeProfiles");
+ assertNodeExists(afterXd, "/settings:settings/settings:activeProfiles/settings:activeProfile[text()='" + SettingsUtil.defaultProfileID + "']");
+ }
+
+ private void assertNodeExists(XmlDocument xml, string xpath)
+ {
+ assertNodesExists(xml, xpath, 1);
+ }
+
+ private void assertNodesExists(XmlDocument xml, string xpath, int count)
+ {
+ XmlNodeList nodes = xml.SelectNodes(xpath, _namespaceManager);
+ if (nodes.Count == 0)
+ Assert.Fail("Could not find a node matching " + xpath + " in " + xml.BaseURI);
+ if (nodes.Count < count)
+ Assert.Fail("Found less than " + count + " nodes matching " + xpath + " in " + xml.BaseURI);
+ if (nodes.Count > count)
+ Assert.Fail("Found more than " + count + " node(s) matching " + xpath + " in " + xml.BaseURI);
+ }
+
+ private Settings ReadTestSettings(string settingsXml)
+ {
+ string fullPath;
+ return ReadTestSettings(settingsXml, out fullPath);
+ }
+
+ private Settings ReadTestSettings(string settingsXml, out string fullPath)
+ {
+ DirectoryInfo projectRoot = PathUtility.FindProjectRoot(new DirectoryInfo(Directory.GetCurrentDirectory()));
+
+ FileInfo originalPath = getSettingsPath(projectRoot, settingsXml);
+ string dir = Path.Combine(PathUtility.GetBuildDirectory(projectRoot).FullName, "test-workbench");
+ Directory.CreateDirectory(dir);
+ fullPath = Path.Combine(dir, settingsXml);
+
+ originalPath.CopyTo(fullPath, true);
+ return SettingsUtil.ReadSettings(originalPath);
+ }
+
+ private FileInfo getSettingsPath(DirectoryInfo projectRoot, string settingsXml)
+ {
+ string path = Path.Combine(projectRoot.FullName, "src");
+ path = Path.Combine(path, "test");
+ path = Path.Combine(path, "resource");
+ path = Path.Combine(path, "m2");
+ return new FileInfo(Path.Combine(path, settingsXml));
+ }
+ }
+}
Modified: incubator/npanday/trunk/dotnet/assemblies/NPanday.VisualStudio.Addin/pom.xml
URL: http://svn.apache.org/viewvc/incubator/npanday/trunk/dotnet/assemblies/NPanday.VisualStudio.Addin/pom.xml?rev=1202791&r1=1202790&r2=1202791&view=diff
==============================================================================
--- incubator/npanday/trunk/dotnet/assemblies/NPanday.VisualStudio.Addin/pom.xml (original)
+++ incubator/npanday/trunk/dotnet/assemblies/NPanday.VisualStudio.Addin/pom.xml Wed Nov 16 17:19:58 2011
@@ -71,49 +71,49 @@ under the License.
<artifactId>Microsoft.VisualStudio.CommandBars</artifactId>
<version>8.0.0.0</version>
<type>gac</type>
- <classifier>b03f5f7f11d50a3a</classifier>
+ <classifier>b03f5f7f11d50a3a</classifier>
</dependency>
<dependency>
<groupId>EnvDTE</groupId>
<artifactId>EnvDTE</artifactId>
<version>8.0.0.0</version>
<type>gac</type>
- <classifier>b03f5f7f11d50a3a</classifier>
+ <classifier>b03f5f7f11d50a3a</classifier>
</dependency>
<dependency>
<groupId>EnvDTE80</groupId>
<artifactId>EnvDTE80</artifactId>
<version>8.0.0.0</version>
<type>gac</type>
- <classifier>b03f5f7f11d50a3a</classifier>
+ <classifier>b03f5f7f11d50a3a</classifier>
</dependency>
<dependency>
<groupId>Extensibility</groupId>
<artifactId>Extensibility</artifactId>
<version>7.0.3300.0</version>
<type>gac</type>
- <classifier>b03f5f7f11d50a3a</classifier>
+ <classifier>b03f5f7f11d50a3a</classifier>
</dependency>
<dependency>
<groupId>VSLangProj</groupId>
<artifactId>VSLangProj</artifactId>
<type>gac</type>
<version>7.0.3300.0</version>
- <classifier>b03f5f7f11d50a3a</classifier>
+ <classifier>b03f5f7f11d50a3a</classifier>
</dependency>
<dependency>
<groupId>VSLangProj80</groupId>
<artifactId>VSLangProj80</artifactId>
<type>gac</type>
<version>8.0.0.0</version>
- <classifier>b03f5f7f11d50a3a</classifier>
+ <classifier>b03f5f7f11d50a3a</classifier>
</dependency>
<dependency>
<groupId>VsWebSite.Interop</groupId>
<artifactId>VsWebSite.Interop</artifactId>
<type>gac</type>
<version>8.0.0.0</version>
- <classifier>b03f5f7f11d50a3a</classifier>
+ <classifier>b03f5f7f11d50a3a</classifier>
</dependency>
<dependency>
<groupId>org.apache.npanday.visualstudio</groupId>
Modified: incubator/npanday/trunk/dotnet/assemblies/NPanday.VisualStudio.Addin/src/main/csharp/NPanday.VisualStudio.Addin.csproj
URL: http://svn.apache.org/viewvc/incubator/npanday/trunk/dotnet/assemblies/NPanday.VisualStudio.Addin/src/main/csharp/NPanday.VisualStudio.Addin.csproj?rev=1202791&r1=1202790&r2=1202791&view=diff
==============================================================================
--- incubator/npanday/trunk/dotnet/assemblies/NPanday.VisualStudio.Addin/src/main/csharp/NPanday.VisualStudio.Addin.csproj (original)
+++ incubator/npanday/trunk/dotnet/assemblies/NPanday.VisualStudio.Addin/src/main/csharp/NPanday.VisualStudio.Addin.csproj Wed Nov 16 17:19:58 2011
@@ -44,6 +44,10 @@ under the License.
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\NPanday.Model.Pom\target\NPanday.Model.Pom.dll</HintPath>
</Reference>
+ <Reference Include="NPanday.Model.Settings, Version=1.4.1.0, Culture=neutral, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\..\..\..\NPanday.Model.Settings\target\NPanday.Model.Settings.dll</HintPath>
+ </Reference>
<Reference Include="System" />
<Reference Include="System.configuration" />
<Reference Include="System.Data" />
@@ -89,6 +93,7 @@ under the License.
<DependentUpon>ConfigureMavenRepositoryForm.cs</DependentUpon>
</Compile>
<Compile Include="NPanday\VisualStudio\Addin\Connect.cs" />
+ <Compile Include="NPanday\VisualStudio\Addin\MavenRunner.cs" />
<Compile Include="NPanday\VisualStudio\Addin\WebServicesReferenceUtils.cs" />
<Compile Include="NPanday\VisualStudio\Addin\Helper\VisualStudioControlsFinder.cs" />
<Compile Include="NPanday\VisualStudio\Addin\IReferenceInfo.cs" />
@@ -172,10 +177,6 @@ under the License.
<Project>{C511B03B-8AB7-4E61-9F6E-5E6F9F65E8CE}</Project>
<Name>NPanday.Logging</Name>
</ProjectReference>
- <ProjectReference Include="..\..\..\..\NPanday.Model.Settings\src\main\csharp\NPanday.Model.Settings.csproj">
- <Project>{F905C7DA-9D1D-488D-9084-99D7969C2BDD}</Project>
- <Name>NPanday.Model.Settings</Name>
- </ProjectReference>
<ProjectReference Include="..\..\..\..\NPanday.Plugin\src\main\csharp\NPanday.Plugin.csproj">
<Project>{B760D54F-22AC-43E7-A0A6-DE313D4663AF}</Project>
<Name>NPanday.Plugin</Name>