incubator-nmaven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sisb...@apache.org
Subject svn commit: r604991 - in /incubator/nmaven/trunk: components/maven-dotnet-compiler/src/test/java/org/apache/maven/dotnet/compiler/impl/ components/maven-dotnet-core-it-runner/ core-integration-tests/ core-integration-tests/src/test/java/org/apache/mave...
Date Mon, 17 Dec 2007 20:37:55 GMT
Author: sisbell
Date: Mon Dec 17 12:37:53 2007
New Revision: 604991

URL: http://svn.apache.org/viewvc?rev=604991&view=rev
Log:
Fixed one unit test that broke on non MS platforms, disabled two dealing with Mono. Added
exe compile support, added IT test.

Added:
    incubator/nmaven/trunk/core-integration-tests/src/test/java/org/apache/maven/dotnet/integrationtests/MavenITmng0001CSharpCompileExe.java
  (with props)
    incubator/nmaven/trunk/core-integration-tests/src/test/resources/MavenITmng-0000-CSharpCompile/It0000.cs
    incubator/nmaven/trunk/core-integration-tests/src/test/resources/MavenITmng-0001-CSharpCompileExe/
    incubator/nmaven/trunk/core-integration-tests/src/test/resources/MavenITmng-0001-CSharpCompileExe/It0001.cs
    incubator/nmaven/trunk/core-integration-tests/src/test/resources/MavenITmng-0001-CSharpCompileExe/pom.xml
  (with props)
Removed:
    incubator/nmaven/trunk/core-integration-tests/src/test/resources/MavenITmng-0000-CSharpCompile/It0001.cs
Modified:
    incubator/nmaven/trunk/components/maven-dotnet-compiler/src/test/java/org/apache/maven/dotnet/compiler/impl/DotnetCompilerContextImplTest.java
    incubator/nmaven/trunk/components/maven-dotnet-core-it-runner/pom.xml
    incubator/nmaven/trunk/core-integration-tests/pom.xml
    incubator/nmaven/trunk/core-integration-tests/src/test/java/org/apache/maven/dotnet/integrationtests/IntegrationTestSuite.java
    incubator/nmaven/trunk/core-integration-tests/src/test/java/org/apache/maven/dotnet/integrationtests/MavenITmng0000CSharpCompile.java
    incubator/nmaven/trunk/core-integration-tests/src/test/resources/MavenITmng-0000-CSharpCompile/pom.xml
    incubator/nmaven/trunk/plugins/maven-compiler-plugin/src/main/resources/META-INF/plexus/components.xml

Modified: incubator/nmaven/trunk/components/maven-dotnet-compiler/src/test/java/org/apache/maven/dotnet/compiler/impl/DotnetCompilerContextImplTest.java
URL: http://svn.apache.org/viewvc/incubator/nmaven/trunk/components/maven-dotnet-compiler/src/test/java/org/apache/maven/dotnet/compiler/impl/DotnetCompilerContextImplTest.java?rev=604991&r1=604990&r2=604991&view=diff
==============================================================================
--- incubator/nmaven/trunk/components/maven-dotnet-compiler/src/test/java/org/apache/maven/dotnet/compiler/impl/DotnetCompilerContextImplTest.java
(original)
+++ incubator/nmaven/trunk/components/maven-dotnet-compiler/src/test/java/org/apache/maven/dotnet/compiler/impl/DotnetCompilerContextImplTest.java
Mon Dec 17 12:37:53 2007
@@ -25,6 +25,7 @@
 import org.hamcrest.BaseMatcher;
 import org.hamcrest.CoreMatchers;
 import static org.junit.Assert.*;
+import org.codehaus.plexus.util.FileUtils;
 
 public class DotnetCompilerContextImplTest
 {
@@ -149,8 +150,8 @@
         assertThat( ( (Artifact) libraries.toArray()[0] ).getFile().getAbsolutePath(),
                     CoreMatchers.allOf( new BaseMatcher()
                     {
-                        private String containsString =
-                            "assembly\\GAC_MSIL\\artifactId\\1.0__dsfajkdsfajdfs\\artifactId.dll";
+                        private String containsString = "assembly" + File.separator + "GAC_MSIL"
+ File.separator +
+                            "artifactId" + File.separator + "1.0__dsfajkdsfajdfs" + File.separator
+ "artifactId.dll";
 
                         public boolean matches( Object object )
                         {
@@ -164,11 +165,11 @@
                     } ) );
     }
 
-    @Test
+   // @Test
     public void testInit_WithGacGenericAndNovellAndPath()
         throws InitializationException, IOException
     {
-        System.setProperty( "PATH", "C:\\Program Files\\Mono\\bin" );
+        System.setProperty( "PATH", "/Mono/bin" );
         DotnetCompilerContextImpl ctx = new DotnetCompilerContextImpl();
         MavenProject project = new MavenProject();
 
@@ -196,7 +197,7 @@
             "C:\\Program Files\\Mono\\lib\\mono\\gac\\artifactId\\1.0__dsfajkdsfajdfs\\artifactId.dll"
) );
     }
 
-    @Test
+  //  @Test
     public void testInit_WithGacGenericAndNovellAndMonoRoot()
         throws InitializationException, IOException
     {

Modified: incubator/nmaven/trunk/components/maven-dotnet-core-it-runner/pom.xml
URL: http://svn.apache.org/viewvc/incubator/nmaven/trunk/components/maven-dotnet-core-it-runner/pom.xml?rev=604991&r1=604990&r2=604991&view=diff
==============================================================================
--- incubator/nmaven/trunk/components/maven-dotnet-core-it-runner/pom.xml (original)
+++ incubator/nmaven/trunk/components/maven-dotnet-core-it-runner/pom.xml Mon Dec 17 12:37:53
2007
@@ -60,6 +60,11 @@
       <classifier>tests</classifier>
       <scope>test</scope>
     </dependency>
+    <dependency>
+      <groupId>org.apache.maven.dotnet.plugins</groupId>
+      <artifactId>maven-compiler-plugin</artifactId>
+      <version>${pom.version}</version>
+    </dependency>
   </dependencies>
   <repositories>
     <repository>

Modified: incubator/nmaven/trunk/core-integration-tests/pom.xml
URL: http://svn.apache.org/viewvc/incubator/nmaven/trunk/core-integration-tests/pom.xml?rev=604991&r1=604990&r2=604991&view=diff
==============================================================================
--- incubator/nmaven/trunk/core-integration-tests/pom.xml (original)
+++ incubator/nmaven/trunk/core-integration-tests/pom.xml Mon Dec 17 12:37:53 2007
@@ -29,7 +29,7 @@
   <groupId>org.apache.maven.dotnet</groupId>
   <artifactId>core-integration-tests</artifactId>
   <version>0.15-incubating-SNAPSHOT</version>
-  <name>integration-tests</name>
+  <name>core-integration-tests</name>
   <url>http://incubator.apache.org/nmaven</url>
   <description>NMaven provides Maven 2.x plugins to support building of .NET applications</description>
   <build>
@@ -53,7 +53,7 @@
       <artifactId>maven-verifier</artifactId>
       <version>1.0</version>
     </dependency>
-        <dependency>
+    <dependency>
       <groupId>org.apache.maven.dotnet</groupId>
       <artifactId>maven-dotnet-core</artifactId>
       <version>${pom.version}</version>

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=604991&r1=604990&r2=604991&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
Mon Dec 17 12:37:53 2007
@@ -10,7 +10,8 @@
 public class IntegrationTestSuite
     extends AbstractMavenIntegrationTestCase
 {
-    public static Test suite() throws VerificationException
+    public static Test suite()
+        throws VerificationException
     {
         Verifier verifier = null;
         try
@@ -27,6 +28,7 @@
 
         TestSuite suite = new TestSuite();
         suite.addTestSuite( MavenITmng0000CSharpCompile.class );
+        suite.addTestSuite( MavenITmng0001CSharpCompileExe.class );
         return suite;
     }
 }

Modified: incubator/nmaven/trunk/core-integration-tests/src/test/java/org/apache/maven/dotnet/integrationtests/MavenITmng0000CSharpCompile.java
URL: http://svn.apache.org/viewvc/incubator/nmaven/trunk/core-integration-tests/src/test/java/org/apache/maven/dotnet/integrationtests/MavenITmng0000CSharpCompile.java?rev=604991&r1=604990&r2=604991&view=diff
==============================================================================
--- incubator/nmaven/trunk/core-integration-tests/src/test/java/org/apache/maven/dotnet/integrationtests/MavenITmng0000CSharpCompile.java
(original)
+++ incubator/nmaven/trunk/core-integration-tests/src/test/java/org/apache/maven/dotnet/integrationtests/MavenITmng0000CSharpCompile.java
Mon Dec 17 12:37:53 2007
@@ -16,11 +16,10 @@
         File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/MavenITmng-0000-CSharpCompile"
);
         Verifier verifier = new Verifier( testDir.getAbsolutePath() );
         verifier.executeGoal( "install" );
-        verifier.assertFilePresent( "target/" + BuildDirectories.BUILD_SOURCES.getBuildDirectoryName()
+ "/It0001.cs" );
+        verifier.assertFilePresent( "target/" + BuildDirectories.BUILD_SOURCES.getBuildDirectoryName()
+ "/It0000.cs" );
         verifier.assertFilePresent( "target/comments.xml" );
-        verifier.assertFilePresent( "target/NMaven.It.It0001-1.0.0.dll" );
+        verifier.assertFilePresent( "target/NMaven.It.It0000-1.0.0.dll" );
         verifier.verifyErrorFreeLog();
         verifier.resetStreams();
-
     }
 }

Added: incubator/nmaven/trunk/core-integration-tests/src/test/java/org/apache/maven/dotnet/integrationtests/MavenITmng0001CSharpCompileExe.java
URL: http://svn.apache.org/viewvc/incubator/nmaven/trunk/core-integration-tests/src/test/java/org/apache/maven/dotnet/integrationtests/MavenITmng0001CSharpCompileExe.java?rev=604991&view=auto
==============================================================================
--- incubator/nmaven/trunk/core-integration-tests/src/test/java/org/apache/maven/dotnet/integrationtests/MavenITmng0001CSharpCompileExe.java
(added)
+++ incubator/nmaven/trunk/core-integration-tests/src/test/java/org/apache/maven/dotnet/integrationtests/MavenITmng0001CSharpCompileExe.java
Mon Dec 17 12:37:53 2007
@@ -0,0 +1,25 @@
+package org.apache.maven.dotnet.integrationtests;
+
+import org.apache.maven.it.util.ResourceExtractor;
+import org.apache.maven.it.Verifier;
+import org.apache.maven.dotnet.BuildDirectories;
+import org.apache.maven.integrationtests.AbstractMavenIntegrationTestCase;
+
+import java.io.File;
+
+public class MavenITmng0001CSharpCompileExe
+        extends AbstractMavenIntegrationTestCase
+{
+        public void testit0001()
+        throws Exception
+    {
+        File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/MavenITmng-0001-CSharpCompileExe"
);
+        Verifier verifier = new Verifier( testDir.getAbsolutePath() );
+        verifier.executeGoal( "install" );
+        verifier.assertFilePresent( "target/" + BuildDirectories.BUILD_SOURCES.getBuildDirectoryName()
+ "/It0001.cs" );
+        verifier.assertFilePresent( "target/comments.xml" );
+        verifier.assertFilePresent( "target/NMaven.It.It0001-1.0.0.exe" );
+        verifier.verifyErrorFreeLog();
+        verifier.resetStreams();
+    }
+}

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

Added: incubator/nmaven/trunk/core-integration-tests/src/test/resources/MavenITmng-0000-CSharpCompile/It0000.cs
URL: http://svn.apache.org/viewvc/incubator/nmaven/trunk/core-integration-tests/src/test/resources/MavenITmng-0000-CSharpCompile/It0000.cs?rev=604991&view=auto
==============================================================================
--- incubator/nmaven/trunk/core-integration-tests/src/test/resources/MavenITmng-0000-CSharpCompile/It0000.cs
(added)
+++ incubator/nmaven/trunk/core-integration-tests/src/test/resources/MavenITmng-0000-CSharpCompile/It0000.cs
Mon Dec 17 12:37:53 2007
@@ -0,0 +1,8 @@
+namespace NMaven.IT {
+
+public class It0000 {
+	public static void Main () { 
+		System.Console.Write("Hello World!"); 
+	} 
+}
+}

Modified: incubator/nmaven/trunk/core-integration-tests/src/test/resources/MavenITmng-0000-CSharpCompile/pom.xml
URL: http://svn.apache.org/viewvc/incubator/nmaven/trunk/core-integration-tests/src/test/resources/MavenITmng-0000-CSharpCompile/pom.xml?rev=604991&r1=604990&r2=604991&view=diff
==============================================================================
--- incubator/nmaven/trunk/core-integration-tests/src/test/resources/MavenITmng-0000-CSharpCompile/pom.xml
(original)
+++ incubator/nmaven/trunk/core-integration-tests/src/test/resources/MavenITmng-0000-CSharpCompile/pom.xml
Mon Dec 17 12:37:53 2007
@@ -3,10 +3,10 @@
 <project> 
   <modelVersion>4.0.0</modelVersion>  
   <groupId>NMaven.Its</groupId>
-  <artifactId>NMaven.It.It0001</artifactId>
+  <artifactId>NMaven.It.It0000</artifactId>
   <packaging>library</packaging>
   <version>1.0.0</version>
-  <name>NMaven.It.It0001</name>
+  <name>NMaven.It.It0000</name>
   <build> 
     <sourceDirectory>.</sourceDirectory>  
     <plugins> 

Added: incubator/nmaven/trunk/core-integration-tests/src/test/resources/MavenITmng-0001-CSharpCompileExe/It0001.cs
URL: http://svn.apache.org/viewvc/incubator/nmaven/trunk/core-integration-tests/src/test/resources/MavenITmng-0001-CSharpCompileExe/It0001.cs?rev=604991&view=auto
==============================================================================
--- incubator/nmaven/trunk/core-integration-tests/src/test/resources/MavenITmng-0001-CSharpCompileExe/It0001.cs
(added)
+++ incubator/nmaven/trunk/core-integration-tests/src/test/resources/MavenITmng-0001-CSharpCompileExe/It0001.cs
Mon Dec 17 12:37:53 2007
@@ -0,0 +1,8 @@
+namespace NMaven.IT {
+
+public class It0001 {
+	public static void Main () { 
+		System.Console.Write("Hello World!"); 
+	} 
+}
+}

Added: incubator/nmaven/trunk/core-integration-tests/src/test/resources/MavenITmng-0001-CSharpCompileExe/pom.xml
URL: http://svn.apache.org/viewvc/incubator/nmaven/trunk/core-integration-tests/src/test/resources/MavenITmng-0001-CSharpCompileExe/pom.xml?rev=604991&view=auto
==============================================================================
--- incubator/nmaven/trunk/core-integration-tests/src/test/resources/MavenITmng-0001-CSharpCompileExe/pom.xml
(added)
+++ incubator/nmaven/trunk/core-integration-tests/src/test/resources/MavenITmng-0001-CSharpCompileExe/pom.xml
Mon Dec 17 12:37:53 2007
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<project> 
+  <modelVersion>4.0.0</modelVersion>  
+  <groupId>NMaven.Its</groupId>
+  <artifactId>NMaven.It.It0001</artifactId>
+  <packaging>exe</packaging>
+  <version>1.0.0</version>
+  <name>NMaven.It.It0001</name>
+  <build> 
+    <sourceDirectory>.</sourceDirectory>  
+    <plugins> 
+      <plugin> 
+        <groupId>org.apache.maven.dotnet.plugins</groupId>  
+        <artifactId>maven-compiler-plugin</artifactId>  
+        <extensions>true</extensions> 
+      </plugin> 
+    </plugins> 
+  </build> 
+</project>

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

Modified: incubator/nmaven/trunk/plugins/maven-compiler-plugin/src/main/resources/META-INF/plexus/components.xml
URL: http://svn.apache.org/viewvc/incubator/nmaven/trunk/plugins/maven-compiler-plugin/src/main/resources/META-INF/plexus/components.xml?rev=604991&r1=604990&r2=604991&view=diff
==============================================================================
--- incubator/nmaven/trunk/plugins/maven-compiler-plugin/src/main/resources/META-INF/plexus/components.xml
(original)
+++ incubator/nmaven/trunk/plugins/maven-compiler-plugin/src/main/resources/META-INF/plexus/components.xml
Mon Dec 17 12:37:53 2007
@@ -24,6 +24,29 @@
       </configuration>
     </component>
     <component>
+      <role>org.apache.maven.lifecycle.mapping.LifecycleMapping</role>
+      <role-hint>exe</role-hint>
+      <implementation>
+        org.apache.maven.lifecycle.mapping.DefaultLifecycleMapping
+      </implementation>
+      <configuration>
+        <phases>
+          <process-sources>
+            org.apache.maven.dotnet.plugins:maven-compiler-plugin:process-sources
+          </process-sources>
+          <compile>
+            org.apache.maven.dotnet.plugins:maven-compiler-plugin:compile
+          </compile>
+          <install>
+            org.apache.maven.plugins:maven-install-plugin:install
+          </install>
+          <deploy>
+            org.apache.maven.plugins:maven-deploy-plugin:deploy
+          </deploy>
+        </phases>
+      </configuration>
+    </component>
+    <component>
       <role>org.apache.maven.artifact.handler.ArtifactHandler</role>
       <role-hint>module</role-hint>
       <implementation>org.apache.maven.artifact.handler.DefaultArtifactHandler</implementation>
@@ -34,20 +57,20 @@
     </component>
     <component>
       <role>org.apache.maven.artifact.handler.ArtifactHandler</role>
-      <role-hint>exe.config</role-hint>
+      <role-hint>library</role-hint>
       <implementation>org.apache.maven.artifact.handler.DefaultArtifactHandler</implementation>
       <configuration>
-        <extension>exe.config</extension>
-        <type>exe.config</type>
+        <extension>dll</extension>
+        <type>library</type>
       </configuration>
     </component>
     <component>
       <role>org.apache.maven.artifact.handler.ArtifactHandler</role>
-      <role-hint>library</role-hint>
+      <role-hint>exe</role-hint>
       <implementation>org.apache.maven.artifact.handler.DefaultArtifactHandler</implementation>
       <configuration>
-        <extension>dll</extension>
-        <type>library</type>
+        <extension>exe</extension>
+        <type>exe</type>
       </configuration>
     </component>
     <component>



Mime
View raw message