incubator-nmaven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sisb...@apache.org
Subject svn commit: r613969 - in /incubator/nmaven/trunk: components/maven-dotnet-assembler/src/main/java/org/apache/maven/dotnet/assembler/ components/maven-dotnet-extensions/src/main/java/org/apache/maven/dotnet/extensions/assembler/ plugins/maven-compiler-p...
Date Mon, 21 Jan 2008 18:46:59 GMT
Author: sisbell
Date: Mon Jan 21 10:46:57 2008
New Revision: 613969

URL: http://svn.apache.org/viewvc?rev=613969&view=rev
Log:
Support for adding CLSCompliant attribute to AssemblyInfo.

Modified:
    incubator/nmaven/trunk/components/maven-dotnet-assembler/src/main/java/org/apache/maven/dotnet/assembler/AssemblyInfo.java
    incubator/nmaven/trunk/components/maven-dotnet-extensions/src/main/java/org/apache/maven/dotnet/extensions/assembler/DefaultAssemblyInfoMarshaller.java
    incubator/nmaven/trunk/plugins/maven-compiler-plugin/src/main/java/org/apache/maven/dotnet/plugin/compiler/AssemblyInfoGeneratorMojo.java

Modified: incubator/nmaven/trunk/components/maven-dotnet-assembler/src/main/java/org/apache/maven/dotnet/assembler/AssemblyInfo.java
URL: http://svn.apache.org/viewvc/incubator/nmaven/trunk/components/maven-dotnet-assembler/src/main/java/org/apache/maven/dotnet/assembler/AssemblyInfo.java?rev=613969&r1=613968&r2=613969&view=diff
==============================================================================
--- incubator/nmaven/trunk/components/maven-dotnet-assembler/src/main/java/org/apache/maven/dotnet/assembler/AssemblyInfo.java
(original)
+++ incubator/nmaven/trunk/components/maven-dotnet-assembler/src/main/java/org/apache/maven/dotnet/assembler/AssemblyInfo.java
Mon Jan 21 10:46:57 2008
@@ -27,10 +27,15 @@
 public class AssemblyInfo
 {
     /**
+     * Is CLS Compliant Assembly?
+     */
+    private boolean clsCompliant = false;
+
+    /**
      * Artifact version
      */
     private String version;
-    
+
     /**
      * Informational version (used for snapshot)
      */
@@ -87,10 +92,21 @@
     {
     }
 
+    public boolean isClsCompliant()
+    {
+        return clsCompliant;
+    }
+
+    public void setClsCompliant( boolean clsCompliant )
+    {
+        this.clsCompliant = clsCompliant;
+    }
+
     public String toString()
     {
         StringBuffer sb = new StringBuffer();
-        sb.append( "Version: " ).append( version )
+        sb.append( "CLSCompilant: " ).append( clsCompliant )
+            .append( "Version: " ).append( version )
             .append( "\r\nInformationalVersion: " ).append( informationalVersion )
             .append( "\r\nDescription: " ).append( description )
             .append( "\r\nTitle: " ).append( title )
@@ -137,7 +153,7 @@
     {
         this.version = version;
     }
-    
+
     public String getInformationalVersion()
     {
         return ( informationalVersion != null ) ? informationalVersion : "";

Modified: incubator/nmaven/trunk/components/maven-dotnet-extensions/src/main/java/org/apache/maven/dotnet/extensions/assembler/DefaultAssemblyInfoMarshaller.java
URL: http://svn.apache.org/viewvc/incubator/nmaven/trunk/components/maven-dotnet-extensions/src/main/java/org/apache/maven/dotnet/extensions/assembler/DefaultAssemblyInfoMarshaller.java?rev=613969&r1=613968&r2=613969&view=diff
==============================================================================
--- incubator/nmaven/trunk/components/maven-dotnet-extensions/src/main/java/org/apache/maven/dotnet/extensions/assembler/DefaultAssemblyInfoMarshaller.java
(original)
+++ incubator/nmaven/trunk/components/maven-dotnet-extensions/src/main/java/org/apache/maven/dotnet/extensions/assembler/DefaultAssemblyInfoMarshaller.java
Mon Jan 21 10:46:57 2008
@@ -46,8 +46,11 @@
         throws IOException
     {
         StringBuffer sb = new StringBuffer();
-        sb.append( "using System.Reflection;\r\n" )
+        sb.append( "using System;\r\n" )
+            .append( "using System.Reflection;\r\n" )
             .append( "using System.Runtime.CompilerServices;\r\n" )
+            .append( "[assembly: " ).append( "CLSCompliant" ).append( "(" ).append(
+            ( ( assemblyInfo.isClsCompliant() ) ? "true" : "false" ) ).append( ")]" ).append(
"\r\n" )
             .append( createEntry( "Description", assemblyInfo.getDescription() ) )
             .append( createEntry( "Title", assemblyInfo.getTitle() ) )
             .append( createEntry( "Company", assemblyInfo.getCompany() ) )
@@ -86,7 +89,7 @@
             {
                 assemblyInfoFileStream.close();
             }
-            if(outputStream != null)
+            if ( outputStream != null )
             {
                 outputStream.close();
             }

Modified: incubator/nmaven/trunk/plugins/maven-compiler-plugin/src/main/java/org/apache/maven/dotnet/plugin/compiler/AssemblyInfoGeneratorMojo.java
URL: http://svn.apache.org/viewvc/incubator/nmaven/trunk/plugins/maven-compiler-plugin/src/main/java/org/apache/maven/dotnet/plugin/compiler/AssemblyInfoGeneratorMojo.java?rev=613969&r1=613968&r2=613969&view=diff
==============================================================================
--- incubator/nmaven/trunk/plugins/maven-compiler-plugin/src/main/java/org/apache/maven/dotnet/plugin/compiler/AssemblyInfoGeneratorMojo.java
(original)
+++ incubator/nmaven/trunk/plugins/maven-compiler-plugin/src/main/java/org/apache/maven/dotnet/plugin/compiler/AssemblyInfoGeneratorMojo.java
Mon Jan 21 10:46:57 2008
@@ -72,6 +72,11 @@
     private String sourceDirectory;
 
     /**
+     * @parameter expression = "${CLSCompliant}" default-value="false"
+     */
+    private boolean isCLSCompliant;
+
+    /**
      * @component
      */
     private AssemblerContext assemblerContext;
@@ -125,6 +130,7 @@
         }
 
         AssemblyInfo assemblyInfo = assemblerContext.getAssemblyInfo();
+        assemblyInfo.setClsCompliant( isCLSCompliant );
         //assemblyInfo.setKeyFile( keyfile );
         //assemblyInfo.setKeyName( keycontainer );
 



Mime
View raw message