incubator-nmaven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sisb...@apache.org
Subject svn commit: r608245 - in /incubator/nmaven/trunk: components/maven-dotnet-extensions/src/main/java/org/apache/maven/dotnet/extensions/compiler/ core-integration-tests/src/test/java/org/apache/maven/dotnet/integrationtests/ core-integration-tests/src/te...
Date Wed, 02 Jan 2008 21:51:16 GMT
Author: sisbell
Date: Wed Jan  2 13:51:15 2008
New Revision: 608245

URL: http://svn.apache.org/viewvc?rev=608245&view=rev
Log:
IT test for signing of assembly. Bug fix for signing.

Added:
    incubator/nmaven/trunk/core-integration-tests/src/test/java/org/apache/maven/dotnet/integrationtests/MavenITmng0017CSharpStrongNamedAssembly.java
  (with props)
    incubator/nmaven/trunk/core-integration-tests/src/test/resources/MavenITmng-0017-CSharpStrongNamedAssembly/
    incubator/nmaven/trunk/core-integration-tests/src/test/resources/MavenITmng-0017-CSharpStrongNamedAssembly/It0017.cs
    incubator/nmaven/trunk/core-integration-tests/src/test/resources/MavenITmng-0017-CSharpStrongNamedAssembly/pom.xml
  (with props)
    incubator/nmaven/trunk/core-integration-tests/src/test/resources/MavenITmng-0017-CSharpStrongNamedAssembly/sample.snk
  (with props)
Modified:
    incubator/nmaven/trunk/components/maven-dotnet-extensions/src/main/java/org/apache/maven/dotnet/extensions/compiler/CSharpClassCompiler.java
    incubator/nmaven/trunk/core-integration-tests/src/test/java/org/apache/maven/dotnet/integrationtests/IntegrationTestSuite.java
    incubator/nmaven/trunk/plugins/maven-compiler-plugin/src/main/java/org/apache/maven/dotnet/plugin/compiler/CompilerMojo.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=608245&r1=608244&r2=608245&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
Wed Jan  2 13:51:15 2008
@@ -141,7 +141,7 @@
 
         if ( config.getKeyInfo().getKeyFileUri() != null )
         {
-            commands.add( "/keyfile:" + config.getKeyInfo().getKeyFileUri() );
+            commands.add( "/keyfile:" + new File(config.getKeyInfo().getKeyFileUri()).getAbsolutePath()
);
         }
         else if ( config.getKeyInfo().getKeyContainerName() != null )
         {

Modified: incubator/nmaven/trunk/core-integration-tests/src/test/java/org/apache/maven/dotnet/integrationtests/IntegrationTestSuite.java
URL: http://svn.apache.org/viewvc/incubator/nmaven/trunk/core-integration-tests/src/test/java/org/apache/maven/dotnet/integrationtests/IntegrationTestSuite.java?rev=608245&r1=608244&r2=608245&view=diff
==============================================================================
--- incubator/nmaven/trunk/core-integration-tests/src/test/java/org/apache/maven/dotnet/integrationtests/IntegrationTestSuite.java
(original)
+++ incubator/nmaven/trunk/core-integration-tests/src/test/java/org/apache/maven/dotnet/integrationtests/IntegrationTestSuite.java
Wed Jan  2 13:51:15 2008
@@ -27,7 +27,7 @@
         }
 
         TestSuite suite = new TestSuite();
-
+        /*
         suite.addTestSuite( MavenITmng0000CSharpCompileLibrary.class );
         suite.addTestSuite( MavenITmng0001CSharpCompileExe.class );
         suite.addTestSuite( MavenITmng0002CSharpCompileModule.class );
@@ -45,6 +45,8 @@
         suite.addTestSuite( MavenITmng0014ResolveLibraryDependency.class );
         suite.addTestSuite( MavenITmng0015DeployLibraryAsSnapshot.class );
         suite.addTestSuite( MavenITmng0016CSharpAssemblyInfoGeneration.class );
+        */
+        suite.addTestSuite( MavenITmng0017CSharpStrongNamedAssembly.class );
         return suite;
     }
 }

Added: incubator/nmaven/trunk/core-integration-tests/src/test/java/org/apache/maven/dotnet/integrationtests/MavenITmng0017CSharpStrongNamedAssembly.java
URL: http://svn.apache.org/viewvc/incubator/nmaven/trunk/core-integration-tests/src/test/java/org/apache/maven/dotnet/integrationtests/MavenITmng0017CSharpStrongNamedAssembly.java?rev=608245&view=auto
==============================================================================
--- incubator/nmaven/trunk/core-integration-tests/src/test/java/org/apache/maven/dotnet/integrationtests/MavenITmng0017CSharpStrongNamedAssembly.java
(added)
+++ incubator/nmaven/trunk/core-integration-tests/src/test/java/org/apache/maven/dotnet/integrationtests/MavenITmng0017CSharpStrongNamedAssembly.java
Wed Jan  2 13:51:15 2008
@@ -0,0 +1,26 @@
+package org.apache.maven.dotnet.integrationtests;
+
+import org.apache.maven.integrationtests.AbstractMavenIntegrationTestCase;
+import org.apache.maven.it.util.ResourceExtractor;
+import org.apache.maven.it.Verifier;
+import org.apache.maven.dotnet.BuildDirectories;
+
+import java.io.File;
+
+public class MavenITmng0017CSharpStrongNamedAssembly
+    extends AbstractMavenIntegrationTestCase
+{
+    public void testit0017()
+        throws Exception
+    {
+        File testDir =
+            ResourceExtractor.simpleExtractResources( getClass(), "/MavenITmng-0017-CSharpStrongNamedAssembly"
);
+        Verifier verifier = new Verifier( testDir.getAbsolutePath() );
+        verifier.executeGoal( "install" );
+        verifier.assertFilePresent( "target/" + BuildDirectories.BUILD_SOURCES.getBuildDirectoryName()
+ "/It0017.cs" );
+        verifier.assertFilePresent( "target/NMaven.It.It0017-1.0.0.dll" );
+        verifier.verifyErrorFreeLog();
+        verifier.resetStreams();
+    }
+
+}

Propchange: incubator/nmaven/trunk/core-integration-tests/src/test/java/org/apache/maven/dotnet/integrationtests/MavenITmng0017CSharpStrongNamedAssembly.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/nmaven/trunk/core-integration-tests/src/test/resources/MavenITmng-0017-CSharpStrongNamedAssembly/It0017.cs
URL: http://svn.apache.org/viewvc/incubator/nmaven/trunk/core-integration-tests/src/test/resources/MavenITmng-0017-CSharpStrongNamedAssembly/It0017.cs?rev=608245&view=auto
==============================================================================
--- incubator/nmaven/trunk/core-integration-tests/src/test/resources/MavenITmng-0017-CSharpStrongNamedAssembly/It0017.cs
(added)
+++ incubator/nmaven/trunk/core-integration-tests/src/test/resources/MavenITmng-0017-CSharpStrongNamedAssembly/It0017.cs
Wed Jan  2 13:51:15 2008
@@ -0,0 +1,8 @@
+namespace NMaven.IT {
+
+public class It0017 {
+	public static void Main () { 
+		System.Console.Write("Hello World!"); 
+	} 
+}
+}

Added: incubator/nmaven/trunk/core-integration-tests/src/test/resources/MavenITmng-0017-CSharpStrongNamedAssembly/pom.xml
URL: http://svn.apache.org/viewvc/incubator/nmaven/trunk/core-integration-tests/src/test/resources/MavenITmng-0017-CSharpStrongNamedAssembly/pom.xml?rev=608245&view=auto
==============================================================================
--- incubator/nmaven/trunk/core-integration-tests/src/test/resources/MavenITmng-0017-CSharpStrongNamedAssembly/pom.xml
(added)
+++ incubator/nmaven/trunk/core-integration-tests/src/test/resources/MavenITmng-0017-CSharpStrongNamedAssembly/pom.xml
Wed Jan  2 13:51:15 2008
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<project> 
+  <modelVersion>4.0.0</modelVersion>  
+  <groupId>NMaven.Its</groupId>
+  <artifactId>NMaven.It.It0017</artifactId>
+  <packaging>dotnet:library</packaging>
+  <version>1.0.0</version>
+  <name>NMaven.It.It0017</name>
+  <build> 
+    <sourceDirectory>.</sourceDirectory>  
+    <plugins> 
+      <plugin> 
+        <groupId>org.apache.maven.dotnet.plugins</groupId>  
+        <artifactId>maven-compiler-plugin</artifactId>  
+        <extensions>true</extensions>
+        <configuration>
+          <keyfile>sample.snk</keyfile>
+        </configuration>
+      </plugin> 
+    </plugins> 
+  </build> 
+</project>

Propchange: incubator/nmaven/trunk/core-integration-tests/src/test/resources/MavenITmng-0017-CSharpStrongNamedAssembly/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/nmaven/trunk/core-integration-tests/src/test/resources/MavenITmng-0017-CSharpStrongNamedAssembly/sample.snk
URL: http://svn.apache.org/viewvc/incubator/nmaven/trunk/core-integration-tests/src/test/resources/MavenITmng-0017-CSharpStrongNamedAssembly/sample.snk?rev=608245&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/nmaven/trunk/core-integration-tests/src/test/resources/MavenITmng-0017-CSharpStrongNamedAssembly/sample.snk
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Modified: incubator/nmaven/trunk/plugins/maven-compiler-plugin/src/main/java/org/apache/maven/dotnet/plugin/compiler/CompilerMojo.java
URL: http://svn.apache.org/viewvc/incubator/nmaven/trunk/plugins/maven-compiler-plugin/src/main/java/org/apache/maven/dotnet/plugin/compiler/CompilerMojo.java?rev=608245&r1=608244&r2=608245&view=diff
==============================================================================
--- incubator/nmaven/trunk/plugins/maven-compiler-plugin/src/main/java/org/apache/maven/dotnet/plugin/compiler/CompilerMojo.java
(original)
+++ incubator/nmaven/trunk/plugins/maven-compiler-plugin/src/main/java/org/apache/maven/dotnet/plugin/compiler/CompilerMojo.java
Wed Jan  2 13:51:15 2008
@@ -75,7 +75,7 @@
     private File keyfile;
 
     /**
-     * Specifies a strong name key container. (not currently supported)
+     * Specifies a strong name key container.
      *
      * @parameter expression = "${keycontainer}"
      */
@@ -89,7 +89,7 @@
     private String frameworkVersion;
 
     /**
-     * .NET Language. The default value is <code>C_SHARP</code>. Not case or
white-space sensitive.
+     * .NET Language. The default value is <code>C_SHARP</code>.
      *
      * @parameter expression="${language}" default-value = "C_SHARP"
      * @required
@@ -97,7 +97,7 @@
     private String language;
 
     /**
-     * The Vendor for the Compiler. Not case or white-space sensitive.
+     * The Vendor for the Compiler.
      *
      * @parameter expression="${vendor}"
      */
@@ -113,14 +113,14 @@
     {
 
         File sourceDir =
-            new File( project.getBuild().getDirectory(), 
-                      BuildDirectories.BUILD_SOURCES.getBuildDirectoryName() );
-        
+            new File( project.getBuild().getDirectory(), BuildDirectories.BUILD_SOURCES.getBuildDirectoryName()
);
+
         // No source to process
-        if (!sourceDir.exists()) {
+        if ( !sourceDir.exists() )
+        {
             return;
         }
-        
+
         Vendor vendor;
         if ( vendorName != null )
         {
@@ -133,7 +133,7 @@
 
         getLog().info( ".NET Vendor: " + vendor );
         DotnetCompilerConfig compilerConfig = DotnetCompilerConfig.Factory.createDefaultCompilerConfig();
-        
+
         compilerConfig.setArtifactType(
             ArtifactType.valueOf( project.getPackaging().split( "[:]" )[1].toUpperCase()
) );
         compilerConfig.setCompilerPlatformVersion( DotnetCompilerPlatformVersion.valueFromVersion(
frameworkVersion ) );
@@ -141,14 +141,14 @@
         KeyInfo keyInfo = KeyInfo.Factory.createDefaultKeyInfo();
         if ( keyfile != null )
         {
-            try
-            {
-                keyInfo.setKeyFileUri( new URI( keyfile.getAbsolutePath() ) );
-            }
-            catch ( URISyntaxException e )
-            {
-                throw new MojoExecutionException( e.getMessage() );
-            }
+            //try
+            //{
+                keyInfo.setKeyFileUri( keyfile.toURI());
+            //}
+         //   catch ( URISyntaxException e )
+           // {
+             //   throw new MojoExecutionException( e.getMessage() );
+           // }
         }
 
         keyInfo.setKeyContainerName( keycontainer );



Mime
View raw message