incubator-nmaven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sisb...@apache.org
Subject svn commit: r538702 - in /incubator/nmaven/branches/SI_XPT: ./ assemblies/NMaven.Artifact/src/main/csharp/ assemblies/NMaven.Artifact/src/main/csharp/NMaven/Artifact/ assemblies/NMaven.IDE/src/main/csharp/ assemblies/NMaven.Logging/ assemblies/NMaven.L...
Date Wed, 16 May 2007 20:01:33 GMT
Author: sisbell
Date: Wed May 16 13:01:31 2007
New Revision: 538702

URL: http://svn.apache.org/viewvc?view=rev&rev=538702
Log:
Build does not compile if :1) source files are up-to-date; 2) the pom.xml file has not been
updated since last compile; 3) the nmaven-settings file has not been modified since last compile.
Still need to handle: 1) changing vendor info from command line; 2) change in resources. Can
use -DforceCompile to force a compile.

Modified:
    incubator/nmaven/branches/SI_XPT/assemblies/NMaven.Artifact/src/main/csharp/NMaven.Artifact.csproj
    incubator/nmaven/branches/SI_XPT/assemblies/NMaven.Artifact/src/main/csharp/NMaven/Artifact/ArtifactContext.cs
    incubator/nmaven/branches/SI_XPT/assemblies/NMaven.Artifact/src/main/csharp/NMaven/Artifact/ArtifactRepositoryLayout.cs
    incubator/nmaven/branches/SI_XPT/assemblies/NMaven.IDE/src/main/csharp/NMaven.IDE.csproj
    incubator/nmaven/branches/SI_XPT/assemblies/NMaven.Logging/pom.xml
    incubator/nmaven/branches/SI_XPT/assemblies/NMaven.Logging/src/main/csharp/NMaven.Logging.csproj
    incubator/nmaven/branches/SI_XPT/assemblies/NMaven.Logging/src/main/csharp/NMaven/Logging/IHandler.cs
    incubator/nmaven/branches/SI_XPT/assemblies/NMaven.Plugin.MojoGenerator/src/main/csharp/NMaven.Plugin.MojoGenerator.csproj
    incubator/nmaven/branches/SI_XPT/assemblies/NMaven.Plugin/src/main/csharp/NMaven.Plugin.csproj
    incubator/nmaven/branches/SI_XPT/assemblies/NMaven.Service/Embedder/src/main/csharp/NMaven.Service.Embedder.csproj
    incubator/nmaven/branches/SI_XPT/assemblies/NMaven.VisualStudio.Addin/pom.xml
    incubator/nmaven/branches/SI_XPT/assemblies/NMaven.VisualStudio.Addin/src/main/csharp/NMaven/VisualStudio/Addin/Connect.cs
    incubator/nmaven/branches/SI_XPT/components/dotnet-artifact/src/main/java/org/apache/maven/dotnet/artifact/impl/AssemblyResolverImpl.java
    incubator/nmaven/branches/SI_XPT/components/dotnet-jetty/src/main/java/org/apache/maven/dotnet/jetty/JettyStarter.java
    incubator/nmaven/branches/SI_XPT/maven-dotnet.iml
    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-install-plugin/src/main/java/org/apache/maven/dotnet/plugin/install/FileInstallerMojo.java

Modified: incubator/nmaven/branches/SI_XPT/assemblies/NMaven.Artifact/src/main/csharp/NMaven.Artifact.csproj
URL: http://svn.apache.org/viewvc/incubator/nmaven/branches/SI_XPT/assemblies/NMaven.Artifact/src/main/csharp/NMaven.Artifact.csproj?view=diff&rev=538702&r1=538701&r2=538702
==============================================================================
--- incubator/nmaven/branches/SI_XPT/assemblies/NMaven.Artifact/src/main/csharp/NMaven.Artifact.csproj
(original)
+++ incubator/nmaven/branches/SI_XPT/assemblies/NMaven.Artifact/src/main/csharp/NMaven.Artifact.csproj
Wed May 16 13:01:31 2007
@@ -24,6 +24,9 @@
     <Compile Include="NMaven\Artifact\ArtifactContext.cs" />
     <Compile Include="NMaven\Artifact\ArtifactRepositoryLayout.cs" />
     <Compile Include="NMaven\Artifact\ArtifactScope.cs" />
+    <Compile Include="NMaven\Artifact\AssemblyRepositoryLayout.cs" />
+    <Compile Include="NMaven\Artifact\JavaRepositoryLayout.cs" />
+    <Compile Include="NMaven\Artifact\RepositoryType.cs" />
   </ItemGroup>
   <ItemGroup />
   <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.Targets" />

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=538702&r1=538701&r2=538702
==============================================================================
--- 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 13:01:31 2007
@@ -8,14 +8,59 @@
 {
     public class ArtifactContext
     {
-        public Artifact GetArtifactFor(NMaven.Model.Model model)
+
+        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)
         {
             Artifact artifact = new Artifact();
-            Console.WriteLine("Model Id = " + model.artifactId);
             artifact.ArtifactId = model.artifactId;
             artifact.GroupId = model.groupId;
             artifact.Version = model.version;
             artifact.Extension = GetExtensionFor(model.packaging);
+            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)
+        {
+            Artifact artifact = new Artifact();
+            artifact.ArtifactId = artifactId;
+            artifact.GroupId = groupId;
+            artifact.Version = version;
+            artifact.Extension = GetExtensionFor(packaging);
             return artifact;
         }
 

Modified: incubator/nmaven/branches/SI_XPT/assemblies/NMaven.Artifact/src/main/csharp/NMaven/Artifact/ArtifactRepositoryLayout.cs
URL: http://svn.apache.org/viewvc/incubator/nmaven/branches/SI_XPT/assemblies/NMaven.Artifact/src/main/csharp/NMaven/Artifact/ArtifactRepositoryLayout.cs?view=diff&rev=538702&r1=538701&r2=538702
==============================================================================
--- incubator/nmaven/branches/SI_XPT/assemblies/NMaven.Artifact/src/main/csharp/NMaven/Artifact/ArtifactRepositoryLayout.cs
(original)
+++ incubator/nmaven/branches/SI_XPT/assemblies/NMaven.Artifact/src/main/csharp/NMaven/Artifact/ArtifactRepositoryLayout.cs
Wed May 16 13:01:31 2007
@@ -1,19 +1,11 @@
-using System;
-using System.Collections.Generic;
-using System.Text;
-
-namespace NMaven.Artifact
-{
-    public class 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();
-        }
-    }
-}
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace NMaven.Artifact
+{
+    public interface ArtifactRepositoryLayout
+    {
+        String pathOf(Artifact artifact);
+    }
+}
\ No newline at end of file

Modified: incubator/nmaven/branches/SI_XPT/assemblies/NMaven.IDE/src/main/csharp/NMaven.IDE.csproj
URL: http://svn.apache.org/viewvc/incubator/nmaven/branches/SI_XPT/assemblies/NMaven.IDE/src/main/csharp/NMaven.IDE.csproj?view=diff&rev=538702&r1=538701&r2=538702
==============================================================================
--- incubator/nmaven/branches/SI_XPT/assemblies/NMaven.IDE/src/main/csharp/NMaven.IDE.csproj
(original)
+++ incubator/nmaven/branches/SI_XPT/assemblies/NMaven.IDE/src/main/csharp/NMaven.IDE.csproj
Wed May 16 13:01:31 2007
@@ -1,6 +1,6 @@
 <Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
   <PropertyGroup>
-    <ProjectGuid>{97D20992-8D5D-49E6-B3E2-D39710FA436A}</ProjectGuid>
+    <ProjectGuid>{B18F99C3-157F-431F-B10B-76162AB08C83}</ProjectGuid>
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
     <RootNameSpace>NMaven.IDE</RootNameSpace>
     <AssemblyName>NMaven.IDE</AssemblyName>

Modified: incubator/nmaven/branches/SI_XPT/assemblies/NMaven.Logging/pom.xml
URL: http://svn.apache.org/viewvc/incubator/nmaven/branches/SI_XPT/assemblies/NMaven.Logging/pom.xml?view=diff&rev=538702&r1=538701&r2=538702
==============================================================================
--- incubator/nmaven/branches/SI_XPT/assemblies/NMaven.Logging/pom.xml (original)
+++ incubator/nmaven/branches/SI_XPT/assemblies/NMaven.Logging/pom.xml Wed May 16 13:01:31
2007
@@ -27,5 +27,5 @@
   <artifactId>NMaven.Logging</artifactId>
   <packaging>library</packaging>
   <version>0.14-SNAPSHOT</version>
-  <name>NMaven.Library</name>
+  <name>NMaven.Library</name>  
 </project>

Modified: incubator/nmaven/branches/SI_XPT/assemblies/NMaven.Logging/src/main/csharp/NMaven.Logging.csproj
URL: http://svn.apache.org/viewvc/incubator/nmaven/branches/SI_XPT/assemblies/NMaven.Logging/src/main/csharp/NMaven.Logging.csproj?view=diff&rev=538702&r1=538701&r2=538702
==============================================================================
--- incubator/nmaven/branches/SI_XPT/assemblies/NMaven.Logging/src/main/csharp/NMaven.Logging.csproj
(original)
+++ incubator/nmaven/branches/SI_XPT/assemblies/NMaven.Logging/src/main/csharp/NMaven.Logging.csproj
Wed May 16 13:01:31 2007
@@ -1,6 +1,6 @@
 <Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
   <PropertyGroup>
-    <ProjectGuid>{f6921049-7c11-472d-85f2-71ca8e0e8243}</ProjectGuid>
+    <ProjectGuid>{36FCE4F7-53D7-48AC-9AF4-74CB0F6020F6}</ProjectGuid>
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
     <RootNameSpace>NMaven.Logging</RootNameSpace>
     <AssemblyName>NMaven.Logging</AssemblyName>
@@ -13,10 +13,6 @@
   <ItemGroup>
     <Reference Include="System" />
     <Reference Include="System.Xml" />
-  </ItemGroup>
-  <ItemGroup>
-    <Folder Include="NMaven" />
-    <Folder Include="NMaven\Logging" />
   </ItemGroup>
   <ItemGroup>
     <Compile Include="NMaven\Logging\ConsoleHandler.cs" />

Modified: incubator/nmaven/branches/SI_XPT/assemblies/NMaven.Logging/src/main/csharp/NMaven/Logging/IHandler.cs
URL: http://svn.apache.org/viewvc/incubator/nmaven/branches/SI_XPT/assemblies/NMaven.Logging/src/main/csharp/NMaven/Logging/IHandler.cs?view=diff&rev=538702&r1=538701&r2=538702
==============================================================================
--- incubator/nmaven/branches/SI_XPT/assemblies/NMaven.Logging/src/main/csharp/NMaven/Logging/IHandler.cs
(original)
+++ incubator/nmaven/branches/SI_XPT/assemblies/NMaven.Logging/src/main/csharp/NMaven/Logging/IHandler.cs
Wed May 16 13:01:31 2007
@@ -10,7 +10,7 @@
 		void publish(LogRecord record);
 		
 		void SetLevel(Level level);
-		
+
 		Level GetLevel();
 	}
 }

Modified: incubator/nmaven/branches/SI_XPT/assemblies/NMaven.Plugin.MojoGenerator/src/main/csharp/NMaven.Plugin.MojoGenerator.csproj
URL: http://svn.apache.org/viewvc/incubator/nmaven/branches/SI_XPT/assemblies/NMaven.Plugin.MojoGenerator/src/main/csharp/NMaven.Plugin.MojoGenerator.csproj?view=diff&rev=538702&r1=538701&r2=538702
==============================================================================
--- incubator/nmaven/branches/SI_XPT/assemblies/NMaven.Plugin.MojoGenerator/src/main/csharp/NMaven.Plugin.MojoGenerator.csproj
(original)
+++ incubator/nmaven/branches/SI_XPT/assemblies/NMaven.Plugin.MojoGenerator/src/main/csharp/NMaven.Plugin.MojoGenerator.csproj
Wed May 16 13:01:31 2007
@@ -1,6 +1,6 @@
 <Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
   <PropertyGroup>
-    <ProjectGuid>{57e048c1-3dab-48d6-92a5-88ddcb57e71e}</ProjectGuid>
+    <ProjectGuid>{D0402300-C624-4E82-9861-3C19A04C0568}</ProjectGuid>
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
     <RootNameSpace>NMaven.Plugin</RootNameSpace>
     <AssemblyName>NMaven.Plugin.MojoGenerator</AssemblyName>
@@ -17,11 +17,6 @@
     <Reference Include="System.Runtime.Remoting" />
     <Reference Include="System.Windows.Forms" />
     <Reference Include="System.Xml" />
-  </ItemGroup>
-  <ItemGroup>
-    <Folder Include="NMaven" />
-    <Folder Include="NMaven\Plugin" />
-    <Folder Include="NMaven\Plugin\MojoGenerator" />
   </ItemGroup>
   <ItemGroup>
     <Compile Include="NMaven\Plugin\MojoGenerator\Generator.cs" />

Modified: incubator/nmaven/branches/SI_XPT/assemblies/NMaven.Plugin/src/main/csharp/NMaven.Plugin.csproj
URL: http://svn.apache.org/viewvc/incubator/nmaven/branches/SI_XPT/assemblies/NMaven.Plugin/src/main/csharp/NMaven.Plugin.csproj?view=diff&rev=538702&r1=538701&r2=538702
==============================================================================
--- incubator/nmaven/branches/SI_XPT/assemblies/NMaven.Plugin/src/main/csharp/NMaven.Plugin.csproj
(original)
+++ incubator/nmaven/branches/SI_XPT/assemblies/NMaven.Plugin/src/main/csharp/NMaven.Plugin.csproj
Wed May 16 13:01:31 2007
@@ -1,6 +1,6 @@
 <Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
   <PropertyGroup>
-    <ProjectGuid>{98f968ea-3204-487f-8ae7-7d2dbfbcb165}</ProjectGuid>
+    <ProjectGuid>{DB7FF79A-7761-4797-8477-14480ADC0C3D}</ProjectGuid>
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
     <RootNameSpace>NMaven.Plugin</RootNameSpace>
     <AssemblyName>NMaven.Plugin</AssemblyName>
@@ -16,13 +16,6 @@
     <Reference Include="System" />
     <Reference Include="System.Xml" />
     <Reference Include="System.Xml" />
-  </ItemGroup>
-  <ItemGroup>
-    <Folder Include="NMaven" />
-    <Folder Include="NMaven\Plugin" />
-    <Folder Include="NMaven\Plugin\Generator" />
-    <Folder Include="NMaven\Plugin\Injector" />
-    <Folder Include="NMaven\Plugin\Injector\Impl" />
   </ItemGroup>
   <ItemGroup>
     <Compile Include="NMaven\Plugin\AbstractMojo.cs" />

Modified: incubator/nmaven/branches/SI_XPT/assemblies/NMaven.Service/Embedder/src/main/csharp/NMaven.Service.Embedder.csproj
URL: http://svn.apache.org/viewvc/incubator/nmaven/branches/SI_XPT/assemblies/NMaven.Service/Embedder/src/main/csharp/NMaven.Service.Embedder.csproj?view=diff&rev=538702&r1=538701&r2=538702
==============================================================================
--- incubator/nmaven/branches/SI_XPT/assemblies/NMaven.Service/Embedder/src/main/csharp/NMaven.Service.Embedder.csproj
(original)
+++ incubator/nmaven/branches/SI_XPT/assemblies/NMaven.Service/Embedder/src/main/csharp/NMaven.Service.Embedder.csproj
Wed May 16 13:01:31 2007
@@ -1,6 +1,6 @@
 <Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
   <PropertyGroup>
-    <ProjectGuid>{3f652270-1b32-4f0b-8158-92623bd06578}</ProjectGuid>
+    <ProjectGuid>{FD65FE0D-A9F2-4AD7-91C6-E94BE90A7E0F}</ProjectGuid>
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
     <RootNameSpace>NMaven.Service</RootNameSpace>
     <AssemblyName>NMaven.Service.Embedder</AssemblyName>
@@ -12,11 +12,6 @@
   </PropertyGroup>
   <ItemGroup>
     <Reference Include="System.Xml" />
-  </ItemGroup>
-  <ItemGroup>
-    <Folder Include="NMaven" />
-    <Folder Include="NMaven\Service" />
-    <Folder Include="NMaven\Service\Embedder" />
   </ItemGroup>
   <ItemGroup>
     <Compile Include="NMaven\Service\Embedder\MavenEmbedder.cs" />

Modified: incubator/nmaven/branches/SI_XPT/assemblies/NMaven.VisualStudio.Addin/pom.xml
URL: http://svn.apache.org/viewvc/incubator/nmaven/branches/SI_XPT/assemblies/NMaven.VisualStudio.Addin/pom.xml?view=diff&rev=538702&r1=538701&r2=538702
==============================================================================
--- incubator/nmaven/branches/SI_XPT/assemblies/NMaven.VisualStudio.Addin/pom.xml (original)
+++ incubator/nmaven/branches/SI_XPT/assemblies/NMaven.VisualStudio.Addin/pom.xml Wed May
16 13:01:31 2007
@@ -61,6 +61,12 @@
       <scope>runtime</scope>
     </dependency>
     <dependency>
+      <groupId>NMaven.Artifact</groupId>
+      <artifactId>NMaven.Artifact</artifactId>
+      <version>0.14-SNAPSHOT</version>
+      <type>library</type>
+    </dependency>
+    <dependency>
       <groupId>Microsoft.VisualStudio.CommandBars</groupId>
       <artifactId>Microsoft.VisualStudio.CommandBars</artifactId>
       <version>8.0.0.0__b03f5f7f11d50a3a</version>

Modified: incubator/nmaven/branches/SI_XPT/assemblies/NMaven.VisualStudio.Addin/src/main/csharp/NMaven/VisualStudio/Addin/Connect.cs
URL: http://svn.apache.org/viewvc/incubator/nmaven/branches/SI_XPT/assemblies/NMaven.VisualStudio.Addin/src/main/csharp/NMaven/VisualStudio/Addin/Connect.cs?view=diff&rev=538702&r1=538701&r2=538702
==============================================================================
--- incubator/nmaven/branches/SI_XPT/assemblies/NMaven.VisualStudio.Addin/src/main/csharp/NMaven/VisualStudio/Addin/Connect.cs
(original)
+++ incubator/nmaven/branches/SI_XPT/assemblies/NMaven.VisualStudio.Addin/src/main/csharp/NMaven/VisualStudio/Addin/Connect.cs
Wed May 16 13:01:31 2007
@@ -11,6 +11,7 @@
 
 using Microsoft.VisualStudio.CommandBars;
 
+using NMaven.Artifact;
 using NMaven.IDE;
 using NMaven.IDE.Controls;
 using NMaven.IDE.Commands;
@@ -98,8 +99,10 @@
                     //  safely ignore the exception.
                 }
 
+                ArtifactContext artifactContext = new ArtifactContext();
+            //artifactContext.GetArtifactFor("org.apache.maven.dotnet", "dotnet-jetty", "0.14-SNAPSHOT",
);    
 			ProcessStartInfo processStartInfo =
-				new ProcessStartInfo("mvn", "org.apache.maven.dotnet.plugins:maven-embedder-plugin:start
-Dport=8080");
+				new ProcessStartInfo("mvn", "org.apache.maven.dotnet.plugins:maven-embedder-plugin:start
-Dport=8080 -DwarFile=");
 			processStartInfo.UseShellExecute = true;
 			System.Diagnostics.Process.Start(processStartInfo);
 

Modified: incubator/nmaven/branches/SI_XPT/components/dotnet-artifact/src/main/java/org/apache/maven/dotnet/artifact/impl/AssemblyResolverImpl.java
URL: http://svn.apache.org/viewvc/incubator/nmaven/branches/SI_XPT/components/dotnet-artifact/src/main/java/org/apache/maven/dotnet/artifact/impl/AssemblyResolverImpl.java?view=diff&rev=538702&r1=538701&r2=538702
==============================================================================
--- incubator/nmaven/branches/SI_XPT/components/dotnet-artifact/src/main/java/org/apache/maven/dotnet/artifact/impl/AssemblyResolverImpl.java
(original)
+++ incubator/nmaven/branches/SI_XPT/components/dotnet-artifact/src/main/java/org/apache/maven/dotnet/artifact/impl/AssemblyResolverImpl.java
Wed May 16 13:01:31 2007
@@ -121,7 +121,7 @@
             }
             else
             {
-                logger.info( "NMAVEN-000-000: Dependency: Type  = " + artifact.getType()
+ ", Artifact ID = " +
+                logger.debug( "NMAVEN-000-000: Dependency: Type  = " + artifact.getType()
+ ", Artifact ID = " +
                     artifact.getArtifactId() );
                 artifactDependencies.add( artifact );
             }
@@ -138,9 +138,12 @@
         {
             for ( Artifact artifact : resolvedDependencies )
             {
-                File orginalFileWithVersion = artifact.getFile();
-                orginalFileWithVersion.renameTo(
-                    new File( localArtifactRepository + "/" + layout.pathOf( artifact ) )
);
+                File originalFileWithVersion = artifact.getFile();
+                File targetFileWithoutVersion = new File( localArtifactRepository + "/" +
layout.pathOf( artifact ) );
+              //  logger.info( "Original = " + originalFileWithVersion.getAbsolutePath()
+ ", Target = " +
+              //      targetFileWithoutVersion.getAbsolutePath() );
+                originalFileWithVersion.renameTo( targetFileWithoutVersion );
+               // artifact.setFile( targetFileWithoutVersion.getAbsoluteFile() );
             }
 
             resolvedDependencies.addAll( gacDependencies );

Modified: incubator/nmaven/branches/SI_XPT/components/dotnet-jetty/src/main/java/org/apache/maven/dotnet/jetty/JettyStarter.java
URL: http://svn.apache.org/viewvc/incubator/nmaven/branches/SI_XPT/components/dotnet-jetty/src/main/java/org/apache/maven/dotnet/jetty/JettyStarter.java?view=diff&rev=538702&r1=538701&r2=538702
==============================================================================
--- incubator/nmaven/branches/SI_XPT/components/dotnet-jetty/src/main/java/org/apache/maven/dotnet/jetty/JettyStarter.java
(original)
+++ incubator/nmaven/branches/SI_XPT/components/dotnet-jetty/src/main/java/org/apache/maven/dotnet/jetty/JettyStarter.java
Wed May 16 13:01:31 2007
@@ -16,7 +16,7 @@
         Server server = new Server( Integer.parseInt( port ) );
         WebAppContext context = new WebAppContext();
         context.setWar(System.getProperty( "warFile" ));
-          //  
+
         context.setServer( server );
         context.setContextPath( "/dotnet-service-embedder" );
         HandlerCollection handlers = new HandlerCollection();

Modified: incubator/nmaven/branches/SI_XPT/maven-dotnet.iml
URL: http://svn.apache.org/viewvc/incubator/nmaven/branches/SI_XPT/maven-dotnet.iml?view=diff&rev=538702&r1=538701&r2=538702
==============================================================================
--- incubator/nmaven/branches/SI_XPT/maven-dotnet.iml (original)
+++ incubator/nmaven/branches/SI_XPT/maven-dotnet.iml Wed May 16 13:01:31 2007
@@ -34,6 +34,7 @@
       <sourceFolder url="file://$MODULE_DIR$/components/dotnet-plugin/src/main/java" isTestSource="false"
/>
       <sourceFolder url="file://$MODULE_DIR$/components/dotnet-registry/src/main/java"
isTestSource="false" />
       <sourceFolder url="file://$MODULE_DIR$/components/dotnet-registry/src/main/resources"
isTestSource="false" />
+      <sourceFolder url="file://$MODULE_DIR$/components/dotnet-repository/src/main/java"
isTestSource="false" />
       <sourceFolder url="file://$MODULE_DIR$/components/dotnet-vendor/src/main/java" isTestSource="false"
/>
       <sourceFolder url="file://$MODULE_DIR$/components/dotnet-vendor/src/main/resources"
isTestSource="false" />
       <sourceFolder url="file://$MODULE_DIR$/components/dotnet-vendor/src/test/java" isTestSource="false"
/>

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=538702&r1=538701&r2=538702
==============================================================================
--- 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 13:01:31 2007
@@ -27,9 +27,17 @@
 import org.apache.maven.dotnet.executable.ExecutionException;
 import org.apache.maven.dotnet.vendor.VendorFactory;
 import org.apache.maven.dotnet.executable.compiler.*;
+import org.apache.maven.artifact.Artifact;
+import org.codehaus.plexus.util.FileUtils;
+import org.codehaus.plexus.util.DirectoryScanner;
 
 import java.util.ArrayList;
+import java.util.List;
+import java.util.Set;
+import java.util.Date;
+import java.util.Calendar;
 import java.io.File;
+import java.io.FilenameFilter;
 
 /**
  * Maven Mojo for compiling Class files to the .NET Intermediate Language.
@@ -47,7 +55,7 @@
 public final class CompilerMojo
     extends AbstractMojo
 {
-     /**
+    /**
      * The maven project.
      *
      * @parameter expression="${project}"
@@ -139,6 +147,13 @@
      */
     private org.apache.maven.dotnet.executable.NetExecutableFactory netExecutableFactory;
 
+    /**
+     * @parameter expression="${project.file}"
+     * @required
+     * @readonly
+     */
+    private File pomFile;
+
 
     /**
      * Compiles the class files.
@@ -150,16 +165,16 @@
         throws MojoExecutionException
     {
         long startTime = System.currentTimeMillis();
- 
+
         if ( profileAssemblyPath != null && !profileAssemblyPath.exists() )
         {
-            throw new MojoExecutionException( "NMAVEN-900-007: Profile Assembly Path does
not exist: Path = " +
+            throw new MojoExecutionException( "NMAVEN-900-000: Profile Assembly Path does
not exist: Path = " +
                 profileAssemblyPath.getAbsolutePath() );
         }
 
-        if(localRepository == null)
+        if ( localRepository == null )
         {
-            localRepository = new File(System.getProperty("user.home"), ".m2/repository");
+            localRepository = new File( System.getProperty( "user.home" ), ".m2/repository"
);
         }
 
         //Requirement
@@ -177,7 +192,7 @@
         }
         catch ( PlatformUnsupportedException e )
         {
-            throw new MojoExecutionException( "NMAVEN-900-000: Unknown Vendor: Vendor = "
+ vendor, e );
+            throw new MojoExecutionException( "NMAVEN-900-001: Unknown Vendor: Vendor = "
+ vendor, e );
         }
 
         //Config
@@ -191,7 +206,7 @@
         ArtifactType artifactType = ArtifactType.getArtifactTypeForPackagingName( artifactTypeName
);
         if ( artifactType.equals( ArtifactType.NULL ) )
         {
-            throw new MojoExecutionException( "NMAVEN-900-001: Unrecognized artifact type:
Language = " + language +
+            throw new MojoExecutionException( "NMAVEN-900-002: Unrecognized artifact type:
Language = " + language +
                 ", Vendor = " + vendor + ", ArtifactType = " + artifactTypeName );
         }
         compilerConfig.setArtifactType( artifactType );
@@ -209,25 +224,83 @@
                                                                                         
          compilerConfig,
                                                                                         
          project,
                                                                                         
          profileAssemblyPath );
+            Boolean sourceFilesUpToDate = (Boolean) super.getPluginContext().get( "SOURCE_FILES_UP_TO_DATE"
);
+
+            if ( sourceFilesUpToDate && System.getProperty( "forceCompile" ) == null
&&
+                compilerExecutable.getCompiledArtifact().exists() )
+            {
+                if ( isUpToDateWithPomAndSettingsAndDependencies( compilerExecutable.getCompiledArtifact()
) )
+                {
+                    getLog().info( "NMAVEN-900-003: Nothing to compile - all classes are
up-to-date" );
+                    return;
+                }
+            }
             long startTimeCompile = System.currentTimeMillis();
             compilerExecutable.execute();
             long endTimeCompile = System.currentTimeMillis();
 
-            getLog().info( "NMAVEN-900-008: Compile Time = " + (endTimeCompile - startTimeCompile)
+ " ms");
+            getLog().info( "NMAVEN-900-004: Compile Time = " + ( endTimeCompile - startTimeCompile
) + " ms" );
             project.getArtifact().setFile( compilerExecutable.getCompiledArtifact() );
         }
         catch ( PlatformUnsupportedException e )
         {
-            throw new MojoExecutionException( "NMAVEN-900-003: Unsupported Platform: Language
= " + language +
+            throw new MojoExecutionException( "NMAVEN-900-005: Unsupported Platform: Language
= " + language +
                 ", Vendor = " + vendor + ", ArtifactType = " + artifactTypeName, e );
         }
         catch ( ExecutionException e )
         {
-            throw new MojoExecutionException( "NMAVEN-900-004: Unable to Compile: Language
= " + language +
+            throw new MojoExecutionException( "NMAVEN-900-006: Unable to Compile: Language
= " + language +
                 ", Vendor = " + vendor + ", ArtifactType = " + artifactTypeName + ", Source
Directory = " +
                 project.getBuild().getSourceDirectory(), e );
         }
         long endTime = System.currentTimeMillis();
-        getLog().info( "Mojo Execution Time = " + (endTime - startTime));
+        getLog().info( "Mojo Execution Time = " + ( endTime - startTime ) );
+    }
+
+    private boolean isUpToDateWithPomAndSettingsAndDependencies( File targetFile )
+    {
+        File settingsFile = new File( localRepository, ".m2/nmaven-settings.xml" );
+        Artifact latestDependencyModification =
+            this.getLatestDependencyModification( project.getDependencyArtifacts() );
+
+        //TODO: Different parameters from the command line should also cause an update
+        //TODO: Change in resource should cause an update
+        if ( targetFile.lastModified() < pomFile.lastModified() )
+        {
+            getLog().info( "NMAVEN-900-007: Project pom has changed. Forcing a recompile."
);
+            return false;
+        }
+        else if ( settingsFile.exists() && targetFile.lastModified() < settingsFile.lastModified()
)
+        {
+            getLog().info( "NMAVEN-900-008:Project settings has changed. Forcing a recompile."
);
+            return false;
+        }
+        else if ( latestDependencyModification != null &&
+            targetFile.lastModified() < latestDependencyModification.getFile().lastModified()
)
+        {
+            getLog().info(
+                "NMAVEN-900-009: Detected change in module dependency. Forcing a recompile:
Changed Artifact = " +
+                    latestDependencyModification );
+            return false;
+        }
+        return true;
+    }
+
+    private Artifact getLatestDependencyModification( Set<Artifact> artifacts )
+    {
+        Artifact lastModArtifact = null;
+        for ( Artifact artifact : artifacts )
+        {
+            if ( lastModArtifact == null && !artifact.getType().startsWith( "gac"
) )
+            {
+                lastModArtifact = artifact;
+            }
+            else if ( !artifact.getType().startsWith( "gac" ) &&
+                artifact.getFile().lastModified() > lastModArtifact.getFile().lastModified()
)
+            {
+                lastModArtifact = artifact;
+            }
+        }
+        return lastModArtifact;
     }
 }

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=538702&r1=538701&r2=538702
==============================================================================
--- 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 13:01:31 2007
@@ -124,8 +124,8 @@
             outputDirectory + ", File Count = " + files.length );
 
         //Boolean sourceFilesUpToDate = Boolean.TRUE;
-        //super.getPluginContext().put("SOURCE_FILES_UP_TO_DATE", sourceFilesUpToDate );
 
+        super.getPluginContext().put( "SOURCE_FILES_UP_TO_DATE", Boolean.TRUE );
         for ( String file : files )
         {
             try
@@ -134,8 +134,9 @@
                 File targetFile = new File( outputDirectory + File.separator + file );
                 if ( sourceFile.lastModified() > targetFile.lastModified() )
                 {
-                    //sourceFilesUpToDate = Boolean.FALSE;
+                    super.getPluginContext().put( "SOURCE_FILES_UP_TO_DATE", Boolean.FALSE
);
                     FileUtils.copyFile( sourceFile, targetFile );
+                    targetFile.setLastModified( System.currentTimeMillis() );
                 }
             }
             catch ( IOException e )
@@ -143,5 +144,7 @@
                 throw new MojoExecutionException( "NMAVEN-904-000: Unable to process sources",
e );
             }
         }
+
+
     }
 }

Modified: incubator/nmaven/branches/SI_XPT/plugins/maven-install-plugin/src/main/java/org/apache/maven/dotnet/plugin/install/FileInstallerMojo.java
URL: http://svn.apache.org/viewvc/incubator/nmaven/branches/SI_XPT/plugins/maven-install-plugin/src/main/java/org/apache/maven/dotnet/plugin/install/FileInstallerMojo.java?view=diff&rev=538702&r1=538701&r2=538702
==============================================================================
--- incubator/nmaven/branches/SI_XPT/plugins/maven-install-plugin/src/main/java/org/apache/maven/dotnet/plugin/install/FileInstallerMojo.java
(original)
+++ incubator/nmaven/branches/SI_XPT/plugins/maven-install-plugin/src/main/java/org/apache/maven/dotnet/plugin/install/FileInstallerMojo.java
Wed May 16 13:01:31 2007
@@ -25,6 +25,7 @@
 import java.io.File;
 
 import org.apache.maven.dotnet.artifact.ArtifactContext;
+import org.apache.maven.artifact.installer.ArtifactInstallationException;
 
 /**
  * @goal install-file
@@ -57,6 +58,12 @@
     private File artifactFile;
 
     /**
+     * @parameter expression = "${pomFile}
+     * @required
+     */
+    private File pomFile;
+
+    /**
      * @parameter expression = "${groupId}
      * @required
      */
@@ -99,17 +106,33 @@
         throws MojoExecutionException
     {
         artifactContext.init( project, project.getRemoteArtifactRepositories(), localRepository
);
-        if ( generatePom )
+        if ( pomFile != null && !pomFile.exists() )
+        {
+            throw new MojoExecutionException(
+                "NMAVEN-1000-002: Pom  File is missing: File = " + pomFile.getAbsolutePath()
);
+        }
+        else if ( generatePom &&  pomFile == null  )
         {
             try
             {
 
-                artifactContext.getArtifactInstaller().installFileWithGeneratedPom( groupId,
artifactId, version, packaging,
-                                                                                    artifactFile
);
+                artifactContext.getArtifactInstaller().installFileWithGeneratedPom( groupId,
artifactId, version,
+                                                                                    packaging,
artifactFile );
             }
             catch ( org.apache.maven.artifact.installer.ArtifactInstallationException e )
             {
                 throw new MojoExecutionException( "NMAVEN-1000-000: Failed to install artifact
file", e );
+            }
+        }
+        else if(pomFile != null)
+        {
+            try
+            {
+                artifactContext.getArtifactInstaller().installArtifact( project.getArtifact(),
pomFile);
+            }
+            catch ( ArtifactInstallationException e )
+            {
+               throw new MojoExecutionException( "NMAVEN-1000-003: Failed to install artifact
file", e );
             }
         }
         else



Mime
View raw message