incubator-nmaven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ewor...@apache.org
Subject svn commit: r556505 - in /incubator/nmaven/trunk: ./ integration-tests/tests/ integration-tests/tests/it0032/ integration-tests/tests/it0032/src/ integration-tests/tests/it0032/src/main/ integration-tests/tests/it0032/src/main/csharp/ integration-tests...
Date Mon, 16 Jul 2007 05:24:44 GMT
Author: eworley
Date: Sun Jul 15 22:24:43 2007
New Revision: 556505

URL: http://svn.apache.org/viewvc?view=rev&rev=556505
Log:
Applying patch for JIRA NMaven-78 (http://jira.codehaus.org/browse/NMAVEN-78).  Solution is
discussed on nmaven dev list (http://mail-archives.apache.org/mod_mbox/incubator-nmaven-dev/200707.mbox/%3c596da1200707030542p1dcc64cav8b33f3235ad1e6e@mail.gmail.com%3e).
 Enabling excludes lists for dotnet maven-compile-plugin to exclude file patterns for source
and test files.  Also adding integration test it0032 to verify proper excludes behavior for
source and test source.

Added:
    incubator/nmaven/trunk/integration-tests/tests/it0032/
    incubator/nmaven/trunk/integration-tests/tests/it0032/expected-results.txt
    incubator/nmaven/trunk/integration-tests/tests/it0032/goals.txt
    incubator/nmaven/trunk/integration-tests/tests/it0032/pom.xml
    incubator/nmaven/trunk/integration-tests/tests/it0032/src/
    incubator/nmaven/trunk/integration-tests/tests/it0032/src/main/
    incubator/nmaven/trunk/integration-tests/tests/it0032/src/main/csharp/
    incubator/nmaven/trunk/integration-tests/tests/it0032/src/main/csharp/It0032.cs
    incubator/nmaven/trunk/integration-tests/tests/it0032/src/main/csharp/notToBeIncluded.cs
    incubator/nmaven/trunk/integration-tests/tests/it0032/src/test/
    incubator/nmaven/trunk/integration-tests/tests/it0032/src/test/It0032-Test1.cs
    incubator/nmaven/trunk/integration-tests/tests/it0032/src/test/notToBeIncluded.txt
Modified:
    incubator/nmaven/trunk/   (props changed)
    incubator/nmaven/trunk/integration-tests/tests/README.txt
    incubator/nmaven/trunk/plugins/maven-compile-plugin/src/main/java/org/apache/maven/dotnet/plugin/compile/SourceProcessorMojo.java
    incubator/nmaven/trunk/plugins/maven-compile-plugin/src/main/java/org/apache/maven/dotnet/plugin/compile/TestSourceProcessorMojo.java

Propchange: incubator/nmaven/trunk/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Sun Jul 15 22:24:43 2007
@@ -0,0 +1 @@
+.project

Modified: incubator/nmaven/trunk/integration-tests/tests/README.txt
URL: http://svn.apache.org/viewvc/incubator/nmaven/trunk/integration-tests/tests/README.txt?view=diff&rev=556505&r1=556504&r2=556505
==============================================================================
--- incubator/nmaven/trunk/integration-tests/tests/README.txt (original)
+++ incubator/nmaven/trunk/integration-tests/tests/README.txt Sun Jul 15 22:24:43 2007
@@ -25,4 +25,5 @@
 it0027: Compiling CS with flat directory structure
 it0028: Deploys a snapshot dll to a remote repo
 it0029: Deploys a non-snapshot dll to a remote repo
-it0030: Pulls a snapshot dll and non-snapshot dll from a remote repo
\ No newline at end of file
+it0030: Pulls a snapshot dll and non-snapshot dll from a remote repo
+it0032: Verifies that compile plugin processes excludes and testExcludes elements from the
pom
\ No newline at end of file

Added: incubator/nmaven/trunk/integration-tests/tests/it0032/expected-results.txt
URL: http://svn.apache.org/viewvc/incubator/nmaven/trunk/integration-tests/tests/it0032/expected-results.txt?view=auto&rev=556505
==============================================================================
--- incubator/nmaven/trunk/integration-tests/tests/it0032/expected-results.txt (added)
+++ incubator/nmaven/trunk/integration-tests/tests/it0032/expected-results.txt Sun Jul 15
22:24:43 2007
@@ -0,0 +1,2 @@
+target/it0032.dll
+target/test-assemblies/it0032-test.dll
\ No newline at end of file

Added: incubator/nmaven/trunk/integration-tests/tests/it0032/goals.txt
URL: http://svn.apache.org/viewvc/incubator/nmaven/trunk/integration-tests/tests/it0032/goals.txt?view=auto&rev=556505
==============================================================================
--- incubator/nmaven/trunk/integration-tests/tests/it0032/goals.txt (added)
+++ incubator/nmaven/trunk/integration-tests/tests/it0032/goals.txt Sun Jul 15 22:24:43 2007
@@ -0,0 +1 @@
+install
\ No newline at end of file

Added: incubator/nmaven/trunk/integration-tests/tests/it0032/pom.xml
URL: http://svn.apache.org/viewvc/incubator/nmaven/trunk/integration-tests/tests/it0032/pom.xml?view=auto&rev=556505
==============================================================================
--- incubator/nmaven/trunk/integration-tests/tests/it0032/pom.xml (added)
+++ incubator/nmaven/trunk/integration-tests/tests/it0032/pom.xml Sun Jul 15 22:24:43 2007
@@ -0,0 +1,45 @@
+<project>
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>org.apache.maven.it</groupId>
+  <artifactId>it0032</artifactId>
+  <packaging>library</packaging>
+  <version>1.0.0</version>
+  <name>it0032</name>
+
+  <dependencies>
+    <dependency>
+        <groupId>NUnit</groupId>
+        <artifactId>NUnit.Framework</artifactId>
+        <version>2.2.8.0</version>
+        <type>library</type>
+    </dependency>
+  </dependencies>
+
+  <build>
+    <sourceDirectory>src/main/csharp</sourceDirectory>
+    <testSourceDirectory>src/test</testSourceDirectory>
+
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.dotnet.plugins</groupId>
+        <artifactId>maven-compile-plugin</artifactId>
+        <extensions>true</extensions>
+        <configuration>
+            <excludes>
+                <exclude>**/notToBeIncluded.cs</exclude>
+            </excludes>
+            <testExcludes>
+                <exclude>**/notToBeIncluded.txt</exclude>
+            </testExcludes>
+        </configuration>
+      </plugin>
+
+      <plugin>
+        <groupId>org.apache.maven.dotnet.plugins</groupId>
+        <artifactId>maven-test-plugin</artifactId>
+      </plugin>
+
+    </plugins>
+
+  </build>
+</project>

Added: incubator/nmaven/trunk/integration-tests/tests/it0032/src/main/csharp/It0032.cs
URL: http://svn.apache.org/viewvc/incubator/nmaven/trunk/integration-tests/tests/it0032/src/main/csharp/It0032.cs?view=auto&rev=556505
==============================================================================
--- incubator/nmaven/trunk/integration-tests/tests/it0032/src/main/csharp/It0032.cs (added)
+++ incubator/nmaven/trunk/integration-tests/tests/it0032/src/main/csharp/It0032.cs Sun Jul
15 22:24:43 2007
@@ -0,0 +1,8 @@
+namespace org.apache.maven.it {
+
+public class It0032 {
+	public static void Main () { 
+		System.Console.Write("Hello World!"); 
+	} 
+}
+}

Added: incubator/nmaven/trunk/integration-tests/tests/it0032/src/main/csharp/notToBeIncluded.cs
URL: http://svn.apache.org/viewvc/incubator/nmaven/trunk/integration-tests/tests/it0032/src/main/csharp/notToBeIncluded.cs?view=auto&rev=556505
==============================================================================
--- incubator/nmaven/trunk/integration-tests/tests/it0032/src/main/csharp/notToBeIncluded.cs
(added)
+++ incubator/nmaven/trunk/integration-tests/tests/it0032/src/main/csharp/notToBeIncluded.cs
Sun Jul 15 22:24:43 2007
@@ -0,0 +1 @@
+This file should not be included in the dll

Added: incubator/nmaven/trunk/integration-tests/tests/it0032/src/test/It0032-Test1.cs
URL: http://svn.apache.org/viewvc/incubator/nmaven/trunk/integration-tests/tests/it0032/src/test/It0032-Test1.cs?view=auto&rev=556505
==============================================================================
--- incubator/nmaven/trunk/integration-tests/tests/it0032/src/test/It0032-Test1.cs (added)
+++ incubator/nmaven/trunk/integration-tests/tests/it0032/src/test/It0032-Test1.cs Sun Jul
15 22:24:43 2007
@@ -0,0 +1,23 @@
+
+namespace org.apache.maven.it.unit {
+	using NUnit.Framework;
+	using System;
+	using org.apache.maven.it;
+
+	[TestFixture]
+	public class It0032Test1  {
+		private String hello = "hello";
+
+		[SetUp]
+		protected void SetUp() {
+			new It0032();
+		}
+
+		[Test]
+		public void TestSample() {
+			Assert.AreEqual("hello", hello);
+		}
+		
+	}
+
+}

Added: incubator/nmaven/trunk/integration-tests/tests/it0032/src/test/notToBeIncluded.txt
URL: http://svn.apache.org/viewvc/incubator/nmaven/trunk/integration-tests/tests/it0032/src/test/notToBeIncluded.txt?view=auto&rev=556505
==============================================================================
--- incubator/nmaven/trunk/integration-tests/tests/it0032/src/test/notToBeIncluded.txt (added)
+++ incubator/nmaven/trunk/integration-tests/tests/it0032/src/test/notToBeIncluded.txt Sun
Jul 15 22:24:43 2007
@@ -0,0 +1 @@
+this file should not be included in the test dll
\ No newline at end of file

Modified: incubator/nmaven/trunk/plugins/maven-compile-plugin/src/main/java/org/apache/maven/dotnet/plugin/compile/SourceProcessorMojo.java
URL: http://svn.apache.org/viewvc/incubator/nmaven/trunk/plugins/maven-compile-plugin/src/main/java/org/apache/maven/dotnet/plugin/compile/SourceProcessorMojo.java?view=diff&rev=556505&r1=556504&r2=556505
==============================================================================
--- incubator/nmaven/trunk/plugins/maven-compile-plugin/src/main/java/org/apache/maven/dotnet/plugin/compile/SourceProcessorMojo.java
(original)
+++ incubator/nmaven/trunk/plugins/maven-compile-plugin/src/main/java/org/apache/maven/dotnet/plugin/compile/SourceProcessorMojo.java
Sun Jul 15 22:24:43 2007
@@ -113,8 +113,15 @@
         {
             throw new MojoExecutionException( "NMAVEN-904-003: Language is not supported:
Language = " + language, e );
         }
-
+    	for (int i = 0; i < includes.length; ++i)
+    	{
+    		includeList.add(includes[i]);
+    	}
         directoryScanner.setIncludes( includeList.toArray( includes ) );
+        for (int i = 0; i < excludes.length; ++i)
+        {
+        	excludeList.add(excludes[i]);
+        }
         directoryScanner.setExcludes( excludeList.toArray( excludes ) );
         directoryScanner.addDefaultExcludes();
 

Modified: incubator/nmaven/trunk/plugins/maven-compile-plugin/src/main/java/org/apache/maven/dotnet/plugin/compile/TestSourceProcessorMojo.java
URL: http://svn.apache.org/viewvc/incubator/nmaven/trunk/plugins/maven-compile-plugin/src/main/java/org/apache/maven/dotnet/plugin/compile/TestSourceProcessorMojo.java?view=diff&rev=556505&r1=556504&r2=556505
==============================================================================
--- incubator/nmaven/trunk/plugins/maven-compile-plugin/src/main/java/org/apache/maven/dotnet/plugin/compile/TestSourceProcessorMojo.java
(original)
+++ incubator/nmaven/trunk/plugins/maven-compile-plugin/src/main/java/org/apache/maven/dotnet/plugin/compile/TestSourceProcessorMojo.java
Sun Jul 15 22:24:43 2007
@@ -55,6 +55,11 @@
      */
     private String outputDirectory;
 
+    /**
+     * @parameter expression = "${testExcludes}"
+     */
+    private String[] testExcludes;
+
     public void execute()
         throws MojoExecutionException
     {
@@ -73,6 +78,10 @@
         excludeList.add( "*.csproj" );
         excludeList.add( "*.sln" );
         excludeList.add( "obj/**" );
+        for (int i = 0; i < testExcludes.length; ++i)
+        {
+        	excludeList.add(testExcludes[i]);
+        }
         directoryScanner.setExcludes( excludeList.toArray( new String[excludeList.size()]
) );
 
         directoryScanner.addDefaultExcludes();



Mime
View raw message