From nmaven-commits-return-816-apmail-incubator-nmaven-commits-archive=incubator.apache.org@incubator.apache.org Mon Jun 30 12:54:39 2008 Return-Path: Delivered-To: apmail-incubator-nmaven-commits-archive@locus.apache.org Received: (qmail 25093 invoked from network); 30 Jun 2008 12:54:39 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 30 Jun 2008 12:54:39 -0000 Received: (qmail 52835 invoked by uid 500); 30 Jun 2008 12:54:40 -0000 Delivered-To: apmail-incubator-nmaven-commits-archive@incubator.apache.org Received: (qmail 52789 invoked by uid 500); 30 Jun 2008 12:54:40 -0000 Mailing-List: contact nmaven-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: nmaven-dev@incubator.apache.org Delivered-To: mailing list nmaven-commits@incubator.apache.org Received: (qmail 52759 invoked by uid 99); 30 Jun 2008 12:54:40 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 30 Jun 2008 05:54:40 -0700 X-ASF-Spam-Status: No, hits=-1997.2 required=10.0 tests=ALL_TRUSTED,WEIRD_QUOTING X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 30 Jun 2008 12:53:47 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 1482C2388A42; Mon, 30 Jun 2008 05:54:08 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: svn commit: r672753 [3/9] - in /incubator/nmaven/branches/NMAVEN_0.14: archetypes/maven-archetype-dotnet-simple/src/main/resources/archetype-resources/src/main/csharp/Sample/ archetypes/maven-archetype-dotnet-simple/src/main/resources/archetype-resourc... Date: Mon, 30 Jun 2008 12:54:03 -0000 To: nmaven-commits@incubator.apache.org From: brett@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20080630125408.1482C2388A42@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Modified: incubator/nmaven/branches/NMAVEN_0.14/assemblies/NMaven.Model/AutomationExtensibility/src/main/csharp/NMaven/Model/AutomationExtensibility.cs URL: http://svn.apache.org/viewvc/incubator/nmaven/branches/NMAVEN_0.14/assemblies/NMaven.Model/AutomationExtensibility/src/main/csharp/NMaven/Model/AutomationExtensibility.cs?rev=672753&r1=672752&r2=672753&view=diff ============================================================================== --- incubator/nmaven/branches/NMAVEN_0.14/assemblies/NMaven.Model/AutomationExtensibility/src/main/csharp/NMaven/Model/AutomationExtensibility.cs (original) +++ incubator/nmaven/branches/NMAVEN_0.14/assemblies/NMaven.Model/AutomationExtensibility/src/main/csharp/NMaven/Model/AutomationExtensibility.cs Mon Jun 30 05:54:00 2008 @@ -1,271 +1,271 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:2.0.50727.42 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -// -// This source code was auto-generated by xsd, Version=2.0.50727.42. -// -namespace NMaven.Model { - using System.Xml.Serialization; - - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "2.0.50727.42")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true)] - [System.Xml.Serialization.XmlRootAttribute(Namespace="http://schemas.microsoft.com/AutomationExtensibility", IsNullable=false)] - public partial class Extensibility { - - private object[] itemsField; - - /// - [System.Xml.Serialization.XmlElementAttribute("Addin", typeof(ExtensibilityAddin))] - [System.Xml.Serialization.XmlElementAttribute("HostApplication", typeof(ExtensibilityHostApplication))] - [System.Xml.Serialization.XmlElementAttribute("ToolsOptionsPage", typeof(ExtensibilityToolsOptionsPageCategory[]))] - public object[] Items { - get { - return this.itemsField; - } - set { - this.itemsField = value; - } - } - } - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "2.0.50727.42")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true)] - public partial class ExtensibilityAddin { - - private string[] itemsField; - - private ItemsChoiceType1[] itemsElementNameField; - - /// - [System.Xml.Serialization.XmlElementAttribute("AboutBoxDetails", typeof(string))] - [System.Xml.Serialization.XmlElementAttribute("AboutIconData", typeof(string))] - [System.Xml.Serialization.XmlElementAttribute("Assembly", typeof(string))] - [System.Xml.Serialization.XmlElementAttribute("CommandLineSafe", typeof(string), DataType="integer")] - [System.Xml.Serialization.XmlElementAttribute("CommandPreload", typeof(string), DataType="integer")] - [System.Xml.Serialization.XmlElementAttribute("Description", typeof(string))] - [System.Xml.Serialization.XmlElementAttribute("FriendlyName", typeof(string))] - [System.Xml.Serialization.XmlElementAttribute("FullClassName", typeof(string))] - [System.Xml.Serialization.XmlElementAttribute("LoadBehavior", typeof(string), DataType="integer")] - [System.Xml.Serialization.XmlChoiceIdentifierAttribute("ItemsElementName")] - public string[] Items { - get { - return this.itemsField; - } - set { - this.itemsField = value; - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute("ItemsElementName")] - [System.Xml.Serialization.XmlIgnoreAttribute()] - public ItemsChoiceType1[] ItemsElementName { - get { - return this.itemsElementNameField; - } - set { - this.itemsElementNameField = value; - } - } - } - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "2.0.50727.42")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://schemas.microsoft.com/AutomationExtensibility", IncludeInSchema=false)] - public enum ItemsChoiceType1 { - - /// - AboutBoxDetails, - - /// - AboutIconData, - - /// - Assembly, - - /// - CommandLineSafe, - - /// - CommandPreload, - - /// - Description, - - /// - FriendlyName, - - /// - FullClassName, - - /// - LoadBehavior, - } - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "2.0.50727.42")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true)] - public partial class ExtensibilityHostApplication { - - private string[] itemsField; - - private ItemsChoiceType[] itemsElementNameField; - - /// - [System.Xml.Serialization.XmlElementAttribute("Name", typeof(string))] - [System.Xml.Serialization.XmlElementAttribute("Version", typeof(string))] - [System.Xml.Serialization.XmlChoiceIdentifierAttribute("ItemsElementName")] - public string[] Items { - get { - return this.itemsField; - } - set { - this.itemsField = value; - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute("ItemsElementName")] - [System.Xml.Serialization.XmlIgnoreAttribute()] - public ItemsChoiceType[] ItemsElementName { - get { - return this.itemsElementNameField; - } - set { - this.itemsElementNameField = value; - } - } - } - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "2.0.50727.42")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://schemas.microsoft.com/AutomationExtensibility", IncludeInSchema=false)] - public enum ItemsChoiceType { - - /// - Name, - - /// - Version, - } - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "2.0.50727.42")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true)] - public partial class ExtensibilityToolsOptionsPageCategory { - - private ExtensibilityToolsOptionsPageCategorySubCategory[] subCategoryField; - - private string nameField; - - /// - [System.Xml.Serialization.XmlElementAttribute("SubCategory")] - public ExtensibilityToolsOptionsPageCategorySubCategory[] SubCategory { - get { - return this.subCategoryField; - } - set { - this.subCategoryField = value; - } - } - - /// - [System.Xml.Serialization.XmlAttributeAttribute()] - public string Name { - get { - return this.nameField; - } - set { - this.nameField = value; - } - } - } - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "2.0.50727.42")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true)] - public partial class ExtensibilityToolsOptionsPageCategorySubCategory { - - private string[] itemsField; - - private ItemsChoiceType2[] itemsElementNameField; - - private string nameField; - - /// - [System.Xml.Serialization.XmlElementAttribute("Assembly", typeof(string))] - [System.Xml.Serialization.XmlElementAttribute("FullClassName", typeof(string))] - [System.Xml.Serialization.XmlChoiceIdentifierAttribute("ItemsElementName")] - public string[] Items { - get { - return this.itemsField; - } - set { - this.itemsField = value; - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute("ItemsElementName")] - [System.Xml.Serialization.XmlIgnoreAttribute()] - public ItemsChoiceType2[] ItemsElementName { - get { - return this.itemsElementNameField; - } - set { - this.itemsElementNameField = value; - } - } - - /// - [System.Xml.Serialization.XmlAttributeAttribute()] - public string Name { - get { - return this.nameField; - } - set { - this.nameField = value; - } - } - } - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "2.0.50727.42")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://schemas.microsoft.com/AutomationExtensibility", IncludeInSchema=false)] - public enum ItemsChoiceType2 { - - /// - Assembly, - - /// - FullClassName, - } -} +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:2.0.50727.42 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +// +// This source code was auto-generated by xsd, Version=2.0.50727.42. +// +namespace NMaven.Model { + using System.Xml.Serialization; + + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "2.0.50727.42")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + [System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true)] + [System.Xml.Serialization.XmlRootAttribute(Namespace="http://schemas.microsoft.com/AutomationExtensibility", IsNullable=false)] + public partial class Extensibility { + + private object[] itemsField; + + /// + [System.Xml.Serialization.XmlElementAttribute("Addin", typeof(ExtensibilityAddin))] + [System.Xml.Serialization.XmlElementAttribute("HostApplication", typeof(ExtensibilityHostApplication))] + [System.Xml.Serialization.XmlElementAttribute("ToolsOptionsPage", typeof(ExtensibilityToolsOptionsPageCategory[]))] + public object[] Items { + get { + return this.itemsField; + } + set { + this.itemsField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "2.0.50727.42")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + [System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true)] + public partial class ExtensibilityAddin { + + private string[] itemsField; + + private ItemsChoiceType1[] itemsElementNameField; + + /// + [System.Xml.Serialization.XmlElementAttribute("AboutBoxDetails", typeof(string))] + [System.Xml.Serialization.XmlElementAttribute("AboutIconData", typeof(string))] + [System.Xml.Serialization.XmlElementAttribute("Assembly", typeof(string))] + [System.Xml.Serialization.XmlElementAttribute("CommandLineSafe", typeof(string), DataType="integer")] + [System.Xml.Serialization.XmlElementAttribute("CommandPreload", typeof(string), DataType="integer")] + [System.Xml.Serialization.XmlElementAttribute("Description", typeof(string))] + [System.Xml.Serialization.XmlElementAttribute("FriendlyName", typeof(string))] + [System.Xml.Serialization.XmlElementAttribute("FullClassName", typeof(string))] + [System.Xml.Serialization.XmlElementAttribute("LoadBehavior", typeof(string), DataType="integer")] + [System.Xml.Serialization.XmlChoiceIdentifierAttribute("ItemsElementName")] + public string[] Items { + get { + return this.itemsField; + } + set { + this.itemsField = value; + } + } + + /// + [System.Xml.Serialization.XmlElementAttribute("ItemsElementName")] + [System.Xml.Serialization.XmlIgnoreAttribute()] + public ItemsChoiceType1[] ItemsElementName { + get { + return this.itemsElementNameField; + } + set { + this.itemsElementNameField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "2.0.50727.42")] + [System.SerializableAttribute()] + [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://schemas.microsoft.com/AutomationExtensibility", IncludeInSchema=false)] + public enum ItemsChoiceType1 { + + /// + AboutBoxDetails, + + /// + AboutIconData, + + /// + Assembly, + + /// + CommandLineSafe, + + /// + CommandPreload, + + /// + Description, + + /// + FriendlyName, + + /// + FullClassName, + + /// + LoadBehavior, + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "2.0.50727.42")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + [System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true)] + public partial class ExtensibilityHostApplication { + + private string[] itemsField; + + private ItemsChoiceType[] itemsElementNameField; + + /// + [System.Xml.Serialization.XmlElementAttribute("Name", typeof(string))] + [System.Xml.Serialization.XmlElementAttribute("Version", typeof(string))] + [System.Xml.Serialization.XmlChoiceIdentifierAttribute("ItemsElementName")] + public string[] Items { + get { + return this.itemsField; + } + set { + this.itemsField = value; + } + } + + /// + [System.Xml.Serialization.XmlElementAttribute("ItemsElementName")] + [System.Xml.Serialization.XmlIgnoreAttribute()] + public ItemsChoiceType[] ItemsElementName { + get { + return this.itemsElementNameField; + } + set { + this.itemsElementNameField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "2.0.50727.42")] + [System.SerializableAttribute()] + [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://schemas.microsoft.com/AutomationExtensibility", IncludeInSchema=false)] + public enum ItemsChoiceType { + + /// + Name, + + /// + Version, + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "2.0.50727.42")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + [System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true)] + public partial class ExtensibilityToolsOptionsPageCategory { + + private ExtensibilityToolsOptionsPageCategorySubCategory[] subCategoryField; + + private string nameField; + + /// + [System.Xml.Serialization.XmlElementAttribute("SubCategory")] + public ExtensibilityToolsOptionsPageCategorySubCategory[] SubCategory { + get { + return this.subCategoryField; + } + set { + this.subCategoryField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public string Name { + get { + return this.nameField; + } + set { + this.nameField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "2.0.50727.42")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + [System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true)] + public partial class ExtensibilityToolsOptionsPageCategorySubCategory { + + private string[] itemsField; + + private ItemsChoiceType2[] itemsElementNameField; + + private string nameField; + + /// + [System.Xml.Serialization.XmlElementAttribute("Assembly", typeof(string))] + [System.Xml.Serialization.XmlElementAttribute("FullClassName", typeof(string))] + [System.Xml.Serialization.XmlChoiceIdentifierAttribute("ItemsElementName")] + public string[] Items { + get { + return this.itemsField; + } + set { + this.itemsField = value; + } + } + + /// + [System.Xml.Serialization.XmlElementAttribute("ItemsElementName")] + [System.Xml.Serialization.XmlIgnoreAttribute()] + public ItemsChoiceType2[] ItemsElementName { + get { + return this.itemsElementNameField; + } + set { + this.itemsElementNameField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public string Name { + get { + return this.nameField; + } + set { + this.nameField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "2.0.50727.42")] + [System.SerializableAttribute()] + [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://schemas.microsoft.com/AutomationExtensibility", IncludeInSchema=false)] + public enum ItemsChoiceType2 { + + /// + Assembly, + + /// + FullClassName, + } +} Propchange: incubator/nmaven/branches/NMAVEN_0.14/assemblies/NMaven.Model/AutomationExtensibility/src/main/csharp/NMaven/Model/AutomationExtensibility.cs ------------------------------------------------------------------------------ svn:eol-style = native Propchange: incubator/nmaven/branches/NMAVEN_0.14/assemblies/NMaven.Model/Settings/src/main/csharp/Settings.cs ------------------------------------------------------------------------------ svn:eol-style = native Propchange: incubator/nmaven/branches/NMAVEN_0.14/assemblies/NMaven.Model/Settings/src/main/csharp/SettingsUtil.cs ------------------------------------------------------------------------------ svn:eol-style = native Propchange: incubator/nmaven/branches/NMAVEN_0.14/assemblies/NMaven.Model/VSContent/src/main/csharp/vscontent.cs ------------------------------------------------------------------------------ svn:eol-style = native Modified: incubator/nmaven/branches/NMAVEN_0.14/assemblies/NMaven.Plugin.Loader/src/main/csharp/NMaven/Plugin/Loader/PluginLoader.cs URL: http://svn.apache.org/viewvc/incubator/nmaven/branches/NMAVEN_0.14/assemblies/NMaven.Plugin.Loader/src/main/csharp/NMaven/Plugin/Loader/PluginLoader.cs?rev=672753&r1=672752&r2=672753&view=diff ============================================================================== --- incubator/nmaven/branches/NMAVEN_0.14/assemblies/NMaven.Plugin.Loader/src/main/csharp/NMaven/Plugin/Loader/PluginLoader.cs (original) +++ incubator/nmaven/branches/NMAVEN_0.14/assemblies/NMaven.Plugin.Loader/src/main/csharp/NMaven/Plugin/Loader/PluginLoader.cs Mon Jun 30 05:54:00 2008 @@ -1,125 +1,125 @@ -#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; -using System.IO; -using System.Reflection; -using System.Runtime.Remoting; -using NMaven.Plugin; - -namespace NMaven.Plugin.Loader -{ - /// - /// Provides methods for loading plugins and for creating Mojos. - /// - internal sealed class PluginLoader - { - internal PluginLoader() - { - } - - /// - /// Loads the specified plugin assembly file into the returned plugin application domain. - /// - /// the.NET maven plugin - /// application domain for .NET maven plugin - /// - internal AppDomain LoadPlugin(FileInfo pluginAssemblyFile) - { - Console.WriteLine("Loading Plugin: " + pluginAssemblyFile.DirectoryName); - AppDomainSetup setup = new AppDomainSetup(); - setup.ApplicationBase = pluginAssemblyFile.DirectoryName; - - AppDomain applicationDomain = AppDomain.CreateDomain("Loader", null, setup); - PluginDomainManager pluginDomainManager = (PluginDomainManager) applicationDomain.DomainManager; - pluginDomainManager.LoadPlugin(pluginAssemblyFile); - return applicationDomain; - } - - /// - /// Creates an instance of the specified mojo name within the specified application domain. - /// - /// the name of the mojo to create - /// the.NET maven plugin - /// the file containing the parameters to inject into an instance - /// of the specified mojo - /// - /// the application domain used to create the specified mojo name instance - /// an instance of the specified mojo name within the specified application domain - internal AbstractMojo CreateAbstractMojoFor(String mojoName, FileInfo pluginAssemblyFile, - FileInfo paramFile, AppDomain applicationDomain) - { - ObjectHandle objectHandle = - applicationDomain.CreateInstanceFrom(pluginAssemblyFile.FullName, mojoName); - AbstractMojo abstractMojo = (AbstractMojo) objectHandle.Unwrap(); - abstractMojo.InjectFields(paramFile.FullName); - return abstractMojo; - } - - public static int Main(string[] args) - { - string paramFilePath = GetArgFor("parameterFile", args); - string assemblyFilePath = GetArgFor("assemblyFile", args); - string mojoName = GetArgFor("mojoName", args); - Console.WriteLine("ParamFile = {0}, AssemblyFile = {1}, MojoName = {2}", - paramFilePath, assemblyFilePath, mojoName); - - if(paramFilePath == null || assemblyFilePath == null || mojoName == null) - { - Console.WriteLine("Missing arguement"); - return 1; - } - - FileInfo assemblyFile = new FileInfo(assemblyFilePath); - if (!assemblyFile.Exists) - { - Console.WriteLine("Assembly File does not exist: File = " + assemblyFile.FullName); - return 1; - } - FileInfo paramFile = new FileInfo(paramFilePath); - if (!paramFile.Exists) - { - Console.WriteLine("Param File does not exist: File = " + paramFile.FullName); - return 1; - } - - PluginLoader pluginLoader = new PluginLoader(); - AppDomain applicationDomain = pluginLoader.LoadPlugin(assemblyFile); - AbstractMojo abstractMojo = pluginLoader.CreateAbstractMojoFor(mojoName, - assemblyFile, - paramFile, - applicationDomain); - abstractMojo.Execute(); - return 0; - - } - - private static 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; - } - } -} +#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; +using System.IO; +using System.Reflection; +using System.Runtime.Remoting; +using NMaven.Plugin; + +namespace NMaven.Plugin.Loader +{ + /// + /// Provides methods for loading plugins and for creating Mojos. + /// + internal sealed class PluginLoader + { + internal PluginLoader() + { + } + + /// + /// Loads the specified plugin assembly file into the returned plugin application domain. + /// + /// the.NET maven plugin + /// application domain for .NET maven plugin + /// + internal AppDomain LoadPlugin(FileInfo pluginAssemblyFile) + { + Console.WriteLine("Loading Plugin: " + pluginAssemblyFile.DirectoryName); + AppDomainSetup setup = new AppDomainSetup(); + setup.ApplicationBase = pluginAssemblyFile.DirectoryName; + + AppDomain applicationDomain = AppDomain.CreateDomain("Loader", null, setup); + PluginDomainManager pluginDomainManager = (PluginDomainManager) applicationDomain.DomainManager; + pluginDomainManager.LoadPlugin(pluginAssemblyFile); + return applicationDomain; + } + + /// + /// Creates an instance of the specified mojo name within the specified application domain. + /// + /// the name of the mojo to create + /// the.NET maven plugin + /// the file containing the parameters to inject into an instance + /// of the specified mojo + /// + /// the application domain used to create the specified mojo name instance + /// an instance of the specified mojo name within the specified application domain + internal AbstractMojo CreateAbstractMojoFor(String mojoName, FileInfo pluginAssemblyFile, + FileInfo paramFile, AppDomain applicationDomain) + { + ObjectHandle objectHandle = + applicationDomain.CreateInstanceFrom(pluginAssemblyFile.FullName, mojoName); + AbstractMojo abstractMojo = (AbstractMojo) objectHandle.Unwrap(); + abstractMojo.InjectFields(paramFile.FullName); + return abstractMojo; + } + + public static int Main(string[] args) + { + string paramFilePath = GetArgFor("parameterFile", args); + string assemblyFilePath = GetArgFor("assemblyFile", args); + string mojoName = GetArgFor("mojoName", args); + Console.WriteLine("ParamFile = {0}, AssemblyFile = {1}, MojoName = {2}", + paramFilePath, assemblyFilePath, mojoName); + + if(paramFilePath == null || assemblyFilePath == null || mojoName == null) + { + Console.WriteLine("Missing arguement"); + return 1; + } + + FileInfo assemblyFile = new FileInfo(assemblyFilePath); + if (!assemblyFile.Exists) + { + Console.WriteLine("Assembly File does not exist: File = " + assemblyFile.FullName); + return 1; + } + FileInfo paramFile = new FileInfo(paramFilePath); + if (!paramFile.Exists) + { + Console.WriteLine("Param File does not exist: File = " + paramFile.FullName); + return 1; + } + + PluginLoader pluginLoader = new PluginLoader(); + AppDomain applicationDomain = pluginLoader.LoadPlugin(assemblyFile); + AbstractMojo abstractMojo = pluginLoader.CreateAbstractMojoFor(mojoName, + assemblyFile, + paramFile, + applicationDomain); + abstractMojo.Execute(); + return 0; + + } + + private static 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; + } + } +} Propchange: incubator/nmaven/branches/NMAVEN_0.14/assemblies/NMaven.Plugin.Loader/src/main/csharp/NMaven/Plugin/Loader/PluginLoader.cs ------------------------------------------------------------------------------ svn:eol-style = native Modified: incubator/nmaven/branches/NMAVEN_0.14/assemblies/NMaven.Plugin.MojoGenerator/src/main/csharp/NMaven/Plugin/MojoGenerator/Generator.cs URL: http://svn.apache.org/viewvc/incubator/nmaven/branches/NMAVEN_0.14/assemblies/NMaven.Plugin.MojoGenerator/src/main/csharp/NMaven/Plugin/MojoGenerator/Generator.cs?rev=672753&r1=672752&r2=672753&view=diff ============================================================================== --- incubator/nmaven/branches/NMAVEN_0.14/assemblies/NMaven.Plugin.MojoGenerator/src/main/csharp/NMaven/Plugin/MojoGenerator/Generator.cs (original) +++ incubator/nmaven/branches/NMAVEN_0.14/assemblies/NMaven.Plugin.MojoGenerator/src/main/csharp/NMaven/Plugin/MojoGenerator/Generator.cs Mon Jun 30 05:54:00 2008 @@ -1,151 +1,151 @@ -#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; -using System.Collections.Generic; -using System.IO; -using System.Reflection; -using System.Runtime.Remoting; -using System.Resources; -using System.Text; -using System.Xml.Serialization; - -using NMaven.Plugin; -using NMaven.Plugin.Generator; - -namespace NMaven.Plugin.MojoGenerator -{ - /// - /// Provides methods for loading plugins and for creating Mojos. - /// - internal sealed class Generator - { - internal Generator() - { - } - - /// - /// Loads the specified plugin assembly file into the returned plugin application domain. - /// - /// the.NET maven plugin - /// application domain for .NET maven plugin - /// - internal AppDomain GetApplicationDomainFor(FileInfo pluginAssemblyFile) - { - Console.WriteLine("Loading Generator: " + pluginAssemblyFile.DirectoryName); - AppDomainSetup setup = new AppDomainSetup(); - setup.ApplicationBase = pluginAssemblyFile.DirectoryName; - - AppDomain applicationDomain = AppDomain.CreateDomain("Loader", null, setup); - PluginDomainManager pluginDomainManager = (PluginDomainManager) applicationDomain.DomainManager; - pluginDomainManager.LoadPlugin(pluginAssemblyFile); - return applicationDomain; - } - - /// - /// Creates an instance of the specified mojo name within the specified application domain. - /// - /// the name of the mojo to create - /// the.NET maven plugin - /// the file containing the parameters to inject into an instance - /// of the specified mojo - /// - /// the application domain used to create the specified mojo name instance - /// an instance of the specified mojo name within the specified application domain - internal int BuildPluginProject(AppDomain applicationDomain, FileInfo pluginArtifact, - FileInfo outputDirectory, string groupId, string artifactId, - string version) - { - ObjectHandle objectHandle = - applicationDomain.CreateInstanceFrom(@pluginArtifact.FullName, - "NMaven.Plugin.Generator.JavaClassUnmarshaller"); - JavaClassUnmarshaller jcuRemote = (JavaClassUnmarshaller) objectHandle.Unwrap(); - List javaClasses = jcuRemote.GetMojosFor(artifactId, groupId); - JavaClassUnmarshaller jcuLocal = new JavaClassUnmarshaller(); - - char[] delim = {'.'}; - DirectoryInfo sourceDirectory = new DirectoryInfo(@outputDirectory.FullName + "/src/main/java/" - + artifactId.Replace('.', '/')); - sourceDirectory.Create(); - if(javaClasses.Count == 0) - { - Console.WriteLine("NMAVEN-000-000: There are no Mojos within the assembly: Artifact Id = " - + artifactId); - return 1; - } - - foreach(JavaClass javaClass in javaClasses) - { - string[] tokens = javaClass.ClassName.Split(delim); - string classFileName = tokens[tokens.Length - 1]; - FileInfo fileInfo = new FileInfo(sourceDirectory.FullName + "/" - + classFileName + ".java"); - jcuLocal.unmarshall(javaClass, fileInfo); - } - - ResourceManager resourceManager = new ResourceManager("NMaven.Plugin.MojoGenerator", - Assembly.GetExecutingAssembly()); - String pomXml = (String) resourceManager.GetObject("pom-java.xml"); - TextReader reader = new StringReader(pomXml); - XmlSerializer serializer = new XmlSerializer(typeof(NMaven.Model.Pom.Model)); - NMaven.Model.Pom.Model model = (NMaven.Model.Pom.Model) serializer.Deserialize(reader); - model.artifactId = artifactId + ".JavaBinding"; - model.groupId = groupId; - model.version = version; - model.name = artifactId + ".JavaBinding"; - - FileInfo outputPomXml = new FileInfo(@outputDirectory.FullName + "/pom-java.xml"); - TextWriter textWriter = new StreamWriter(@outputPomXml.FullName); - serializer.Serialize(textWriter, model); - return 0; - } - - public static int Main(string[] args) - { - - string targetAssemblyFile = GetArgFor("targetAssemblyFile", args); - string outputDirectory = GetArgFor("outputDirectory", args); - string pluginArtifactPath = GetArgFor("pluginArtifactPath", args); - string groupId = GetArgFor("groupId", args); - string artifactId = GetArgFor("artifactId", args); - string version = GetArgFor("artifactVersion", args); - - //Console.WriteLine("targetAssemblyFile = {0}, outputDirectory = {1}, pluginArtifactPath = {2}, version = {3}", - // targetAssemblyFile, outputDirectory, pluginArtifactPath, version); - Generator generator = new Generator(); - AppDomain applicationDomain = - generator.GetApplicationDomainFor(new FileInfo(targetAssemblyFile)); - return generator.BuildPluginProject(applicationDomain, new FileInfo(pluginArtifactPath), - new FileInfo(outputDirectory), - groupId, artifactId, version); - } - - private static 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; - } - } -} +#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; +using System.Collections.Generic; +using System.IO; +using System.Reflection; +using System.Runtime.Remoting; +using System.Resources; +using System.Text; +using System.Xml.Serialization; + +using NMaven.Plugin; +using NMaven.Plugin.Generator; + +namespace NMaven.Plugin.MojoGenerator +{ + /// + /// Provides methods for loading plugins and for creating Mojos. + /// + internal sealed class Generator + { + internal Generator() + { + } + + /// + /// Loads the specified plugin assembly file into the returned plugin application domain. + /// + /// the.NET maven plugin + /// application domain for .NET maven plugin + /// + internal AppDomain GetApplicationDomainFor(FileInfo pluginAssemblyFile) + { + Console.WriteLine("Loading Generator: " + pluginAssemblyFile.DirectoryName); + AppDomainSetup setup = new AppDomainSetup(); + setup.ApplicationBase = pluginAssemblyFile.DirectoryName; + + AppDomain applicationDomain = AppDomain.CreateDomain("Loader", null, setup); + PluginDomainManager pluginDomainManager = (PluginDomainManager) applicationDomain.DomainManager; + pluginDomainManager.LoadPlugin(pluginAssemblyFile); + return applicationDomain; + } + + /// + /// Creates an instance of the specified mojo name within the specified application domain. + /// + /// the name of the mojo to create + /// the.NET maven plugin + /// the file containing the parameters to inject into an instance + /// of the specified mojo + /// + /// the application domain used to create the specified mojo name instance + /// an instance of the specified mojo name within the specified application domain + internal int BuildPluginProject(AppDomain applicationDomain, FileInfo pluginArtifact, + FileInfo outputDirectory, string groupId, string artifactId, + string version) + { + ObjectHandle objectHandle = + applicationDomain.CreateInstanceFrom(@pluginArtifact.FullName, + "NMaven.Plugin.Generator.JavaClassUnmarshaller"); + JavaClassUnmarshaller jcuRemote = (JavaClassUnmarshaller) objectHandle.Unwrap(); + List javaClasses = jcuRemote.GetMojosFor(artifactId, groupId); + JavaClassUnmarshaller jcuLocal = new JavaClassUnmarshaller(); + + char[] delim = {'.'}; + DirectoryInfo sourceDirectory = new DirectoryInfo(@outputDirectory.FullName + "/src/main/java/" + + artifactId.Replace('.', '/')); + sourceDirectory.Create(); + if(javaClasses.Count == 0) + { + Console.WriteLine("NMAVEN-000-000: There are no Mojos within the assembly: Artifact Id = " + + artifactId); + return 1; + } + + foreach(JavaClass javaClass in javaClasses) + { + string[] tokens = javaClass.ClassName.Split(delim); + string classFileName = tokens[tokens.Length - 1]; + FileInfo fileInfo = new FileInfo(sourceDirectory.FullName + "/" + + classFileName + ".java"); + jcuLocal.unmarshall(javaClass, fileInfo); + } + + ResourceManager resourceManager = new ResourceManager("NMaven.Plugin.MojoGenerator", + Assembly.GetExecutingAssembly()); + String pomXml = (String) resourceManager.GetObject("pom-java.xml"); + TextReader reader = new StringReader(pomXml); + XmlSerializer serializer = new XmlSerializer(typeof(NMaven.Model.Pom.Model)); + NMaven.Model.Pom.Model model = (NMaven.Model.Pom.Model) serializer.Deserialize(reader); + model.artifactId = artifactId + ".JavaBinding"; + model.groupId = groupId; + model.version = version; + model.name = artifactId + ".JavaBinding"; + + FileInfo outputPomXml = new FileInfo(@outputDirectory.FullName + "/pom-java.xml"); + TextWriter textWriter = new StreamWriter(@outputPomXml.FullName); + serializer.Serialize(textWriter, model); + return 0; + } + + public static int Main(string[] args) + { + + string targetAssemblyFile = GetArgFor("targetAssemblyFile", args); + string outputDirectory = GetArgFor("outputDirectory", args); + string pluginArtifactPath = GetArgFor("pluginArtifactPath", args); + string groupId = GetArgFor("groupId", args); + string artifactId = GetArgFor("artifactId", args); + string version = GetArgFor("artifactVersion", args); + + //Console.WriteLine("targetAssemblyFile = {0}, outputDirectory = {1}, pluginArtifactPath = {2}, version = {3}", + // targetAssemblyFile, outputDirectory, pluginArtifactPath, version); + Generator generator = new Generator(); + AppDomain applicationDomain = + generator.GetApplicationDomainFor(new FileInfo(targetAssemblyFile)); + return generator.BuildPluginProject(applicationDomain, new FileInfo(pluginArtifactPath), + new FileInfo(outputDirectory), + groupId, artifactId, version); + } + + private static 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; + } + } +} Propchange: incubator/nmaven/branches/NMAVEN_0.14/assemblies/NMaven.Plugin.MojoGenerator/src/main/csharp/NMaven/Plugin/MojoGenerator/Generator.cs ------------------------------------------------------------------------------ svn:eol-style = native Modified: incubator/nmaven/branches/NMAVEN_0.14/assemblies/NMaven.Plugin.Runner/src/main/csharp/NMaven/Plugin/Launcher/PluginLauncher.cs URL: http://svn.apache.org/viewvc/incubator/nmaven/branches/NMAVEN_0.14/assemblies/NMaven.Plugin.Runner/src/main/csharp/NMaven/Plugin/Launcher/PluginLauncher.cs?rev=672753&r1=672752&r2=672753&view=diff ============================================================================== --- incubator/nmaven/branches/NMAVEN_0.14/assemblies/NMaven.Plugin.Runner/src/main/csharp/NMaven/Plugin/Launcher/PluginLauncher.cs (original) +++ incubator/nmaven/branches/NMAVEN_0.14/assemblies/NMaven.Plugin.Runner/src/main/csharp/NMaven/Plugin/Launcher/PluginLauncher.cs Mon Jun 30 05:54:00 2008 @@ -1,94 +1,94 @@ -#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; -using System.Reflection; -using System.Text; -using System.Diagnostics; - -namespace NMaven.Plugin.Launcher -{ - /// - /// Description of PluginLauncher. - /// - public class PluginLauncher - { - public PluginLauncher() - { - } - - [STAThread] - static int Main(string[] args) - { - - Console.WriteLine("NMAVEN: Start Process = " + DateTime.Now); - Console.WriteLine(@flattenArgs(args)); - String vendor = GetArgFor("vendor", args); - String startProcessAssembly = @GetArgFor("startProcessAssembly", args); - ProcessStartInfo processStartInfo = null; - - if(vendor != null && vendor.Equals("MONO")) - { - processStartInfo = - new ProcessStartInfo("mono", startProcessAssembly + " " + @flattenArgs(args)); - } - else - { - processStartInfo = - new ProcessStartInfo(startProcessAssembly, @flattenArgs(args)); - } - - String version = Assembly.GetExecutingAssembly().GetName().Version.ToString(); - - processStartInfo.EnvironmentVariables["APPDOMAIN_MANAGER_ASM"] - = "NMaven.Plugin, Version="+ version + ", PublicKeyToken=4b435f4d76e2f0e6, culture=neutral"; - processStartInfo.EnvironmentVariables["APPDOMAIN_MANAGER_TYPE"] - = "NMaven.Plugin.PluginDomainManager"; - - processStartInfo.UseShellExecute = false; - Process p = Process.Start(processStartInfo); - p.WaitForExit(); - Console.WriteLine("NMAVEN: End Process = " + DateTime.Now + "; exit code = " + p.ExitCode); - return p.ExitCode; - } - - private static 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; - } - - private static string flattenArgs(string[] args) - { - StringBuilder stringBuilder = new StringBuilder(); - foreach(string arg in args) - { - //Console.WriteLine("ARG {0}: ", arg); - stringBuilder.Append(@"""").Append(@arg).Append(@"""").Append(" "); - } - return stringBuilder.ToString(); - } - } -} +#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; +using System.Reflection; +using System.Text; +using System.Diagnostics; + +namespace NMaven.Plugin.Launcher +{ + /// + /// Description of PluginLauncher. + /// + public class PluginLauncher + { + public PluginLauncher() + { + } + + [STAThread] + static int Main(string[] args) + { + + Console.WriteLine("NMAVEN: Start Process = " + DateTime.Now); + Console.WriteLine(@flattenArgs(args)); + String vendor = GetArgFor("vendor", args); + String startProcessAssembly = @GetArgFor("startProcessAssembly", args); + ProcessStartInfo processStartInfo = null; + + if(vendor != null && vendor.Equals("MONO")) + { + processStartInfo = + new ProcessStartInfo("mono", startProcessAssembly + " " + @flattenArgs(args)); + } + else + { + processStartInfo = + new ProcessStartInfo(startProcessAssembly, @flattenArgs(args)); + } + + String version = Assembly.GetExecutingAssembly().GetName().Version.ToString(); + + processStartInfo.EnvironmentVariables["APPDOMAIN_MANAGER_ASM"] + = "NMaven.Plugin, Version="+ version + ", PublicKeyToken=4b435f4d76e2f0e6, culture=neutral"; + processStartInfo.EnvironmentVariables["APPDOMAIN_MANAGER_TYPE"] + = "NMaven.Plugin.PluginDomainManager"; + + processStartInfo.UseShellExecute = false; + Process p = Process.Start(processStartInfo); + p.WaitForExit(); + Console.WriteLine("NMAVEN: End Process = " + DateTime.Now + "; exit code = " + p.ExitCode); + return p.ExitCode; + } + + private static 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; + } + + private static string flattenArgs(string[] args) + { + StringBuilder stringBuilder = new StringBuilder(); + foreach(string arg in args) + { + //Console.WriteLine("ARG {0}: ", arg); + stringBuilder.Append(@"""").Append(@arg).Append(@"""").Append(" "); + } + return stringBuilder.ToString(); + } + } +} Propchange: incubator/nmaven/branches/NMAVEN_0.14/assemblies/NMaven.Plugin.Runner/src/main/csharp/NMaven/Plugin/Launcher/PluginLauncher.cs ------------------------------------------------------------------------------ svn:eol-style = native Modified: incubator/nmaven/branches/NMAVEN_0.14/assemblies/NMaven.Plugin/src/main/csharp/NMaven/Plugin/AbstractMojo.cs URL: http://svn.apache.org/viewvc/incubator/nmaven/branches/NMAVEN_0.14/assemblies/NMaven.Plugin/src/main/csharp/NMaven/Plugin/AbstractMojo.cs?rev=672753&r1=672752&r2=672753&view=diff ============================================================================== --- incubator/nmaven/branches/NMAVEN_0.14/assemblies/NMaven.Plugin/src/main/csharp/NMaven/Plugin/AbstractMojo.cs (original) +++ incubator/nmaven/branches/NMAVEN_0.14/assemblies/NMaven.Plugin/src/main/csharp/NMaven/Plugin/AbstractMojo.cs Mon Jun 30 05:54:00 2008 @@ -1,79 +1,79 @@ -#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; -using System.IO; -using System.Reflection; -using System.Xml; -using System.Xml.Serialization; - -using NMaven.Plugin.Injector; -using NMaven.Plugin.Injector.Impl; - -namespace NMaven.Plugin -{ - /// - /// Base class for Mojos. - /// - public abstract class AbstractMojo : MarshalByRefObject - { - public abstract void Execute(); - - public abstract Type GetMojoImplementationType(); - - /// - /// Injects values into fields of the child class using information from the specified - /// configuration file. - /// - /// The file that contains the values used to populate the fields - public void InjectFields(String configurationFile) - { - XmlTextReader reader = - new XmlTextReader(@configurationFile); - FieldInjectorRepository fieldInjectorRepository = new FieldInjectorRepository(); - - while(reader.Read() == true) - { - FieldInfo fieldInfo = GetFieldInfoFor(this.GetMojoImplementationType(), reader.Name); - if(fieldInfo != null) - { - IFieldInjector fieldInjector = fieldInjectorRepository.getFieldInjectorFor(fieldInfo); - fieldInjector.Inject(this, fieldInfo, reader.ReadString() ); - } - } - } - - // public List CreateJavaClassesForPlugin() - - private FieldInfo GetFieldInfoFor(Type type, String name) - { - foreach(FieldInfo field in type.GetFields()) - { - foreach (Attribute attribute in field.GetCustomAttributes(true)) - { - FieldAttribute fieldAttribute = (FieldAttribute) attribute; - if(fieldAttribute.Name.Equals(name)) - return field; - } - } - return null; - } - } -} +#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; +using System.IO; +using System.Reflection; +using System.Xml; +using System.Xml.Serialization; + +using NMaven.Plugin.Injector; +using NMaven.Plugin.Injector.Impl; + +namespace NMaven.Plugin +{ + /// + /// Base class for Mojos. + /// + public abstract class AbstractMojo : MarshalByRefObject + { + public abstract void Execute(); + + public abstract Type GetMojoImplementationType(); + + /// + /// Injects values into fields of the child class using information from the specified + /// configuration file. + /// + /// The file that contains the values used to populate the fields + public void InjectFields(String configurationFile) + { + XmlTextReader reader = + new XmlTextReader(@configurationFile); + FieldInjectorRepository fieldInjectorRepository = new FieldInjectorRepository(); + + while(reader.Read() == true) + { + FieldInfo fieldInfo = GetFieldInfoFor(this.GetMojoImplementationType(), reader.Name); + if(fieldInfo != null) + { + IFieldInjector fieldInjector = fieldInjectorRepository.getFieldInjectorFor(fieldInfo); + fieldInjector.Inject(this, fieldInfo, reader.ReadString() ); + } + } + } + + // public List CreateJavaClassesForPlugin() + + private FieldInfo GetFieldInfoFor(Type type, String name) + { + foreach(FieldInfo field in type.GetFields()) + { + foreach (Attribute attribute in field.GetCustomAttributes(true)) + { + FieldAttribute fieldAttribute = (FieldAttribute) attribute; + if(fieldAttribute.Name.Equals(name)) + return field; + } + } + return null; + } + } +} Propchange: incubator/nmaven/branches/NMAVEN_0.14/assemblies/NMaven.Plugin/src/main/csharp/NMaven/Plugin/AbstractMojo.cs ------------------------------------------------------------------------------ svn:eol-style = native Modified: incubator/nmaven/branches/NMAVEN_0.14/assemblies/NMaven.Plugin/src/main/csharp/NMaven/Plugin/ClassAttribute.cs URL: http://svn.apache.org/viewvc/incubator/nmaven/branches/NMAVEN_0.14/assemblies/NMaven.Plugin/src/main/csharp/NMaven/Plugin/ClassAttribute.cs?rev=672753&r1=672752&r2=672753&view=diff ============================================================================== --- incubator/nmaven/branches/NMAVEN_0.14/assemblies/NMaven.Plugin/src/main/csharp/NMaven/Plugin/ClassAttribute.cs (original) +++ incubator/nmaven/branches/NMAVEN_0.14/assemblies/NMaven.Plugin/src/main/csharp/NMaven/Plugin/ClassAttribute.cs Mon Jun 30 05:54:00 2008 @@ -1,61 +1,61 @@ -#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; - -namespace NMaven.Plugin -{ - /// - /// Description of ClassAttribute. - /// - [Serializable] - public sealed class ClassAttribute : Attribute - { - private string phase; - - private string goal; - - public string Phase - { - get - { - return phase; - } - - set - { - this.phase = value; - } - } - - public string Goal - { - get - { - return goal; - } - - set - { - this.goal = value; - } - } - } -} +#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; + +namespace NMaven.Plugin +{ + /// + /// Description of ClassAttribute. + /// + [Serializable] + public sealed class ClassAttribute : Attribute + { + private string phase; + + private string goal; + + public string Phase + { + get + { + return phase; + } + + set + { + this.phase = value; + } + } + + public string Goal + { + get + { + return goal; + } + + set + { + this.goal = value; + } + } + } +} Propchange: incubator/nmaven/branches/NMAVEN_0.14/assemblies/NMaven.Plugin/src/main/csharp/NMaven/Plugin/ClassAttribute.cs ------------------------------------------------------------------------------ svn:eol-style = native Modified: incubator/nmaven/branches/NMAVEN_0.14/assemblies/NMaven.Plugin/src/main/csharp/NMaven/Plugin/FieldAttribute.cs URL: http://svn.apache.org/viewvc/incubator/nmaven/branches/NMAVEN_0.14/assemblies/NMaven.Plugin/src/main/csharp/NMaven/Plugin/FieldAttribute.cs?rev=672753&r1=672752&r2=672753&view=diff ============================================================================== --- incubator/nmaven/branches/NMAVEN_0.14/assemblies/NMaven.Plugin/src/main/csharp/NMaven/Plugin/FieldAttribute.cs (original) +++ incubator/nmaven/branches/NMAVEN_0.14/assemblies/NMaven.Plugin/src/main/csharp/NMaven/Plugin/FieldAttribute.cs Mon Jun 30 05:54:00 2008 @@ -1,75 +1,75 @@ -#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; - -namespace NMaven.Plugin -{ - /// - /// Description of StringAttribute. - /// - public sealed class FieldAttribute : Attribute - { - private string name; - - private string expression; - - private string type; - - public FieldAttribute(string name) - { - this.name = name; - } - - public string Type - { - get - { - return type; - } - - set - { - this.type = value; - } - } - - public string Expression - { - get - { - return expression; - } - - set - { - this.expression = value; - } - } - - public string Name - { - get - { - return name; - } - } - } -} +#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; + +namespace NMaven.Plugin +{ + /// + /// Description of StringAttribute. + /// + public sealed class FieldAttribute : Attribute + { + private string name; + + private string expression; + + private string type; + + public FieldAttribute(string name) + { + this.name = name; + } + + public string Type + { + get + { + return type; + } + + set + { + this.type = value; + } + } + + public string Expression + { + get + { + return expression; + } + + set + { + this.expression = value; + } + } + + public string Name + { + get + { + return name; + } + } + } +} Propchange: incubator/nmaven/branches/NMAVEN_0.14/assemblies/NMaven.Plugin/src/main/csharp/NMaven/Plugin/FieldAttribute.cs ------------------------------------------------------------------------------ svn:eol-style = native Modified: incubator/nmaven/branches/NMAVEN_0.14/assemblies/NMaven.Plugin/src/main/csharp/NMaven/Plugin/FieldInjectorAttribute.cs URL: http://svn.apache.org/viewvc/incubator/nmaven/branches/NMAVEN_0.14/assemblies/NMaven.Plugin/src/main/csharp/NMaven/Plugin/FieldInjectorAttribute.cs?rev=672753&r1=672752&r2=672753&view=diff ============================================================================== --- incubator/nmaven/branches/NMAVEN_0.14/assemblies/NMaven.Plugin/src/main/csharp/NMaven/Plugin/FieldInjectorAttribute.cs (original) +++ incubator/nmaven/branches/NMAVEN_0.14/assemblies/NMaven.Plugin/src/main/csharp/NMaven/Plugin/FieldInjectorAttribute.cs Mon Jun 30 05:54:00 2008 @@ -1,45 +1,45 @@ -#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; - -namespace NMaven.Plugin -{ - /// - /// Description of FieldInjectorAttribute. - /// - public sealed class FieldInjectorAttribute : Attribute - { - private string targetClassName; - - public FieldInjectorAttribute(string targetClassName) - { - this.targetClassName = targetClassName; - } - - public string TargetClassName - { - get - { - return targetClassName; - } - } - } -} +#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; + +namespace NMaven.Plugin +{ + /// + /// Description of FieldInjectorAttribute. + /// + public sealed class FieldInjectorAttribute : Attribute + { + private string targetClassName; + + public FieldInjectorAttribute(string targetClassName) + { + this.targetClassName = targetClassName; + } + + public string TargetClassName + { + get + { + return targetClassName; + } + } + } +} Propchange: incubator/nmaven/branches/NMAVEN_0.14/assemblies/NMaven.Plugin/src/main/csharp/NMaven/Plugin/FieldInjectorAttribute.cs ------------------------------------------------------------------------------ svn:eol-style = native Modified: incubator/nmaven/branches/NMAVEN_0.14/assemblies/NMaven.Plugin/src/main/csharp/NMaven/Plugin/Generator/Code.cs URL: http://svn.apache.org/viewvc/incubator/nmaven/branches/NMAVEN_0.14/assemblies/NMaven.Plugin/src/main/csharp/NMaven/Plugin/Generator/Code.cs?rev=672753&r1=672752&r2=672753&view=diff ============================================================================== --- incubator/nmaven/branches/NMAVEN_0.14/assemblies/NMaven.Plugin/src/main/csharp/NMaven/Plugin/Generator/Code.cs (original) +++ incubator/nmaven/branches/NMAVEN_0.14/assemblies/NMaven.Plugin/src/main/csharp/NMaven/Plugin/Generator/Code.cs Mon Jun 30 05:54:00 2008 @@ -1,52 +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; -using System.Collections.Generic; - -namespace NMaven.Plugin.Generator -{ - /// - /// Description of Code. - /// - [Serializable] - public class Code - { - private List codeLines = new List(); - - public Code() - { - } - - public Code AddLine(String line) - { - codeLines.Add(line); - return this; - } - - public List CodeLines - { - get - { - return codeLines; - } - } - } -} +#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; +using System.Collections.Generic; + +namespace NMaven.Plugin.Generator +{ + /// + /// Description of Code. + /// + [Serializable] + public class Code + { + private List codeLines = new List(); + + public Code() + { + } + + public Code AddLine(String line) + { + codeLines.Add(line); + return this; + } + + public List CodeLines + { + get + { + return codeLines; + } + } + } +} Propchange: incubator/nmaven/branches/NMAVEN_0.14/assemblies/NMaven.Plugin/src/main/csharp/NMaven/Plugin/Generator/Code.cs ------------------------------------------------------------------------------ svn:eol-style = native Modified: incubator/nmaven/branches/NMAVEN_0.14/assemblies/NMaven.Plugin/src/main/csharp/NMaven/Plugin/Generator/ImportPackage.cs URL: http://svn.apache.org/viewvc/incubator/nmaven/branches/NMAVEN_0.14/assemblies/NMaven.Plugin/src/main/csharp/NMaven/Plugin/Generator/ImportPackage.cs?rev=672753&r1=672752&r2=672753&view=diff ============================================================================== --- incubator/nmaven/branches/NMAVEN_0.14/assemblies/NMaven.Plugin/src/main/csharp/NMaven/Plugin/Generator/ImportPackage.cs (original) +++ incubator/nmaven/branches/NMAVEN_0.14/assemblies/NMaven.Plugin/src/main/csharp/NMaven/Plugin/Generator/ImportPackage.cs Mon Jun 30 05:54:00 2008 @@ -1,52 +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; -using System.Collections.Generic; - -namespace NMaven.Plugin.Generator -{ - /// - /// Description of ImportPackage. - /// - [Serializable] - public class ImportPackage - { - private List packages = new List(); - - public ImportPackage() - { - } - - public ImportPackage AddPackage(String line) - { - packages.Add(line); - return this; - } - - public List Packages - { - get - { - return packages; - } - } - } -} +#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; +using System.Collections.Generic; + +namespace NMaven.Plugin.Generator +{ + /// + /// Description of ImportPackage. + /// + [Serializable] + public class ImportPackage + { + private List packages = new List(); + + public ImportPackage() + { + } + + public ImportPackage AddPackage(String line) + { + packages.Add(line); + return this; + } + + public List Packages + { + get + { + return packages; + } + } + } +} Propchange: incubator/nmaven/branches/NMAVEN_0.14/assemblies/NMaven.Plugin/src/main/csharp/NMaven/Plugin/Generator/ImportPackage.cs ------------------------------------------------------------------------------ svn:eol-style = native Modified: incubator/nmaven/branches/NMAVEN_0.14/assemblies/NMaven.Plugin/src/main/csharp/NMaven/Plugin/Generator/JavaClass.cs URL: http://svn.apache.org/viewvc/incubator/nmaven/branches/NMAVEN_0.14/assemblies/NMaven.Plugin/src/main/csharp/NMaven/Plugin/Generator/JavaClass.cs?rev=672753&r1=672752&r2=672753&view=diff ============================================================================== --- incubator/nmaven/branches/NMAVEN_0.14/assemblies/NMaven.Plugin/src/main/csharp/NMaven/Plugin/Generator/JavaClass.cs (original) +++ incubator/nmaven/branches/NMAVEN_0.14/assemblies/NMaven.Plugin/src/main/csharp/NMaven/Plugin/Generator/JavaClass.cs Mon Jun 30 05:54:00 2008 @@ -1,137 +1,137 @@ -#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; -using System.Collections.Generic; - -namespace NMaven.Plugin.Generator -{ - /// - /// Description of JavaClass. - /// - [Serializable] - public class JavaClass - { - private string className; - - private string packageName; - - private string extendsClassName; - - private List comments; - - private List javaFields; - - private List javaMethods; - - private ImportPackage importPackage; - - public List JavaMethods - { - get - { - return javaMethods; - } - - set - { - this.javaMethods = value; - } - } - - public ImportPackage ImportPackage - { - get - { - return importPackage; - } - - set - { - this.importPackage = value; - } - } - - public string ClassName - { - get - { - return className; - } - - set - { - this.className = value; - } - } - - public List Comments - { - get - { - return comments; - } - - set - { - this.comments = value; - } - } - - public List JavaFields - { - get - { - return javaFields; - } - - set - { - this.javaFields = value; - } - } - - public string ExtendsClassName - { - get - { - return extendsClassName; - } - - set - { - this.extendsClassName = value; - } - } - - public string PackageName - { - get - { - return packageName; - } - - set - { - this.packageName = value; - } - } - } -} +#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; +using System.Collections.Generic; + +namespace NMaven.Plugin.Generator +{ + /// + /// Description of JavaClass. + /// + [Serializable] + public class JavaClass + { + private string className; + + private string packageName; + + private string extendsClassName; + + private List comments; + + private List javaFields; + + private List javaMethods; + + private ImportPackage importPackage; + + public List JavaMethods + { + get + { + return javaMethods; + } + + set + { + this.javaMethods = value; + } + } + + public ImportPackage ImportPackage + { + get + { + return importPackage; + } + + set + { + this.importPackage = value; + } + } + + public string ClassName + { + get + { + return className; + } + + set + { + this.className = value; + } + } + + public List Comments + { + get + { + return comments; + } + + set + { + this.comments = value; + } + } + + public List JavaFields + { + get + { + return javaFields; + } + + set + { + this.javaFields = value; + } + } + + public string ExtendsClassName + { + get + { + return extendsClassName; + } + + set + { + this.extendsClassName = value; + } + } + + public string PackageName + { + get + { + return packageName; + } + + set + { + this.packageName = value; + } + } + } +} Propchange: incubator/nmaven/branches/NMAVEN_0.14/assemblies/NMaven.Plugin/src/main/csharp/NMaven/Plugin/Generator/JavaClass.cs ------------------------------------------------------------------------------ svn:eol-style = native