incubator-nmaven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sisb...@apache.org
Subject svn commit: r538751 - in /incubator/nmaven/branches/SI_XPT: assemblies/NMaven.Artifact/src/main/csharp/NMaven/Artifact/ plugins/maven-compile-plugin/src/main/java/org/apache/maven/dotnet/plugin/compile/ plugins/maven-test-plugin/src/main/java/org/apach...
Date Wed, 16 May 2007 21:49:30 GMT
Author: sisbell
Date: Wed May 16 14:49:27 2007
New Revision: 538751

URL: http://svn.apache.org/viewvc?view=rev&rev=538751
Log:
Fixed errors related to new skipping compile improvement.

Added:
    incubator/nmaven/branches/SI_XPT/assemblies/NMaven.Artifact/src/main/csharp/NMaven/Artifact/AssemblyRepositoryLayout.cs
    incubator/nmaven/branches/SI_XPT/assemblies/NMaven.Artifact/src/main/csharp/NMaven/Artifact/JavaRepositoryLayout.cs
    incubator/nmaven/branches/SI_XPT/assemblies/NMaven.Artifact/src/main/csharp/NMaven/Artifact/RepositoryType.cs
Modified:
    incubator/nmaven/branches/SI_XPT/assemblies/NMaven.Artifact/src/main/csharp/NMaven/Artifact/ArtifactContext.cs
    incubator/nmaven/branches/SI_XPT/plugins/maven-compile-plugin/src/main/java/org/apache/maven/dotnet/plugin/compile/CompilerMojo.java
    incubator/nmaven/branches/SI_XPT/plugins/maven-compile-plugin/src/main/java/org/apache/maven/dotnet/plugin/compile/SourceProcessorMojo.java
    incubator/nmaven/branches/SI_XPT/plugins/maven-test-plugin/src/main/java/org/apache/maven/dotnet/plugin/test/TesterMojo.java

Modified: incubator/nmaven/branches/SI_XPT/assemblies/NMaven.Artifact/src/main/csharp/NMaven/Artifact/ArtifactContext.cs
URL: http://svn.apache.org/viewvc/incubator/nmaven/branches/SI_XPT/assemblies/NMaven.Artifact/src/main/csharp/NMaven/Artifact/ArtifactContext.cs?view=diff&rev=538751&r1=538750&r2=538751
==============================================================================
--- incubator/nmaven/branches/SI_XPT/assemblies/NMaven.Artifact/src/main/csharp/NMaven/Artifact/ArtifactContext.cs
(original)
+++ incubator/nmaven/branches/SI_XPT/assemblies/NMaven.Artifact/src/main/csharp/NMaven/Artifact/ArtifactContext.cs
Wed May 16 14:49:27 2007
@@ -9,32 +9,7 @@
     public class ArtifactContext
     {
 
-        public Artifact GetArtifactFor(NMaven.Model.Model model, RepositoryType repositoryType)
-        {
-            if (repositoryType == RepositoryType.Net)
-            {
-                return GetNetArtifactFor(model);
-            }
-            else if (repositoryType == RepositoryType.Java)
-            {
-                return GetJavaArtifactFor(model);
-            }
-        }
-
-        public Artifact GetArtifactFor(String groupId, String artifactId, String version,
String packaging,
-            RepositoryType repositoryType)
-        {
-            if (repositoryType == RepositoryType.Net)
-            {
-                return GetNetArtifactFor(model);
-            }
-            else if (repositoryType == RepositoryType.Java)
-            {
-                return GetJavaArtifactFor(model);
-            }
-        }
-
-        private Artifact GetNetArtifactFor(NMaven.Model.Model model)
+        public Artifact GetArtifactFor(NMaven.Model.Model model)
         {
             Artifact artifact = new Artifact();
             artifact.ArtifactId = model.artifactId;
@@ -44,17 +19,7 @@
             return artifact;
         }
 
-        private Artifact GetJavaArtifactFor(NMaven.Model.Model model)
-        {
-            Artifact artifact = new Artifact();
-            artifact.ArtifactId = artifactId;
-            artifact.GroupId = groupId;
-            artifact.Version = version;
-            artifact.Extension = GetExtensionFor(packaging);
-            return artifact;
-        }
-
-        private Artifact GetJavaArtifactFor(String groupId, String artifactId, String version,
String packaging)
+        public Artifact CreateArtifact(String groupId, String artifactId, String version,
String packaging)
         {
             Artifact artifact = new Artifact();
             artifact.ArtifactId = artifactId;

Added: incubator/nmaven/branches/SI_XPT/assemblies/NMaven.Artifact/src/main/csharp/NMaven/Artifact/AssemblyRepositoryLayout.cs
URL: http://svn.apache.org/viewvc/incubator/nmaven/branches/SI_XPT/assemblies/NMaven.Artifact/src/main/csharp/NMaven/Artifact/AssemblyRepositoryLayout.cs?view=auto&rev=538751
==============================================================================
--- incubator/nmaven/branches/SI_XPT/assemblies/NMaven.Artifact/src/main/csharp/NMaven/Artifact/AssemblyRepositoryLayout.cs
(added)
+++ incubator/nmaven/branches/SI_XPT/assemblies/NMaven.Artifact/src/main/csharp/NMaven/Artifact/AssemblyRepositoryLayout.cs
Wed May 16 14:49:27 2007
@@ -0,0 +1,18 @@
+using System;
+using System.Text;
+
+namespace NMaven.Artifact
+{
+    public class AssemblyRepositoryLayout : ArtifactRepositoryLayout 
+    {
+        public string pathOf(Artifact artifact)
+        {
+            StringBuilder sb = new StringBuilder();
+            sb.Append(artifact.GroupId.Replace('.', '\\')).Append(@"\");
+            sb.Append(artifact.ArtifactId).Append(@"\");
+            sb.Append(artifact.Version).Append(@"\");
+            sb.Append(artifact.ArtifactId).Append(".").Append(artifact.Extension);
+            return sb.ToString();
+        }
+    }
+}

Added: incubator/nmaven/branches/SI_XPT/assemblies/NMaven.Artifact/src/main/csharp/NMaven/Artifact/JavaRepositoryLayout.cs
URL: http://svn.apache.org/viewvc/incubator/nmaven/branches/SI_XPT/assemblies/NMaven.Artifact/src/main/csharp/NMaven/Artifact/JavaRepositoryLayout.cs?view=auto&rev=538751
==============================================================================
--- incubator/nmaven/branches/SI_XPT/assemblies/NMaven.Artifact/src/main/csharp/NMaven/Artifact/JavaRepositoryLayout.cs
(added)
+++ incubator/nmaven/branches/SI_XPT/assemblies/NMaven.Artifact/src/main/csharp/NMaven/Artifact/JavaRepositoryLayout.cs
Wed May 16 14:49:27 2007
@@ -0,0 +1,18 @@
+using System;
+using System.Text;
+
+namespace NMaven.Artifact
+{
+    public class JavaRepositoryLayout : ArtifactRepositoryLayout
+    {
+        public string pathOf(Artifact artifact)
+        {
+            StringBuilder sb = new StringBuilder();
+            sb.Append(artifact.GroupId.Replace('.', '\\')).Append(@"\");
+            sb.Append(artifact.ArtifactId).Append(@"\");
+            sb.Append(artifact.Version).Append(@"\");
+            sb.Append(artifact.ArtifactId).Append("-").Append(artifact.Version).Append(".").Append(artifact.Extension);
+            return sb.ToString();
+        }
+    }
+}
\ No newline at end of file

Added: incubator/nmaven/branches/SI_XPT/assemblies/NMaven.Artifact/src/main/csharp/NMaven/Artifact/RepositoryType.cs
URL: http://svn.apache.org/viewvc/incubator/nmaven/branches/SI_XPT/assemblies/NMaven.Artifact/src/main/csharp/NMaven/Artifact/RepositoryType.cs?view=auto&rev=538751
==============================================================================
--- incubator/nmaven/branches/SI_XPT/assemblies/NMaven.Artifact/src/main/csharp/NMaven/Artifact/RepositoryType.cs
(added)
+++ incubator/nmaven/branches/SI_XPT/assemblies/NMaven.Artifact/src/main/csharp/NMaven/Artifact/RepositoryType.cs
Wed May 16 14:49:27 2007
@@ -0,0 +1,11 @@
+using System;
+using System.Text;
+
+namespace NMaven.Artifact
+{
+    public enum RepositoryType
+    {
+        Java = 1,
+        Net = 2
+    }
+}

Modified: incubator/nmaven/branches/SI_XPT/plugins/maven-compile-plugin/src/main/java/org/apache/maven/dotnet/plugin/compile/CompilerMojo.java
URL: http://svn.apache.org/viewvc/incubator/nmaven/branches/SI_XPT/plugins/maven-compile-plugin/src/main/java/org/apache/maven/dotnet/plugin/compile/CompilerMojo.java?view=diff&rev=538751&r1=538750&r2=538751
==============================================================================
--- incubator/nmaven/branches/SI_XPT/plugins/maven-compile-plugin/src/main/java/org/apache/maven/dotnet/plugin/compile/CompilerMojo.java
(original)
+++ incubator/nmaven/branches/SI_XPT/plugins/maven-compile-plugin/src/main/java/org/apache/maven/dotnet/plugin/compile/CompilerMojo.java
Wed May 16 14:49:27 2007
@@ -225,13 +225,14 @@
                                                                                         
          project,
                                                                                         
          profileAssemblyPath );
             Boolean sourceFilesUpToDate = (Boolean) super.getPluginContext().get( "SOURCE_FILES_UP_TO_DATE"
);
-
-            if ( sourceFilesUpToDate && System.getProperty( "forceCompile" ) == null
&&
+            if ( ( ( sourceFilesUpToDate == null ) || sourceFilesUpToDate ) &&
+                System.getProperty( "forceCompile" ) == null && compilerExecutable.getCompiledArtifact()
!= null &&
                 compilerExecutable.getCompiledArtifact().exists() )
             {
                 if ( isUpToDateWithPomAndSettingsAndDependencies( compilerExecutable.getCompiledArtifact()
) )
                 {
                     getLog().info( "NMAVEN-900-003: Nothing to compile - all classes are
up-to-date" );
+                    project.getArtifact().setFile( compilerExecutable.getCompiledArtifact()
);
                     return;
                 }
             }

Modified: incubator/nmaven/branches/SI_XPT/plugins/maven-compile-plugin/src/main/java/org/apache/maven/dotnet/plugin/compile/SourceProcessorMojo.java
URL: http://svn.apache.org/viewvc/incubator/nmaven/branches/SI_XPT/plugins/maven-compile-plugin/src/main/java/org/apache/maven/dotnet/plugin/compile/SourceProcessorMojo.java?view=diff&rev=538751&r1=538750&r2=538751
==============================================================================
--- incubator/nmaven/branches/SI_XPT/plugins/maven-compile-plugin/src/main/java/org/apache/maven/dotnet/plugin/compile/SourceProcessorMojo.java
(original)
+++ incubator/nmaven/branches/SI_XPT/plugins/maven-compile-plugin/src/main/java/org/apache/maven/dotnet/plugin/compile/SourceProcessorMojo.java
Wed May 16 14:49:27 2007
@@ -123,8 +123,6 @@
         getLog().info( "NMAVEN-904-002: Copying source files: From = " + sourceDirectory
+ ",  To = " +
             outputDirectory + ", File Count = " + files.length );
 
-        //Boolean sourceFilesUpToDate = Boolean.TRUE;
-
         super.getPluginContext().put( "SOURCE_FILES_UP_TO_DATE", Boolean.TRUE );
         for ( String file : files )
         {
@@ -144,7 +142,5 @@
                 throw new MojoExecutionException( "NMAVEN-904-000: Unable to process sources",
e );
             }
         }
-
-
     }
 }

Modified: incubator/nmaven/branches/SI_XPT/plugins/maven-test-plugin/src/main/java/org/apache/maven/dotnet/plugin/test/TesterMojo.java
URL: http://svn.apache.org/viewvc/incubator/nmaven/branches/SI_XPT/plugins/maven-test-plugin/src/main/java/org/apache/maven/dotnet/plugin/test/TesterMojo.java?view=diff&rev=538751&r1=538750&r2=538751
==============================================================================
--- incubator/nmaven/branches/SI_XPT/plugins/maven-test-plugin/src/main/java/org/apache/maven/dotnet/plugin/test/TesterMojo.java
(original)
+++ incubator/nmaven/branches/SI_XPT/plugins/maven-test-plugin/src/main/java/org/apache/maven/dotnet/plugin/test/TesterMojo.java
Wed May 16 14:49:27 2007
@@ -174,6 +174,11 @@
 
         for ( Artifact artifact : artifacts )
         {
+            if(artifact.getType().startsWith( "gac"))
+            {
+                continue;
+            }
+
             if ( artifact.getGroupId().equals( "NUnit" ) )
             {
                 nunitLibs.add( artifact );
@@ -186,7 +191,7 @@
                 }
                 catch ( IOException e )
                 {
-                    throw new MojoExecutionException( "NMAVEN-1100-002", e );
+                    throw new MojoExecutionException( "NMAVEN-1100-002: Artifact = " + artifact.toString(),
e );
                 }
             }
         }



Mime
View raw message