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 2011/12/31 15:57:05 UTC

svn commit: r1226118 - /incubator/npanday/trunk/dotnet/assemblies/NPanday.ProjectImporter/Engine/src/main/csharp/Converter/Algorithms/ASPNetPomConverter.cs

Author: brett
Date: Sat Dec 31 15:57:05 2011
New Revision: 1226118

URL: http://svn.apache.org/viewvc?rev=1226118&view=rev
Log:
[NPANDAY-488] add support for new ASP.NET packaging (missing file from previous commit)

Added:
    incubator/npanday/trunk/dotnet/assemblies/NPanday.ProjectImporter/Engine/src/main/csharp/Converter/Algorithms/ASPNetPomConverter.cs

Added: incubator/npanday/trunk/dotnet/assemblies/NPanday.ProjectImporter/Engine/src/main/csharp/Converter/Algorithms/ASPNetPomConverter.cs
URL: http://svn.apache.org/viewvc/incubator/npanday/trunk/dotnet/assemblies/NPanday.ProjectImporter/Engine/src/main/csharp/Converter/Algorithms/ASPNetPomConverter.cs?rev=1226118&view=auto
==============================================================================
--- incubator/npanday/trunk/dotnet/assemblies/NPanday.ProjectImporter/Engine/src/main/csharp/Converter/Algorithms/ASPNetPomConverter.cs (added)
+++ incubator/npanday/trunk/dotnet/assemblies/NPanday.ProjectImporter/Engine/src/main/csharp/Converter/Algorithms/ASPNetPomConverter.cs Sat Dec 31 15:57:05 2011
@@ -0,0 +1,52 @@
+#region Apache License, Version 2.0
+//
+// 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.IO;
+using NPanday.Model.Pom;
+using NPanday.ProjectImporter.Digest.Model;
+using NPanday.Utils;
+
+namespace NPanday.ProjectImporter.Converter.Algorithms
+{
+    public class ASPNetPomConverter : NormalPomConverter
+    {
+        public ASPNetPomConverter(ProjectDigest projectDigest, string mainPomFile, NPanday.Model.Pom.Model parent, string groupId) 
+            : base(projectDigest,mainPomFile,parent, groupId)
+        {
+        }
+
+        public override void ConvertProjectToPomModel(bool writePom, string scmTag)
+        {
+            // just call the base, but dont write it we still need some minor adjustments for it
+            base.ConvertProjectToPomModel(false,scmTag);
+            
+            Plugin aspnetPlugin = AddPlugin("org.apache.npanday.plugins", "aspnet-maven-plugin", null, false);
+            AddPluginExecution(aspnetPlugin, "prepare-package", new string[] { "assemble-package-files" }, "prepare-package");
+
+            Plugin msdeployPlugin = AddPlugin("org.apache.npanday.plugins", "msdeploy-maven-plugin", null, false);
+            AddPluginExecution(msdeployPlugin, "create-msdeploy-package", new string[] { "create-package" }, "package");
+
+            if (writePom)
+            {
+                PomHelperUtility.WriteModelToPom(new FileInfo(Path.GetDirectoryName(projectDigest.FullFileName) + @"\pom.xml"), Model);
+            }
+        }
+    }
+}