incubator-nmaven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sisb...@apache.org
Subject svn commit: r608190 - in /incubator/nmaven/trunk: components/maven-dotnet-assembler/src/main/java/org/apache/maven/dotnet/assembler/impl/ core-integration-tests/src/test/java/org/apache/maven/dotnet/integrationtests/ core-integration-tests/src/test/res...
Date Wed, 02 Jan 2008 19:24:54 GMT
Author: sisbell
Date: Wed Jan  2 11:24:52 2008
New Revision: 608190

URL: http://svn.apache.org/viewvc?rev=608190&view=rev
Log:
IT test for assembly info generation. Fixed problem where build would break if copyright option
was used.

Added:
    incubator/nmaven/trunk/core-integration-tests/src/test/java/org/apache/maven/dotnet/integrationtests/MavenITmng0016CSharpAssemblyInfoGeneration.java
  (with props)
    incubator/nmaven/trunk/core-integration-tests/src/test/resources/MavenITmng-0016-CSharpAssemblyInfoGeneration/
    incubator/nmaven/trunk/core-integration-tests/src/test/resources/MavenITmng-0016-CSharpAssemblyInfoGeneration/COPYRIGHT.txt
  (with props)
    incubator/nmaven/trunk/core-integration-tests/src/test/resources/MavenITmng-0016-CSharpAssemblyInfoGeneration/It0016.cs
    incubator/nmaven/trunk/core-integration-tests/src/test/resources/MavenITmng-0016-CSharpAssemblyInfoGeneration/pom.xml
  (with props)
Modified:
    incubator/nmaven/trunk/components/maven-dotnet-assembler/src/main/java/org/apache/maven/dotnet/assembler/impl/AssemblerContextImpl.java
    incubator/nmaven/trunk/core-integration-tests/src/test/java/org/apache/maven/dotnet/integrationtests/IntegrationTestSuite.java

Modified: incubator/nmaven/trunk/components/maven-dotnet-assembler/src/main/java/org/apache/maven/dotnet/assembler/impl/AssemblerContextImpl.java
URL: http://svn.apache.org/viewvc/incubator/nmaven/trunk/components/maven-dotnet-assembler/src/main/java/org/apache/maven/dotnet/assembler/impl/AssemblerContextImpl.java?rev=608190&r1=608189&r2=608190&view=diff
==============================================================================
--- incubator/nmaven/trunk/components/maven-dotnet-assembler/src/main/java/org/apache/maven/dotnet/assembler/impl/AssemblerContextImpl.java
(original)
+++ incubator/nmaven/trunk/components/maven-dotnet-assembler/src/main/java/org/apache/maven/dotnet/assembler/impl/AssemblerContextImpl.java
Wed Jan  2 11:24:52 2008
@@ -30,13 +30,13 @@
 import org.apache.maven.model.Organization;
 
 import org.codehaus.plexus.util.IOUtil;
-import org.codehaus.plexus.logging.LogEnabled;
-import org.codehaus.plexus.logging.Logger;
 
 import java.io.*;
 import java.util.Enumeration;
 import java.util.List;
 import java.util.ArrayList;
+import java.util.logging.Logger;
+import java.util.logging.Level;
 import java.net.URL;
 
 /**
@@ -45,7 +45,7 @@
  * @author Shane Isbell
  */
 public final class AssemblerContextImpl
-    implements AssemblerContext, LogEnabled
+    implements AssemblerContext
 {
 
     /**
@@ -56,7 +56,7 @@
     /**
      * A logger for writing log messages
      */
-    private Logger logger;
+    private static Logger logger = Logger.getAnonymousLogger();
 
     private List<AssemblyInfoMarshaller> marshallers;
 
@@ -68,14 +68,6 @@
     }
 
     /**
-     * @see LogEnabled#enableLogging(org.codehaus.plexus.logging.Logger)
-     */
-    public void enableLogging( Logger logger )
-    {
-        this.logger = logger;
-    }
-
-    /**
      * @see org.apache.maven.dotnet.assembler.AssemblerContext#getAssemblyInfo()
      */
     public AssemblyInfo getAssemblyInfo()
@@ -94,7 +86,7 @@
         File file = new File( basedir + "/COPYRIGHT.txt" );
         if ( file.exists() )
         {
-            logger.debug( "NMAVEN-020-000: Found Copyright: " + file.getAbsolutePath() );
+            logger.log( Level.INFO, "NMAVEN-020-000: Found Copyright: " + file.getAbsolutePath()
);
             FileInputStream fis = null;
             try
             {
@@ -103,7 +95,7 @@
             }
             catch ( IOException e )
             {
-                logger.info( "NMAVEN-020-001: Could not get copyright: File = " + file.getAbsolutePath(),
e );
+                logger.warning( "NMAVEN-020-001: Could not get copyright: File = " + file.getAbsolutePath()
);
             }
             finally
             {
@@ -146,7 +138,7 @@
                 return m;
             }
         }
-        throw new AssemblyInfoException("Could not find assembly info marshaller.");
+        throw new AssemblyInfoException( "Could not find assembly info marshaller." );
     }
 
     /**

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=608190&r1=608189&r2=608190&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 11:24:52 2008
@@ -43,8 +43,8 @@
         suite.addTestSuite( MavenITmng0012DeployModule.class );
         suite.addTestSuite( MavenITmng0013DeployWinexe.class );
         suite.addTestSuite( MavenITmng0014ResolveLibraryDependency.class );
-       
         suite.addTestSuite( MavenITmng0015DeployLibraryAsSnapshot.class );
+        suite.addTestSuite( MavenITmng0016CSharpAssemblyInfoGeneration.class );
         return suite;
     }
 }

Added: incubator/nmaven/trunk/core-integration-tests/src/test/java/org/apache/maven/dotnet/integrationtests/MavenITmng0016CSharpAssemblyInfoGeneration.java
URL: http://svn.apache.org/viewvc/incubator/nmaven/trunk/core-integration-tests/src/test/java/org/apache/maven/dotnet/integrationtests/MavenITmng0016CSharpAssemblyInfoGeneration.java?rev=608190&view=auto
==============================================================================
--- incubator/nmaven/trunk/core-integration-tests/src/test/java/org/apache/maven/dotnet/integrationtests/MavenITmng0016CSharpAssemblyInfoGeneration.java
(added)
+++ incubator/nmaven/trunk/core-integration-tests/src/test/java/org/apache/maven/dotnet/integrationtests/MavenITmng0016CSharpAssemblyInfoGeneration.java
Wed Jan  2 11:24:52 2008
@@ -0,0 +1,30 @@
+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 MavenITmng0016CSharpAssemblyInfoGeneration
+    extends AbstractMavenIntegrationTestCase
+{
+    public void testit0016()
+        throws Exception
+    {
+        File testDir =
+            ResourceExtractor.simpleExtractResources( getClass(), "/MavenITmng-0016-CSharpAssemblyInfoGeneration"
);
+        String assemblyInfoFileName =
+            "target/" + BuildDirectories.BUILD_SOURCES.getBuildDirectoryName() + "/META-INF/AssemblyInfo.cs";
+        Verifier verifier = new Verifier( testDir.getAbsolutePath() );
+        verifier.executeGoal( "install" );
+        verifier.assertFilePresent( "target/" + BuildDirectories.BUILD_SOURCES.getBuildDirectoryName()
+ "/It0016.cs" );
+        verifier.assertFilePresent( assemblyInfoFileName );
+        verifier.assertFilePresent( "target/NMaven.It.It0016-1.0.0.dll" );
+        verifier.verifyErrorFreeLog();
+        verifier.resetStreams();
+        //requires some manual verification of looking at AssemblyInfo.cs to confirm that
the pom preoprties have
+        //been properly set
+    }
+}

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

Added: incubator/nmaven/trunk/core-integration-tests/src/test/resources/MavenITmng-0016-CSharpAssemblyInfoGeneration/COPYRIGHT.txt
URL: http://svn.apache.org/viewvc/incubator/nmaven/trunk/core-integration-tests/src/test/resources/MavenITmng-0016-CSharpAssemblyInfoGeneration/COPYRIGHT.txt?rev=608190&view=auto
==============================================================================
--- incubator/nmaven/trunk/core-integration-tests/src/test/resources/MavenITmng-0016-CSharpAssemblyInfoGeneration/COPYRIGHT.txt
(added)
+++ incubator/nmaven/trunk/core-integration-tests/src/test/resources/MavenITmng-0016-CSharpAssemblyInfoGeneration/COPYRIGHT.txt
Wed Jan  2 11:24:52 2008
@@ -0,0 +1 @@
+Test Copyright
\ No newline at end of file

Propchange: incubator/nmaven/trunk/core-integration-tests/src/test/resources/MavenITmng-0016-CSharpAssemblyInfoGeneration/COPYRIGHT.txt
------------------------------------------------------------------------------
    svn:eol-style = native

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

Added: incubator/nmaven/trunk/core-integration-tests/src/test/resources/MavenITmng-0016-CSharpAssemblyInfoGeneration/pom.xml
URL: http://svn.apache.org/viewvc/incubator/nmaven/trunk/core-integration-tests/src/test/resources/MavenITmng-0016-CSharpAssemblyInfoGeneration/pom.xml?rev=608190&view=auto
==============================================================================
--- incubator/nmaven/trunk/core-integration-tests/src/test/resources/MavenITmng-0016-CSharpAssemblyInfoGeneration/pom.xml
(added)
+++ incubator/nmaven/trunk/core-integration-tests/src/test/resources/MavenITmng-0016-CSharpAssemblyInfoGeneration/pom.xml
Wed Jan  2 11:24:52 2008
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<project> 
+  <modelVersion>4.0.0</modelVersion>  
+  <groupId>NMaven.Its</groupId>
+  <artifactId>NMaven.It.It0016</artifactId>
+  <packaging>dotnet:library</packaging>
+  <version>1.0.0</version>
+  <name>NMaven.It.It0016</name>
+  <description>Sample Description</description>
+  <organization>
+    <name>Apache</name>
+    <url>http://apache.org</url>
+  </organization>
+  <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-0016-CSharpAssemblyInfoGeneration/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native



Mime
View raw message