incubator-nmaven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sisb...@apache.org
Subject svn commit: r579872 - in /incubator/nmaven/trunk/plugins: maven-embedder-plugin/src/main/java/org/apache/maven/dotnet/plugin/embedder/ maven-test-plugin/src/main/java/org/apache/maven/dotnet/plugin/test/ maven-vsinstaller-plugin/src/main/java/org/apach...
Date Thu, 27 Sep 2007 02:21:21 GMT
Author: sisbell
Date: Wed Sep 26 19:21:20 2007
New Revision: 579872

URL: http://svn.apache.org/viewvc?rev=579872&view=rev
Log:
Plugins now correctly read the version of NMaven to run under.

Modified:
    incubator/nmaven/trunk/plugins/maven-embedder-plugin/src/main/java/org/apache/maven/dotnet/plugin/embedder/EmbedderStarterMojo.java
    incubator/nmaven/trunk/plugins/maven-test-plugin/src/main/java/org/apache/maven/dotnet/plugin/test/TesterMojo.java
    incubator/nmaven/trunk/plugins/maven-vsinstaller-plugin/src/main/java/org/apache/maven/dotnet/plugin/vsinstaller/VsInstallerMojo.java
    incubator/nmaven/trunk/plugins/netplugins/pom.xml

Modified: incubator/nmaven/trunk/plugins/maven-embedder-plugin/src/main/java/org/apache/maven/dotnet/plugin/embedder/EmbedderStarterMojo.java
URL: http://svn.apache.org/viewvc/incubator/nmaven/trunk/plugins/maven-embedder-plugin/src/main/java/org/apache/maven/dotnet/plugin/embedder/EmbedderStarterMojo.java?rev=579872&r1=579871&r2=579872&view=diff
==============================================================================
--- incubator/nmaven/trunk/plugins/maven-embedder-plugin/src/main/java/org/apache/maven/dotnet/plugin/embedder/EmbedderStarterMojo.java
(original)
+++ incubator/nmaven/trunk/plugins/maven-embedder-plugin/src/main/java/org/apache/maven/dotnet/plugin/embedder/EmbedderStarterMojo.java
Wed Sep 26 19:21:20 2007
@@ -35,10 +35,12 @@
 import org.apache.maven.artifact.repository.layout.DefaultRepositoryLayout;
 import org.apache.maven.dotnet.artifact.AssemblyResolver;
 import org.apache.maven.dotnet.artifact.ArtifactContext;
+import org.apache.maven.dotnet.artifact.NetDependenciesRepository;
 import org.apache.maven.dotnet.vendor.VendorInfo;
 import org.apache.maven.dotnet.vendor.VendorFactory;
 import org.apache.maven.dotnet.vendor.VendorUnsupportedException;
 import org.apache.maven.dotnet.PlatformUnsupportedException;
+import org.apache.maven.dotnet.registry.RepositoryRegistry;
 
 import java.util.List;
 import java.util.ArrayList;
@@ -133,9 +135,11 @@
     private String frameworkVersion;
 
     /**
-     * @parameter expression = "${project.version}"
+     * Provides access to configuration information used by NMaven.
+     *
+     * @component
      */
-    private String pomVersion;
+    private org.apache.maven.dotnet.NMavenRepositoryRegistry nmavenRegistry;
 
     /**
      * File logger: needed for creating logs when the IDE starts because the console output
and thrown exceptions are
@@ -309,8 +313,23 @@
         }
     }
 
-    private String artifactsToClassPath( Set<Artifact> artifacts )
+    private String artifactsToClassPath( Set<Artifact> artifacts ) throws MojoExecutionException
     {
+        RepositoryRegistry repositoryRegistry;
+        try
+        {
+            repositoryRegistry = nmavenRegistry.createRepositoryRegistry();
+        }
+        catch ( IOException e )
+        {
+            throw new MojoExecutionException(
+                "NMAVEN-1400-002: Failed to create the repository registry for this plugin",
e );
+        }
+
+        NetDependenciesRepository repository =
+            (NetDependenciesRepository) repositoryRegistry.find( "net-dependencies" );
+        String pomVersion = repository.getProperty( "nmaven.version");
+
         StringBuffer sb = new StringBuffer();
         for ( Artifact artifact : artifacts )
         {

Modified: incubator/nmaven/trunk/plugins/maven-test-plugin/src/main/java/org/apache/maven/dotnet/plugin/test/TesterMojo.java
URL: http://svn.apache.org/viewvc/incubator/nmaven/trunk/plugins/maven-test-plugin/src/main/java/org/apache/maven/dotnet/plugin/test/TesterMojo.java?rev=579872&r1=579871&r2=579872&view=diff
==============================================================================
--- incubator/nmaven/trunk/plugins/maven-test-plugin/src/main/java/org/apache/maven/dotnet/plugin/test/TesterMojo.java
(original)
+++ incubator/nmaven/trunk/plugins/maven-test-plugin/src/main/java/org/apache/maven/dotnet/plugin/test/TesterMojo.java
Wed Sep 26 19:21:20 2007
@@ -138,7 +138,7 @@
 
     public void execute()
         throws MojoExecutionException
-    {
+    {            
         String skipTests = System.getProperty( "maven.test.skip" );
         if ( ( skipTests != null && skipTests.equalsIgnoreCase( "true" ) ) || skipTest
)
         {

Modified: incubator/nmaven/trunk/plugins/maven-vsinstaller-plugin/src/main/java/org/apache/maven/dotnet/plugin/vsinstaller/VsInstallerMojo.java
URL: http://svn.apache.org/viewvc/incubator/nmaven/trunk/plugins/maven-vsinstaller-plugin/src/main/java/org/apache/maven/dotnet/plugin/vsinstaller/VsInstallerMojo.java?rev=579872&r1=579871&r2=579872&view=diff
==============================================================================
--- incubator/nmaven/trunk/plugins/maven-vsinstaller-plugin/src/main/java/org/apache/maven/dotnet/plugin/vsinstaller/VsInstallerMojo.java
(original)
+++ incubator/nmaven/trunk/plugins/maven-vsinstaller-plugin/src/main/java/org/apache/maven/dotnet/plugin/vsinstaller/VsInstallerMojo.java
Wed Sep 26 19:21:20 2007
@@ -29,6 +29,8 @@
 import java.io.OutputStreamWriter;
 import java.util.ArrayList;
 import java.util.List;
+import java.util.Properties;
+import java.util.Set;
 
 /**
  * Installs Visual Studio 2005 addin.
@@ -75,11 +77,6 @@
      */
     private Settings settings;
 
-    /**
-     * @parameter expression = "${project.version}"
-     */
-    private String pomVersion;
-
     public void execute()
         throws MojoExecutionException, MojoFailureException
     {
@@ -100,6 +97,11 @@
             throw new MojoExecutionException(
                 "NMAVEN-1600-000: Failed to create the repository registry for this plugin",
e );
         }
+
+        NetDependenciesRepository netRepository =
+            (NetDependenciesRepository) repositoryRegistry.find( "net-dependencies" );
+        String pomVersion = netRepository.getProperty( "nmaven.version");
+
         List<ArtifactRepository> remoteRepositories = new ArrayList<ArtifactRepository>();
 
         //TODO: Only use active profiles
@@ -142,12 +144,10 @@
         }
 
         //GAC Installs
-        NetDependenciesRepository repository =
-            (NetDependenciesRepository) repositoryRegistry.find( "net-dependencies" );
 
         List<NetDependencyMatchPolicy> gacInstallPolicies = new ArrayList<NetDependencyMatchPolicy>();
         gacInstallPolicies.add( new GacMatchPolicy( true ) );
-        List<Dependency> gacInstallDependencies = repository.getDependenciesFor( gacInstallPolicies
);
+        List<Dependency> gacInstallDependencies = netRepository.getDependenciesFor(
gacInstallPolicies );
         for ( Dependency dependency : gacInstallDependencies )
         {
             List<Artifact> artifacts = artifactContext.getArtifactsFor( dependency.getGroupId(),

Modified: incubator/nmaven/trunk/plugins/netplugins/pom.xml
URL: http://svn.apache.org/viewvc/incubator/nmaven/trunk/plugins/netplugins/pom.xml?rev=579872&r1=579871&r2=579872&view=diff
==============================================================================
--- incubator/nmaven/trunk/plugins/netplugins/pom.xml (original)
+++ incubator/nmaven/trunk/plugins/netplugins/pom.xml Wed Sep 26 19:21:20 2007
@@ -35,18 +35,18 @@
     <module>NMaven.Plugin.Addin</module>  
     <module>NMaven.Plugin.Devenv</module>  
     <module>NMaven.Plugin.Resx</module>  
-    <module>NMaven.Plugin.Settings</module>  
-  </modules>
-    <profiles>
-    <profile>
-      <activation>
-        <property>
-          <name>VisualStudio2005</name>
-        </property>
-      </activation>
-      <modules>
-           <module>NMaven.Plugin.Solution</module>
-      </modules>
-    </profile>
-  </profiles>
+    <module>NMaven.Plugin.Settings</module> 
+  </modules>  
+  <profiles> 
+    <profile> 
+      <activation> 
+        <property> 
+          <name>VisualStudio2005</name> 
+        </property> 
+      </activation>  
+      <modules> 
+        <module>NMaven.Plugin.Solution</module> 
+      </modules> 
+    </profile> 
+  </profiles> 
 </project>



Mime
View raw message