Author: brett Date: Thu Mar 20 02:15:04 2014 New Revision: 1579507 URL: http://svn.apache.org/r1579507 Log: re-model profiles
Restructure the profile model for compiler plugins only, to better match the behaviour used for platforms. This avoids redundancy in declaring the frameworks and compiler switches again. Only affects the loading of the repository, as it will generate individual capabilities for each profile out of that. Modified: incubator/npanday/trunk/components/dotnet-core/src/main/resources/META-INF/npanday/compiler-plugins.xml incubator/npanday/trunk/components/dotnet-executable/src/main/java/npanday/executable/impl/CompilerPluginsRepository.java incubator/npanday/trunk/components/dotnet-model/compiler-plugins/compiler-plugins.mdo incubator/npanday/trunk/components/dotnet-model/compiler-plugins/src/test/resources/sample-compiler-plugins.xml Modified: incubator/npanday/trunk/components/dotnet-core/src/main/resources/META-INF/npanday/compiler-plugins.xml URL: http://svn.apache.org/viewvc/incubator/npanday/trunk/components/dotnet-core/src/main/resources/META-INF/npanday/compiler-plugins.xml?rev=1579507&r1=1579506&r2=1579507&view=diff ============================================================================== --- incubator/npanday/trunk/components/dotnet-core/src/main/resources/META-INF/npanday/compiler-plugins.xml (original) +++ incubator/npanday/trunk/components/dotnet-core/src/main/resources/META-INF/npanday/compiler-plugins.xml Thu Mar 20 02:15:04 2014 @@ -23,7 +23,6 @@ <vendor>MICROSOFT</vendor> <executable>csc</executable> <language>C_SHARP</language> - <profile>FULL</profile> <frameworkVersions> <frameworkVersion>1.1.4322</frameworkVersion> </frameworkVersions> @@ -78,7 +77,6 @@ <vendor>MICROSOFT</vendor> <executable>csc</executable> <language>C_SHARP</language> - <profile>FULL</profile> <frameworkVersions> <frameworkVersion>2.0.50727</frameworkVersion> </frameworkVersions> @@ -139,7 +137,6 @@ <vendor>MICROSOFT</vendor> <executable>csc</executable> <language>C_SHARP</language> - <profile>FULL</profile> <frameworkVersions> <frameworkVersion>3.5</frameworkVersion> <frameworkVersion>3.0</frameworkVersion> @@ -204,7 +201,28 @@ <vendor>MICROSOFT</vendor> <executable>csc</executable> <language>C_SHARP</language> - <profile>COMPACT</profile> + <profiles> + <profile> + <id>COMPACT</id> + <defaultAssemblyPath>C:\Program Files\Microsoft.NET\SDK\CompactFramework\v3.5\WindowsCE</defaultAssemblyPath> + <assemblies> + <assembly>mscorlib</assembly> + <assembly>System.Data</assembly> + <assembly>System</assembly> + <assembly>System.Drawing</assembly> + <assembly>System.Messaging</assembly> + <assembly>System.Web.Services</assembly> + <assembly>System.Windows.Forms.DataGrid</assembly> + <assembly>System.Windows.Forms</assembly> + <assembly>Microsoft.WindowsCE.Forms</assembly> + <assembly>System.Xml</assembly> + <assembly>System.Core</assembly> + <assembly>System.Data.DataSetExtensions</assembly> + <assembly>System.Xml.Linq</assembly> + <assembly>Microsoft.Transactions.Bridge</assembly> + </assemblies> + </profile> + </profiles> <frameworkVersions> <frameworkVersion>3.5</frameworkVersion> <frameworkVersion>3.0</frameworkVersion> @@ -216,23 +234,6 @@ <architecture>x86</architecture> </platform> </platforms> - <defaultAssemblyPath>C:\Program Files\Microsoft.NET\SDK\CompactFramework\v3.5\WindowsCE</defaultAssemblyPath> - <assemblies> - <assembly>mscorlib</assembly> - <assembly>System.Data</assembly> - <assembly>System</assembly> - <assembly>System.Drawing</assembly> - <assembly>System.Messaging</assembly> - <assembly>System.Web.Services</assembly> - <assembly>System.Windows.Forms.DataGrid</assembly> - <assembly>System.Windows.Forms</assembly> - <assembly>Microsoft.WindowsCE.Forms</assembly> - <assembly>System.Xml</assembly> - <assembly>System.Core</assembly> - <assembly>System.Data.DataSetExtensions</assembly> - <assembly>System.Xml.Linq</assembly> - <assembly>Microsoft.Transactions.Bridge</assembly> - </assemblies> <commandFilter> <includes> <include>addmodule</include> @@ -286,7 +287,6 @@ <vendor>MICROSOFT</vendor> <executable>csc</executable> <language>C_SHARP</language> - <profile>FULL</profile> <frameworkVersions> <frameworkVersion>4.5.1</frameworkVersion> <frameworkVersion>4.5</frameworkVersion> @@ -356,7 +356,6 @@ <vendor>MICROSOFT</vendor> <executable>csc</executable> <language>C_SHARP</language> - <profile>FULL</profile> <frameworkVersions> <frameworkVersion>4.5</frameworkVersion> <frameworkVersion>4.0</frameworkVersion> @@ -425,7 +424,6 @@ <vendor>MICROSOFT</vendor> <executable>csc</executable> <language>C_SHARP</language> - <profile>FULL</profile> <frameworkVersions> <frameworkVersion>4.0</frameworkVersion> <frameworkVersion>3.5</frameworkVersion> @@ -488,12 +486,94 @@ </commandFilter> </compilerPlugin> <compilerPlugin> - <identifier>MS-CS:4.0+.NETPortable,Profile1</identifier> + <identifier>MS-CS:4.0+.NETPortable</identifier> <pluginClass>npanday.executable.compiler.impl.CSharpCompilerForProfile</pluginClass> <vendor>MICROSOFT</vendor> <executable>csc</executable> <language>C_SHARP</language> - <profile>.NETPortable,Profile1</profile> + <profiles> + <profile> + <id>.NETPortable,Profile1</id> + <targetFramework>.NETPortable,Version=v4.0,Profile=Profile1</targetFramework> + <defaultAssemblyPath>C:\Program Files\Reference Assemblies\Microsoft\Framework\.NETPortable\v4.0\Profile\Profile1</defaultAssemblyPath> + <assemblies> + <assembly>mscorlib</assembly> + <assembly>System</assembly> + <assembly>System.Core</assembly> + <assembly>System.Xml</assembly> + <assembly>System.Xml.Serialization</assembly> + </assemblies> + </profile> + <profile> + <id>.NETPortable,Profile2</id> + <targetFramework>.NETPortable,Version=v4.0,Profile=Profile2</targetFramework> + <defaultAssemblyPath>C:\Program Files\Reference Assemblies\Microsoft\Framework\.NETPortable\v4.0\Profile\Profile2</defaultAssemblyPath> + <assemblies> + <assembly>mscorlib</assembly> + <assembly>System</assembly> + <assembly>System.Core</assembly> + <assembly>System.Net</assembly> + <assembly>System.Runtime.Serialization</assembly> + <assembly>System.ServiceModel</assembly> + <assembly>System.Xml</assembly> + <assembly>System.Xml.Serialization</assembly> + </assemblies> + </profile> + <profile> + <id>.NETPortable,Profile3</id> + <targetFramework>.NETPortable,Version=v4.0,Profile=Profile3</targetFramework> + <defaultAssemblyPath>C:\Program Files\Reference Assemblies\Microsoft\Framework\.NETPortable\v4.0\Profile\Profile3</defaultAssemblyPath> + <assemblies> + <assembly>mscorlib</assembly> + <assembly>System</assembly> + <assembly>System.ComponentModel.Composition</assembly> + <assembly>System.Core</assembly> + <assembly>System.Net</assembly> + <assembly>System.Runtime.Serialization</assembly> + <assembly>System.ServiceModel</assembly> + <assembly>System.Xml</assembly> + <assembly>System.Xml.Serialization</assembly> + </assemblies> + </profile> + <profile> + <id>.NETPortable,Profile4</id> + <targetFramework>.NETPortable,Version=v4.0,Profile=Profile4</targetFramework> + <defaultAssemblyPath>C:\Program Files\Reference Assemblies\Microsoft\Framework\.NETPortable\v4.0\Profile\Profile4</defaultAssemblyPath> + <assemblies> + <assembly>mscorlib</assembly> + <assembly>System</assembly> + <assembly>System.Core</assembly> + <assembly>System.Net</assembly> + <assembly>System.Runtime.Serialization</assembly> + <assembly>System.ServiceModel</assembly> + <assembly>System.Windows</assembly> + <assembly>System.Xml</assembly> + <assembly>System.Xml.Serialization</assembly> + </assemblies> + </profile> + <profile> + <id>.NETPortable,Profile24</id> + <targetFramework>.NETPortable,Version=v4.0,Profile=Profile24</targetFramework> + <defaultAssemblyPath>C:\Program Files\Reference Assemblies\Microsoft\Framework\.NETPortable\v4.0\Profile\Profile24</defaultAssemblyPath> + <assemblies> + <assembly>mscorlib</assembly> + <assembly>Microsoft.CSharp</assembly> + <assembly>System.ComponentModel.Composition</assembly> + <assembly>System.ComponentModel.DataAnnotations</assembly> + <assembly>System</assembly> + <assembly>System.Core</assembly> + <assembly>System.Net</assembly> + <assembly>System.Numerics</assembly> + <assembly>System.Runtime.Serialization</assembly> + <assembly>System.ServiceModel</assembly> + <assembly>System.ServiceModel.Web</assembly> + <assembly>System.Windows</assembly> + <assembly>System.Xml</assembly> + <assembly>System.Xml.Linq</assembly> + <assembly>System.Xml.Serialization</assembly> + </assemblies> + </profile> + </profiles> <frameworkVersions> <frameworkVersion>4.0</frameworkVersion> </frameworkVersions> @@ -503,247 +583,6 @@ <architecture>x86</architecture> </platform> </platforms> - <targetFramework>.NETPortable,Version=v4.0,Profile=Profile1</targetFramework> - <defaultAssemblyPath>C:\Program Files\Reference Assemblies\Microsoft\Framework\.NETPortable\v4.0\Profile\Profile1</defaultAssemblyPath> - <assemblies> - <assembly>mscorlib</assembly> - <assembly>System</assembly> - <assembly>System.Core</assembly> - <assembly>System.Xml</assembly> - </assemblies> - <commandFilter> - <includes> - <include>addmodule</include> - <include>appconfig</include> - <include>baseaddress</include> - <include>bugreport</include> - <include>checked</include> - <include>codepage</include> - <include>debug</include> - <include>define</include> - <include>delaysign</include> - <include>doc</include> - <include>errorreport</include> - <include>filealign</include> - <include>fullpaths</include> - <!-- ignored: - <include>help</include> - <include>incremental</include> - --> - <include>keycontainer</include> - <include>keyfile</include> - <include>langversion</include> - <include>lib</include> - <include>link</include> - <include>linkresource</include> - <include>main</include> - <include>noconfig</include> - <include>nologo</include> - <include>nostdlib</include> - <include>nowarn</include> - <include>nowin32manifest</include> - <include>optimize</include> - <include>out</include> - <include>pdb</include> - <include>platform</include> - <include>recurse</include> - <include>reference</include> - <include>resource</include> - <include>target</include> - <include>unsafe</include> - <include>utf8output</include> - <include>warn</include> - <include>warnaserror</include> - <include>win32icon</include> - <include>win32manifest</include> - <include>win32res</include> - </includes> - </commandFilter> - </compilerPlugin> - <compilerPlugin> - <identifier>MS-CS:4.0+.NETPortable,Profile2</identifier> - <pluginClass>npanday.executable.compiler.impl.CSharpCompilerForProfile</pluginClass> - <vendor>MICROSOFT</vendor> - <executable>csc</executable> - <language>C_SHARP</language> - <profile>.NETPortable,Profile2</profile> - <frameworkVersions> - <frameworkVersion>4.0</frameworkVersion> - </frameworkVersions> - <platforms> - <platform> - <operatingSystem>Windows</operatingSystem> - <architecture>x86</architecture> - </platform> - </platforms> - <targetFramework>.NETPortable,Version=v4.0,Profile=Profile2</targetFramework> - <defaultAssemblyPath>C:\Program Files\Reference Assemblies\Microsoft\Framework\.NETPortable\v4.0\Profile\Profile2</defaultAssemblyPath> - <assemblies> - <assembly>mscorlib</assembly> - <assembly>System</assembly> - <assembly>System.Core</assembly> - <assembly>System.Net</assembly> - <assembly>System.Runtime.Serialization</assembly> - <assembly>System.ServiceModel</assembly> - <assembly>System.Xml</assembly> - <assembly>System.Xml.Serialization</assembly> - </assemblies> - <commandFilter> - <includes> - <include>addmodule</include> - <include>appconfig</include> - <include>baseaddress</include> - <include>bugreport</include> - <include>checked</include> - <include>codepage</include> - <include>debug</include> - <include>define</include> - <include>delaysign</include> - <include>doc</include> - <include>errorreport</include> - <include>filealign</include> - <include>fullpaths</include> - <!-- ignored: - <include>help</include> - <include>incremental</include> - --> - <include>keycontainer</include> - <include>keyfile</include> - <include>langversion</include> - <include>lib</include> - <include>link</include> - <include>linkresource</include> - <include>main</include> - <include>noconfig</include> - <include>nologo</include> - <include>nostdlib</include> - <include>nowarn</include> - <include>nowin32manifest</include> - <include>optimize</include> - <include>out</include> - <include>pdb</include> - <include>platform</include> - <include>recurse</include> - <include>reference</include> - <include>resource</include> - <include>target</include> - <include>unsafe</include> - <include>utf8output</include> - <include>warn</include> - <include>warnaserror</include> - <include>win32icon</include> - <include>win32manifest</include> - <include>win32res</include> - </includes> - </commandFilter> - </compilerPlugin> - <compilerPlugin> - <identifier>MS-CS:4.0+.NETPortable,Profile3</identifier> - <pluginClass>npanday.executable.compiler.impl.CSharpCompilerForProfile</pluginClass> - <vendor>MICROSOFT</vendor> - <executable>csc</executable> - <language>C_SHARP</language> - <profile>.NETPortable,Profile3</profile> - <frameworkVersions> - <frameworkVersion>4.0</frameworkVersion> - </frameworkVersions> - <platforms> - <platform> - <operatingSystem>Windows</operatingSystem> - <architecture>x86</architecture> - </platform> - </platforms> - <targetFramework>.NETPortable,Version=v4.0,Profile=Profile3</targetFramework> - <defaultAssemblyPath>C:\Program Files\Reference Assemblies\Microsoft\Framework\.NETPortable\v4.0\Profile\Profile3</defaultAssemblyPath> - <assemblies> - <assembly>mscorlib</assembly> - <assembly>System</assembly> - <assembly>System.ComponentModel.Composition</assembly> - <assembly>System.Core</assembly> - <assembly>System.Net</assembly> - <assembly>System.Runtime.Serialization</assembly> - <assembly>System.ServiceModel</assembly> - <assembly>System.Xml</assembly> - <assembly>System.Xml.Serialization</assembly> - </assemblies> - <commandFilter> - <includes> - <include>addmodule</include> - <include>appconfig</include> - <include>baseaddress</include> - <include>bugreport</include> - <include>checked</include> - <include>codepage</include> - <include>debug</include> - <include>define</include> - <include>delaysign</include> - <include>doc</include> - <include>errorreport</include> - <include>filealign</include> - <include>fullpaths</include> - <!-- ignored: - <include>help</include> - <include>incremental</include> - --> - <include>keycontainer</include> - <include>keyfile</include> - <include>langversion</include> - <include>lib</include> - <include>link</include> - <include>linkresource</include> - <include>main</include> - <include>noconfig</include> - <include>nologo</include> - <include>nostdlib</include> - <include>nowarn</include> - <include>nowin32manifest</include> - <include>optimize</include> - <include>out</include> - <include>pdb</include> - <include>platform</include> - <include>recurse</include> - <include>reference</include> - <include>resource</include> - <include>target</include> - <include>unsafe</include> - <include>utf8output</include> - <include>warn</include> - <include>warnaserror</include> - <include>win32icon</include> - <include>win32manifest</include> - <include>win32res</include> - </includes> - </commandFilter> - </compilerPlugin> - <compilerPlugin> - <identifier>MS-CS:4.0+.NETPortable,Profile4</identifier> - <pluginClass>npanday.executable.compiler.impl.CSharpCompilerForProfile</pluginClass> - <vendor>MICROSOFT</vendor> - <executable>csc</executable> - <language>C_SHARP</language> - <profile>.NETPortable,Profile4</profile> - <frameworkVersions> - <frameworkVersion>4.0</frameworkVersion> - </frameworkVersions> - <platforms> - <platform> - <operatingSystem>Windows</operatingSystem> - <architecture>x86</architecture> - </platform> - </platforms> - <targetFramework>.NETPortable,Version=v4.0,Profile=Profile4</targetFramework> - <defaultAssemblyPath>C:\Program Files\Reference Assemblies\Microsoft\Framework\.NETPortable\v4.0\Profile\Profile4</defaultAssemblyPath> - <assemblies> - <assembly>mscorlib</assembly> - <assembly>System</assembly> - <assembly>System.Core</assembly> - <assembly>System.Net</assembly> - <assembly>System.Runtime.Serialization</assembly> - <assembly>System.ServiceModel</assembly> - <assembly>System.Windows</assembly> - <assembly>System.Xml</assembly> - <assembly>System.Xml.Serialization</assembly> - </assemblies> <commandFilter> <includes> <include>addmodule</include> @@ -799,7 +638,6 @@ <vendor>MICROSOFT</vendor> <executable>vbc</executable> <language>VB</language> - <profile>FULL</profile> <frameworkVersions> <frameworkVersion>4.5</frameworkVersion> <frameworkVersion>4.0</frameworkVersion> @@ -875,7 +713,6 @@ <vendor>MICROSOFT</vendor> <executable>aspnet_compiler</executable> <language>ASP</language> - <profile>FULL</profile> <frameworkVersions> <frameworkVersion>2.0.50727</frameworkVersion> <frameworkVersion>3.0</frameworkVersion> @@ -912,7 +749,6 @@ <pluginClass>npanday.executable.compiler.impl.DefaultCompiler</pluginClass> <vendor>MONO</vendor> <language>C_SHARP</language> - <profile>FULL</profile> <executable>mcs</executable> <frameworkVersions> <frameworkVersion>1.1.4322</frameworkVersion> @@ -968,7 +804,6 @@ <pluginClass>npanday.executable.compiler.impl.DefaultCompiler</pluginClass> <vendor>MONO</vendor> <language>VB</language> - <profile>FULL</profile> <executable>vbnc</executable> <frameworkVersions> <frameworkVersion>2.0.50727</frameworkVersion> @@ -1041,7 +876,6 @@ <pluginClass>npanday.executable.compiler.impl.DefaultCompiler</pluginClass> <vendor>MONO</vendor> <language>C_SHARP</language> - <profile>FULL</profile> <executable>gmcs</executable> <frameworkVersions> <frameworkVersion>2.0.50727</frameworkVersion> @@ -1099,7 +933,6 @@ <pluginClass>npanday.executable.compiler.impl.DefaultCompiler</pluginClass> <vendor>MONO</vendor> <language>C_SHARP</language> - <profile>FULL</profile> <executable>dmcs</executable> <frameworkVersions> <frameworkVersion>4.0</frameworkVersion> @@ -1151,255 +984,71 @@ </commandFilter> </compilerPlugin> <compilerPlugin> - <identifier>MONO-CS:4.0+.NETPortable,Profile1</identifier> - <pluginClass>npanday.executable.compiler.impl.CSharpCompilerForProfile</pluginClass> - <vendor>MONO</vendor> - <executable>dmcs</executable> - <language>C_SHARP</language> - <profile>.NETPortable,Profile1</profile> - <frameworkVersions> - <frameworkVersion>4.0</frameworkVersion> - </frameworkVersions> - <platforms> - <platform> - <operatingSystem>Windows</operatingSystem> - </platform> - <platform> - <operatingSystem>Mac OS X</operatingSystem> - </platform> - <platform> - <operatingSystem>Linux</operatingSystem> - </platform> - <platform> - <operatingSystem>Solaris</operatingSystem> - </platform> - <platform> - <operatingSystem>FreeBSD</operatingSystem> - </platform> - </platforms> - <targetFramework>.NETPortable,Version=v4.0,Profile=Profile1</targetFramework> - <!-- Mono 2.10.2 missing .NETPortable defaultAssemblyPath, requires profileAssemblyPath --> - <assemblies> - <assembly>mscorlib</assembly> - <assembly>System</assembly> - <assembly>System.Core</assembly> - <assembly>System.Xml</assembly> - </assemblies> - <commandFilter> - <includes> - <include>out</include> - <include>target</include> - <include>delaysign</include> - <include>doc</include> - <include>keyfile</include> - <include>keycontainer</include> - <include>platform</include> - <include>recurse</include> - <include>reference</include> - <include>addmodule</include> - <include>win32res</include> - <include>win32icon</include> - <include>resource</include> - <include>linkresource</include> - <include>debug</include> - <include>optimize</include> - <include>warnaserror</include> - <include>warn</include> - <include>nowarn</include> - <include>checked</include> - <include>unsafe</include> - <include>define</include> - <include>langversion</include> - <include>help</include> - <include>nologo</include> - <include>noconfig</include> - <include>baseaddress</include> - <include>bugreport</include> - <include>codepage</include> - <include>utf8output</include> - <include>main</include> - <include>fullpaths</include> - <include>filealign</include> - <include>pdb</include> - <include>nostdlib</include> - <include>lib</include> - <include>errorreport</include> - <include>moduleassemblyname</include> - </includes> - </commandFilter> - </compilerPlugin> - <compilerPlugin> - <identifier>MONO-CS:4.0+.NETPortable,Profile2</identifier> - <pluginClass>npanday.executable.compiler.impl.CSharpCompilerForProfile</pluginClass> - <vendor>MONO</vendor> - <executable>dmcs</executable> - <language>C_SHARP</language> - <profile>.NETPortable,Profile2</profile> - <frameworkVersions> - <frameworkVersion>4.0</frameworkVersion> - </frameworkVersions> - <platforms> - <platform> - <operatingSystem>Windows</operatingSystem> - </platform> - <platform> - <operatingSystem>Mac OS X</operatingSystem> - </platform> - <platform> - <operatingSystem>Linux</operatingSystem> - </platform> - <platform> - <operatingSystem>Solaris</operatingSystem> - </platform> - <platform> - <operatingSystem>FreeBSD</operatingSystem> - </platform> - </platforms> - <targetFramework>.NETPortable,Version=v4.0,Profile=Profile2</targetFramework> - <!-- Mono 2.10.2 missing .NETPortable defaultAssemblyPath, requires profileAssemblyPath --> - <assemblies> - <assembly>mscorlib</assembly> - <assembly>System</assembly> - <assembly>System.Core</assembly> - <assembly>System.Net</assembly> - <assembly>System.Runtime.Serialization</assembly> - <assembly>System.ServiceModel</assembly> - <assembly>System.Xml</assembly> - <assembly>System.Xml.Serialization</assembly> - </assemblies> - <commandFilter> - <includes> - <include>out</include> - <include>target</include> - <include>delaysign</include> - <include>doc</include> - <include>keyfile</include> - <include>keycontainer</include> - <include>platform</include> - <include>recurse</include> - <include>reference</include> - <include>addmodule</include> - <include>win32res</include> - <include>win32icon</include> - <include>resource</include> - <include>linkresource</include> - <include>debug</include> - <include>optimize</include> - <include>warnaserror</include> - <include>warn</include> - <include>nowarn</include> - <include>checked</include> - <include>unsafe</include> - <include>define</include> - <include>langversion</include> - <include>help</include> - <include>nologo</include> - <include>noconfig</include> - <include>baseaddress</include> - <include>bugreport</include> - <include>codepage</include> - <include>utf8output</include> - <include>main</include> - <include>fullpaths</include> - <include>filealign</include> - <include>pdb</include> - <include>nostdlib</include> - <include>lib</include> - <include>errorreport</include> - <include>moduleassemblyname</include> - </includes> - </commandFilter> - </compilerPlugin> - <compilerPlugin> - <identifier>MONO-CS:4.0+.NETPortable,Profile3</identifier> - <pluginClass>npanday.executable.compiler.impl.CSharpCompilerForProfile</pluginClass> - <vendor>MONO</vendor> - <executable>dmcs</executable> - <language>C_SHARP</language> - <profile>.NETPortable,Profile3</profile> - <frameworkVersions> - <frameworkVersion>4.0</frameworkVersion> - </frameworkVersions> - <platforms> - <platform> - <operatingSystem>Windows</operatingSystem> - </platform> - <platform> - <operatingSystem>Mac OS X</operatingSystem> - </platform> - <platform> - <operatingSystem>Linux</operatingSystem> - </platform> - <platform> - <operatingSystem>Solaris</operatingSystem> - </platform> - <platform> - <operatingSystem>FreeBSD</operatingSystem> - </platform> - </platforms> - <targetFramework>.NETPortable,Version=v4.0,Profile=Profile3</targetFramework> - <!-- Mono 2.10.2 missing .NETPortable defaultAssemblyPath, requires profileAssemblyPath --> - <assemblies> - <assembly>mscorlib</assembly> - <assembly>System</assembly> - <assembly>System.ComponentModel.Composition</assembly> - <assembly>System.Core</assembly> - <assembly>System.Net</assembly> - <assembly>System.Runtime.Serialization</assembly> - <assembly>System.ServiceModel</assembly> - <assembly>System.Xml</assembly> - <assembly>System.Xml.Serialization</assembly> - </assemblies> - <commandFilter> - <includes> - <include>out</include> - <include>target</include> - <include>delaysign</include> - <include>doc</include> - <include>keyfile</include> - <include>keycontainer</include> - <include>platform</include> - <include>recurse</include> - <include>reference</include> - <include>addmodule</include> - <include>win32res</include> - <include>win32icon</include> - <include>resource</include> - <include>linkresource</include> - <include>debug</include> - <include>optimize</include> - <include>warnaserror</include> - <include>warn</include> - <include>nowarn</include> - <include>checked</include> - <include>unsafe</include> - <include>define</include> - <include>langversion</include> - <include>help</include> - <include>nologo</include> - <include>noconfig</include> - <include>baseaddress</include> - <include>bugreport</include> - <include>codepage</include> - <include>utf8output</include> - <include>main</include> - <include>fullpaths</include> - <include>filealign</include> - <include>pdb</include> - <include>nostdlib</include> - <include>lib</include> - <include>errorreport</include> - <include>moduleassemblyname</include> - </includes> - </commandFilter> - </compilerPlugin> - <compilerPlugin> - <identifier>MONO-CS:4.0+.NETPortable,Profile4</identifier> + <identifier>MONO-CS:4.0+.NETPortable</identifier> <pluginClass>npanday.executable.compiler.impl.CSharpCompilerForProfile</pluginClass> <vendor>MONO</vendor> <executable>dmcs</executable> <language>C_SHARP</language> - <profile>.NETPortable,Profile4</profile> + <profiles> + <profile> + <id>.NETPortable,Profile1</id> + <targetFramework>.NETPortable,Version=v4.0,Profile=Profile1</targetFramework> + <!-- Mono 2.10.2 missing .NETPortable defaultAssemblyPath, requires profileAssemblyPath --> + <assemblies> + <assembly>mscorlib</assembly> + <assembly>System</assembly> + <assembly>System.Core</assembly> + <assembly>System.Xml</assembly> + </assemblies> + </profile> + <profile> + <id>.NETPortable,Profile2</id> + <targetFramework>.NETPortable,Version=v4.0,Profile=Profile2</targetFramework> + <!-- Mono 2.10.2 missing .NETPortable defaultAssemblyPath, requires profileAssemblyPath --> + <assemblies> + <assembly>mscorlib</assembly> + <assembly>System</assembly> + <assembly>System.Core</assembly> + <assembly>System.Net</assembly> + <assembly>System.Runtime.Serialization</assembly> + <assembly>System.ServiceModel</assembly> + <assembly>System.Xml</assembly> + <assembly>System.Xml.Serialization</assembly> + </assemblies> + </profile> + <profile> + <id>.NETPortable,Profile3</id> + <targetFramework>.NETPortable,Version=v4.0,Profile=Profile3</targetFramework> + <!-- Mono 2.10.2 missing .NETPortable defaultAssemblyPath, requires profileAssemblyPath --> + <assemblies> + <assembly>mscorlib</assembly> + <assembly>System</assembly> + <assembly>System.ComponentModel.Composition</assembly> + <assembly>System.Core</assembly> + <assembly>System.Net</assembly> + <assembly>System.Runtime.Serialization</assembly> + <assembly>System.ServiceModel</assembly> + <assembly>System.Xml</assembly> + <assembly>System.Xml.Serialization</assembly> + </assemblies> + </profile> + <profile> + <id>.NETPortable,Profile4</id> + <targetFramework>.NETPortable,Version=v4.0,Profile=Profile4</targetFramework> + <!-- Mono 2.10.2 missing .NETPortable defaultAssemblyPath, requires profileAssemblyPath --> + <assemblies> + <assembly>mscorlib</assembly> + <assembly>System</assembly> + <assembly>System.Core</assembly> + <assembly>System.Net</assembly> + <assembly>System.Runtime.Serialization</assembly> + <assembly>System.ServiceModel</assembly> + <assembly>System.Windows</assembly> + <assembly>System.Xml</assembly> + <assembly>System.Xml.Serialization</assembly> + </assemblies> + </profile> + </profiles> <frameworkVersions> <frameworkVersion>4.0</frameworkVersion> </frameworkVersions> @@ -1420,19 +1069,6 @@ <operatingSystem>FreeBSD</operatingSystem> </platform> </platforms> - <targetFramework>.NETPortable,Version=v4.0,Profile=Profile4</targetFramework> - <!-- Mono 2.10.2 missing .NETPortable defaultAssemblyPath, requires profileAssemblyPath --> - <assemblies> - <assembly>mscorlib</assembly> - <assembly>System</assembly> - <assembly>System.Core</assembly> - <assembly>System.Net</assembly> - <assembly>System.Runtime.Serialization</assembly> - <assembly>System.ServiceModel</assembly> - <assembly>System.Windows</assembly> - <assembly>System.Xml</assembly> - <assembly>System.Xml.Serialization</assembly> - </assemblies> <commandFilter> <includes> <include>out</include> @@ -1481,7 +1117,6 @@ <pluginClass>npanday.executable.compiler.impl.NemerleCompiler</pluginClass> <vendor>MONO</vendor> <language>NEMERLE</language> - <profile>FULL</profile> <executable>ncc</executable> <frameworkVersions> <frameworkVersion>2.0.50727</frameworkVersion> @@ -1527,7 +1162,6 @@ <pluginClass>npanday.executable.compiler.impl.DotGNUCompiler</pluginClass> <vendor>DotGNU</vendor> <language>C_SHARP</language> - <profile>FULL</profile> <executable>cscc</executable> <frameworkVersions> <frameworkVersion>2.0.50727</frameworkVersion> @@ -1558,7 +1192,6 @@ <vendor>MICROSOFT</vendor> <executable>RubyCompiler.exe</executable> <language>RUBY</language> - <profile>FULL</profile> <frameworkVersions> <frameworkVersion>2.0.50727</frameworkVersion> </frameworkVersions> Modified: incubator/npanday/trunk/components/dotnet-executable/src/main/java/npanday/executable/impl/CompilerPluginsRepository.java URL: http://svn.apache.org/viewvc/incubator/npanday/trunk/components/dotnet-executable/src/main/java/npanday/executable/impl/CompilerPluginsRepository.java?rev=1579507&r1=1579506&r2=1579507&view=diff ============================================================================== --- incubator/npanday/trunk/components/dotnet-executable/src/main/java/npanday/executable/impl/CompilerPluginsRepository.java (original) +++ incubator/npanday/trunk/components/dotnet-executable/src/main/java/npanday/executable/impl/CompilerPluginsRepository.java Thu Mar 20 02:15:04 2014 @@ -24,10 +24,7 @@ import com.google.common.collect.Iterabl import npanday.executable.CommandCapability; import npanday.executable.ExecutableCapability; import npanday.executable.compiler.MutableCompilerCapability; -import npanday.model.compiler.plugins.CommandFilter; -import npanday.model.compiler.plugins.CompilerPlugin; -import npanday.model.compiler.plugins.CompilerPluginsModel; -import npanday.model.compiler.plugins.Platform; +import npanday.model.compiler.plugins.*; import npanday.model.compiler.plugins.io.xpp3.CompilerPluginXpp3Reader; import npanday.registry.ModelInterpolator; import npanday.registry.NPandayRepositoryException; @@ -64,7 +61,7 @@ public final class CompilerPluginsReposi * List<npanday.model.compiler.plugins.CompilerPlugin> of compiler plugins pulled from the * various compiler-plugins.xml files. */ - private List compilerPlugins = new ArrayList(); + private List<CompilerPlugin> compilerPlugins = new ArrayList<CompilerPlugin>(); @Override protected CompilerPluginsModel loadFromReader( Reader reader, Hashtable properties ) @@ -99,78 +96,71 @@ public final class CompilerPluginsReposi List<ExecutableCapability> getCompilerCapabilities( final VendorInfo vendorInfo ) { List<ExecutableCapability> platformCapabilities = new ArrayList<ExecutableCapability>(); - for ( Iterator i = compilerPlugins.iterator(); i.hasNext(); ) - { - CompilerPlugin plugin = (CompilerPlugin) i.next(); - String language = plugin.getLanguage(); - String pluginClassName = plugin.getPluginClass(); - Properties pluginConfiguration = plugin.getPluginConfiguration(); - String executable = plugin.getExecutable(); - String vendor = plugin.getVendor(); - String vendorVersion = plugin.getVendorVersion(); - String identifier = plugin.getIdentifier(); - String profile = plugin.getProfile(); - List<String> frameworkVersions = plugin.getFrameworkVersions(); - List<String> coreAssemblies = plugin.getAssemblies(); - String defaultAssemblyPath = plugin.getDefaultAssemblyPath(); - String targetFramework = plugin.getTargetFramework(); - - if (vendor != null && !vendorInfo.getVendor().getVendorName().toLowerCase().equals( vendor.toLowerCase() )) + for (CompilerPlugin plugin : compilerPlugins) { + if (plugin.getVendor() != null && !vendorInfo.getVendor().getVendorName().toLowerCase().equals(plugin.getVendor().toLowerCase())) continue; - if ( VersionComparer.isVendorVersionMissmatch(vendorVersion, vendorInfo.getVendorVersion()) ) - { + if (VersionComparer.isVendorVersionMissmatch(plugin.getVendorVersion(), vendorInfo.getVendorVersion())) { continue; } - if ( VersionComparer.isFrameworkVersionMissmatch(frameworkVersions, vendorInfo.getFrameworkVersion()) ) - { + if (VersionComparer.isFrameworkVersionMissmatch(plugin.getFrameworkVersions(), vendorInfo.getFrameworkVersion())) { continue; } - List platforms = plugin.getPlatforms(); - for ( Iterator j = platforms.iterator(); j.hasNext(); ) - { - MutableCompilerCapability platformCapability = new MutableCompilerCapability(); - - platformCapability.setVendorInfo( vendorInfo ); - platformCapability.setProbingPaths(plugin.getProbingPaths()); - - Platform platform = (Platform) j.next(); - String os = platform.getOperatingSystem(); - - platformCapability.setLanguage( language ); - platformCapability.setOperatingSystem( os ); - platformCapability.setPluginClassName( pluginClassName ); - platformCapability.setPluginConfiguration( pluginConfiguration ); - - platformCapability.setExecutableName( executable ); - platformCapability.setIdentifier( identifier ); - platformCapability.setFrameworkVersions( frameworkVersions ); - platformCapability.setProfile( profile ); - if (!isNullOrEmpty(defaultAssemblyPath)) - { - platformCapability.setAssemblyPath( new File(defaultAssemblyPath) ); - } - platformCapability.setTargetFramework( targetFramework ); - String arch = platform.getArchitecture(); - CommandFilter filter = plugin.getCommandFilter(); - platformCapability.setCoreAssemblies( coreAssemblies ); - - List<String> includes = ( filter != null ) ? filter.getIncludes() : new ArrayList<String>(); - List<String> excludes = ( filter != null ) ? filter.getExcludes() : new ArrayList<String>(); - platformCapability.setCommandCapability( - CommandCapability.Factory.createDefaultCommandCapability( includes, excludes ) ); - if ( arch != null ) - { - platformCapability.setArchitecture( arch ); + for (Platform platform : plugin.getPlatforms()) { + if (plugin.getProfiles() != null && !plugin.getProfiles().isEmpty()) { + for (Profile profile : plugin.getProfiles()) { + MutableCompilerCapability platformCapability = createPlatformCapability(vendorInfo, plugin, platform); + platformCapability.setProfile(profile.getId()); + if (!isNullOrEmpty(profile.getDefaultAssemblyPath())) { + platformCapability.setAssemblyPath(new File(profile.getDefaultAssemblyPath())); + } + platformCapability.setTargetFramework(profile.getTargetFramework()); + platformCapability.setCoreAssemblies(profile.getAssemblies()); + + platformCapabilities.add(platformCapability); + } + } else { + MutableCompilerCapability platformCapability = createPlatformCapability(vendorInfo, plugin, platform); + platformCapability.setProfile("FULL"); + platformCapabilities.add(platformCapability); } - platformCapabilities.add( platformCapability ); } } return platformCapabilities; } + private static MutableCompilerCapability createPlatformCapability(VendorInfo vendorInfo, CompilerPlugin plugin, Platform platform) { + MutableCompilerCapability platformCapability = new MutableCompilerCapability(); + + platformCapability.setVendorInfo( vendorInfo ); + platformCapability.setProbingPaths(plugin.getProbingPaths()); + + String os = platform.getOperatingSystem(); + + platformCapability.setLanguage(plugin.getLanguage()); + platformCapability.setOperatingSystem( os ); + platformCapability.setPluginClassName(plugin.getPluginClass()); + platformCapability.setPluginConfiguration(plugin.getPluginConfiguration()); + + platformCapability.setExecutableName(plugin.getExecutable()); + platformCapability.setIdentifier(plugin.getIdentifier()); + platformCapability.setFrameworkVersions(plugin.getFrameworkVersions()); + String arch = platform.getArchitecture(); + CommandFilter filter = plugin.getCommandFilter(); + + List<String> includes = ( filter != null ) ? filter.getIncludes() : new ArrayList<String>(); + List<String> excludes = ( filter != null ) ? filter.getExcludes() : new ArrayList<String>(); + platformCapability.setCommandCapability( + CommandCapability.Factory.createDefaultCommandCapability( includes, excludes ) ); + if ( arch != null ) + { + platformCapability.setArchitecture( arch ); + } + return platformCapability; + } + // ### COMPONENTS REQUIRED BY THE BASE CLASS /** Modified: incubator/npanday/trunk/components/dotnet-model/compiler-plugins/compiler-plugins.mdo URL: http://svn.apache.org/viewvc/incubator/npanday/trunk/components/dotnet-model/compiler-plugins/compiler-plugins.mdo?rev=1579507&r1=1579506&r2=1579507&view=diff ============================================================================== --- incubator/npanday/trunk/components/dotnet-model/compiler-plugins/compiler-plugins.mdo (original) +++ incubator/npanday/trunk/components/dotnet-model/compiler-plugins/compiler-plugins.mdo Thu Mar 20 02:15:04 2014 @@ -92,11 +92,20 @@ </field> <field> <name>profile</name> - <version>1.0.0+</version> + <version>1.0.0</version> <type>String</type> <description>Profile for the plugin.</description> </field> <field> + <name>profiles</name> + <version>1.5.0+</version> + <association> + <type>Profile</type> + <multiplicity>*</multiplicity> + </association> + <description>Profiles for the plugin.</description> + </field> + <field> <name>executable</name> <version>1.0.0+</version> <type>String</type> @@ -126,6 +135,7 @@ </field> <field> <name>defaultAssemblyPath</name> + <version>1.0.0</version> <description> Path (absolute or relative) of the assemblies given in the assembly fields. This field is used in conjunction with the profile and the assemblies fields. @@ -134,6 +144,7 @@ </field> <field> <name>targetFramework</name> + <version>1.0.0</version> <description> Target framework for the compiled artifact. </description> @@ -141,6 +152,7 @@ </field> <field> <name>assemblies</name> + <version>1.0.0</version> <description> Assemblies to reference from the command line. This is used to create custom profiles (such as .NET Compact) that use a different set of system assemblies. Only include the name of the @@ -214,5 +226,47 @@ </field> </fields> </class> + <class> + <name>Profile</name> + <version>1.5.0+</version> + <fields> + <field> + <name>id</name> + <identifier>true</identifier> + <version>1.5.0+</version> + <type>String</type> + </field> + <field> + <name>defaultAssemblyPath</name> + <version>1.5.0+</version> + <description> + Path (absolute or relative) of the assemblies given in the assembly fields. This field + is used in conjunction with the profile and the assemblies fields. + </description> + <type>String</type> + </field> + <field> + <name>targetFramework</name> + <version>1.5.0+</version> + <description> + Target framework for the compiled artifact. + </description> + <type>String</type> + </field> + <field> + <name>assemblies</name> + <version>1.5.0+</version> + <description> + Assemblies to reference from the command line. This is used to create custom profiles (such as + .NET Compact) that use a different set of system assemblies. Only include the name of the + assembly, not the .dll extension. + </description> + <association> + <type>String</type> + <multiplicity>*</multiplicity> + </association> + </field> + </fields> + </class> </classes> </model> Modified: incubator/npanday/trunk/components/dotnet-model/compiler-plugins/src/test/resources/sample-compiler-plugins.xml URL: http://svn.apache.org/viewvc/incubator/npanday/trunk/components/dotnet-model/compiler-plugins/src/test/resources/sample-compiler-plugins.xml?rev=1579507&r1=1579506&r2=1579507&view=diff ============================================================================== --- incubator/npanday/trunk/components/dotnet-model/compiler-plugins/src/test/resources/sample-compiler-plugins.xml (original) +++ incubator/npanday/trunk/components/dotnet-model/compiler-plugins/src/test/resources/sample-compiler-plugins.xml Thu Mar 20 02:15:04 2014 @@ -27,7 +27,6 @@ <vendorVersion>1</vendorVersion> <executable>RubyCompiler.exe</executable> <language>RUBY</language> - <profile>FULL</profile> <frameworkVersions> <frameworkVersion>2.0.50727</frameworkVersion> </frameworkVersions>