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 br...@apache.org on 2014/02/26 15:45:57 UTC
svn commit: r1572103 - in /incubator/npanday/trunk/dotnet/assemblies:
NPanday.Utils/src/main/csharp/PomHelperUtility.cs
NPanday.VisualStudio.Addin/src/main/csharp/Connect.cs
Author: brett
Date: Wed Feb 26 15:45:57 2014
New Revision: 1572103
URL: http://svn.apache.org/r1572103
Log:
NPanday doesn't update a pom when including source files (*.vb,*.cs) in a project
Submitted by: Joe Ocaba
Modified:
incubator/npanday/trunk/dotnet/assemblies/NPanday.Utils/src/main/csharp/PomHelperUtility.cs
incubator/npanday/trunk/dotnet/assemblies/NPanday.VisualStudio.Addin/src/main/csharp/Connect.cs
Modified: incubator/npanday/trunk/dotnet/assemblies/NPanday.Utils/src/main/csharp/PomHelperUtility.cs
URL: http://svn.apache.org/viewvc/incubator/npanday/trunk/dotnet/assemblies/NPanday.Utils/src/main/csharp/PomHelperUtility.cs?rev=1572103&r1=1572102&r2=1572103&view=diff
==============================================================================
--- incubator/npanday/trunk/dotnet/assemblies/NPanday.Utils/src/main/csharp/PomHelperUtility.cs (original)
+++ incubator/npanday/trunk/dotnet/assemblies/NPanday.Utils/src/main/csharp/PomHelperUtility.cs Wed Feb 26 15:45:57 2014
@@ -1134,6 +1134,8 @@ namespace NPanday.Utils
{
NPanday.Model.Pom.Model model = ReadPomAsModel();
+ bool configExists = false;
+
foreach (Plugin plugin in model.build.plugins)
{
XmlDocument xmlDocument = new XmlDocument();
@@ -1161,17 +1163,24 @@ namespace NPanday.Utils
XmlNode node = xmlDocument.CreateNode(XmlNodeType.Element, n.Name, @"http://maven.apache.org/POM/4.0.0");
node.InnerText = n.InnerText.Replace("\\", "/");
elem.AppendChild(node);
+ if (n.InnerText.Equals(confPropVal))
+ {
+ configExists = true;
+ }
}
}
- 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))
+ if (!configExists)
{
- elem.AppendChild(nodeAdded);
+ 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;
}
- elems[count] = elem;
break;
}
Modified: incubator/npanday/trunk/dotnet/assemblies/NPanday.VisualStudio.Addin/src/main/csharp/Connect.cs
URL: http://svn.apache.org/viewvc/incubator/npanday/trunk/dotnet/assemblies/NPanday.VisualStudio.Addin/src/main/csharp/Connect.cs?rev=1572103&r1=1572102&r2=1572103&view=diff
==============================================================================
--- incubator/npanday/trunk/dotnet/assemblies/NPanday.VisualStudio.Addin/src/main/csharp/Connect.cs (original)
+++ incubator/npanday/trunk/dotnet/assemblies/NPanday.VisualStudio.Addin/src/main/csharp/Connect.cs Wed Feb 26 15:45:57 2014
@@ -89,7 +89,7 @@ namespace NPanday.VisualStudio.Addin
attachReferenceEvent();
}
}
-
+
void SolutionEvents_ProjectAdded(EnvDTE.Project project)
{
if (_applicationObject != null && _applicationObject.Solution != null)
@@ -121,7 +121,7 @@ namespace NPanday.VisualStudio.Addin
//determine which plugin the projectItem belongs to
- if (projectItem.Name.Contains(".cs") || projectItem.Name.Contains(".vb"))
+ if (projectItem.Name.Contains(".cs") || projectItem.Name.Contains(".vb") || projectItem.Name.Contains(".disco"))
{
//change addpluginConfiguration to accept xmlElement instead
pomUtil.AddMavenCompilePluginConfiguration("org.apache.npanday.plugins", "maven-compile-plugin", "includeSources", "includeSource", GetRelativePathToProject(projectItem, projectItem.Name));