Author: sisbell
Date: Thu Jan 10 11:51:37 2008
New Revision: 610901

URL: http://svn.apache.org/viewvc?rev=610901&view=rev
Log:
Fixed bug dealing with signing of assemblies. The AssemblyInfo was picking up 
the AssemblyKeyFile attribute causing the compile to fail.

Modified:
    
incubator/nmaven/trunk/components/maven-dotnet-extensions/src/main/java/org/apache/maven/dotnet/extensions/compiler/CSharpClassCompiler.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-extensions/src/main/java/org/apache/maven/dotnet/extensions/compiler/CSharpClassCompiler.java
URL: 
http://svn.apache.org/viewvc/incubator/nmaven/trunk/components/maven-dotnet-extensions/src/main/java/org/apache/maven/dotnet/extensions/compiler/CSharpClassCompiler.java?rev=610901&r1=610900&r2=610901&view=diff
==============================================================================
--- 
incubator/nmaven/trunk/components/maven-dotnet-extensions/src/main/java/org/apache/maven/dotnet/extensions/compiler/CSharpClassCompiler.java
 (original)
+++ 
incubator/nmaven/trunk/components/maven-dotnet-extensions/src/main/java/org/apache/maven/dotnet/extensions/compiler/CSharpClassCompiler.java
 Thu Jan 10 11:51:37 2008
@@ -37,9 +37,9 @@
 import org.apache.maven.dotnet.Vendor;
 import org.apache.maven.dotnet.ArtifactScope;
 
[EMAIL PROTECTED]( programmingLanguaqe = ProgrammingLanguage.C_SHARP, vendors = 
{ Vendor.MICROSOFT, Vendor.NOVELL,
-    Vendor.ANY }, dotnetCompilerPlatformVersions = { 
DotnetCompilerPlatformVersion.VERSION_2_0_50727,
-    DotnetCompilerPlatformVersion.VERSION_3_0 } )
[EMAIL PROTECTED](programmingLanguaqe = ProgrammingLanguage.C_SHARP,
+                    vendors = {Vendor.MICROSOFT, Vendor.NOVELL, Vendor.ANY},
+                    dotnetCompilerPlatformVersions = 
{DotnetCompilerPlatformVersion.VERSION_2_0_50727, 
DotnetCompilerPlatformVersion.VERSION_3_0})
 public final class CSharpClassCompiler
     implements org.apache.maven.dotnet.compiler.ClassCompiler
 {
@@ -126,9 +126,8 @@
         if ( config.getVendor().equals( Vendor.MICROSOFT ) &&
             config.getCompilerPlatformVersion().equals( 
DotnetCompilerPlatformVersion.VERSION_3_0 ) )
         {
-            String wcfRef =
-                "/reference:" + System.getenv( "SystemRoot" ) +
-                    "\\Microsoft.NET\\Framework\\v3.0\\Windows Communication 
Foundation\\";
+            String wcfRef = "/reference:" + System.getenv( "SystemRoot" ) +
+                "\\Microsoft.NET\\Framework\\v3.0\\Windows Communication 
Foundation\\";
             // TODO: This is a hard-coded path: Don't have a registry value 
either.
             commands.add( wcfRef + "System.ServiceModel.dll" );
             commands.add( wcfRef + "Microsoft.Transactions.Bridge.dll" );
@@ -138,15 +137,19 @@
             commands.add( wcfRef + "System.Runtime.Serialization.dll" );
             commands.add( wcfRef + "SMDiagnostics.dll" );
         }
-
-        if ( config.getKeyInfo().getKeyFileUri() != null )
-        {
-            commands.add( "/keyfile:" + new 
File(config.getKeyInfo().getKeyFileUri()).getAbsolutePath() );
-        }
-        else if ( config.getKeyInfo().getKeyContainerName() != null )
+        
+        if ( config.getKeyInfo() != null )
         {
-            commands.add( "/keycontainer:" + 
config.getKeyInfo().getKeyContainerName() );
+            if ( config.getKeyInfo().getKeyFileUri() != null )
+            {
+                commands.add( "/keyfile:" + new File( 
config.getKeyInfo().getKeyFileUri() ).getAbsolutePath() );
+            }
+            else if ( config.getKeyInfo().getKeyContainerName() != null )
+            {
+                commands.add( "/keycontainer:" + 
config.getKeyInfo().getKeyContainerName() );
+            }
         }
+
         /*
          * if ( config.getCommands() != null ) { commands.addAll( 
config.getCommands() ); }
          */
@@ -212,8 +215,7 @@
             throw new IllegalArgumentException( "compilerContext" );
         }
         this.compilerContext = (DotnetCompilerContext) compilerContext;
-        compiledArtifact =
-            new File( compilerContext.getCompilerConfig().getTargetDirectory(),
-                      
compilerContext.getCompilerConfig().getArtifactFileName() );
+        compiledArtifact = new File( 
compilerContext.getCompilerConfig().getTargetDirectory(),
+                                     
compilerContext.getCompilerConfig().getArtifactFileName() );
     }
 }

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=610901&r1=610900&r2=610901&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
 Thu Jan 10 11:51:37 2008
@@ -135,8 +135,8 @@
         }
 
         AssemblyInfo assemblyInfo = assemblerContext.getAssemblyInfo();
-        assemblyInfo.setKeyFile( keyfile );
-        assemblyInfo.setKeyName( keycontainer );
+        //assemblyInfo.setKeyFile( keyfile );
+        //assemblyInfo.setKeyName( keycontainer );
 
         try
         {


Reply via email to