Author: sisbell
Date: Fri May 11 10:46:14 2007
New Revision: 537246

URL: http://svn.apache.org/viewvc?view=rev&rev=537246
Log:
Implemented functionality for using VS2005 profiles to download and install 
dependent assemblies.

Modified:
    
incubator/nmaven/branches/SI_XPT/components/dotnet-artifact/src/main/java/org/apache/maven/dotnet/artifact/impl/ArtifactInstallerImpl.java
    
incubator/nmaven/branches/SI_XPT/components/dotnet-core/src/main/resources/META-INF/nmaven/net-dependencies.xml
    
incubator/nmaven/branches/SI_XPT/plugins/maven-vsinstaller-plugin/src/main/java/org/apache/maven/dotnet/plugin/vsinstaller/VsInstallerMojo.java

Modified: 
incubator/nmaven/branches/SI_XPT/components/dotnet-artifact/src/main/java/org/apache/maven/dotnet/artifact/impl/ArtifactInstallerImpl.java
URL: 
http://svn.apache.org/viewvc/incubator/nmaven/branches/SI_XPT/components/dotnet-artifact/src/main/java/org/apache/maven/dotnet/artifact/impl/ArtifactInstallerImpl.java?view=diff&rev=537246&r1=537245&r2=537246
==============================================================================
--- 
incubator/nmaven/branches/SI_XPT/components/dotnet-artifact/src/main/java/org/apache/maven/dotnet/artifact/impl/ArtifactInstallerImpl.java
 (original)
+++ 
incubator/nmaven/branches/SI_XPT/components/dotnet-artifact/src/main/java/org/apache/maven/dotnet/artifact/impl/ArtifactInstallerImpl.java
 Fri May 11 10:46:14 2007
@@ -167,7 +167,7 @@
         //Do Library Installs for Net Dependencies
         matchPolicies = new ArrayList<NetDependencyMatchPolicy>();
         matchPolicies.add( new ProfileMatchPolicy( profile ) );
-        matchPolicies.add( new ExecutableAndNetPluginMatchPolicy() );
+        matchPolicies.add( new ExecutableAndNetPluginAndAddinMatchPolicy() );
         for ( Dependency dependency : repository.getDependenciesFor( 
matchPolicies ) )
         {
             resolveAndInstallLibraryDependenciesFor( dependency );
@@ -636,13 +636,15 @@
         return new ArtifactMetadataImpl( artifact, tempFile );
     }
 
-    private class ExecutableAndNetPluginMatchPolicy
+    private class ExecutableAndNetPluginAndAddinMatchPolicy
         implements NetDependencyMatchPolicy
     {
         public boolean match( NetDependency netDependency )
-        {
+        {            
             return netDependency.getType().equals( 
ArtifactType.EXE.getPackagingType() ) ||
-                netDependency.getType().equals( 
ArtifactType.NETPLUGIN.getPackagingType() );
+                netDependency.getType().equals( 
ArtifactType.NETPLUGIN.getPackagingType() ) ||
+                netDependency.getType().equals( 
ArtifactType.VISUAL_STUDIO_ADDIN.getPackagingType() ) ||
+                netDependency.getType().equals( 
ArtifactType.SHARP_DEVELOP_ADDIN.getPackagingType() );
         }
     }
 

Modified: 
incubator/nmaven/branches/SI_XPT/components/dotnet-core/src/main/resources/META-INF/nmaven/net-dependencies.xml
URL: 
http://svn.apache.org/viewvc/incubator/nmaven/branches/SI_XPT/components/dotnet-core/src/main/resources/META-INF/nmaven/net-dependencies.xml?view=diff&rev=537246&r1=537245&r2=537246
==============================================================================
--- 
incubator/nmaven/branches/SI_XPT/components/dotnet-core/src/main/resources/META-INF/nmaven/net-dependencies.xml
 (original)
+++ 
incubator/nmaven/branches/SI_XPT/components/dotnet-core/src/main/resources/META-INF/nmaven/net-dependencies.xml
 Fri May 11 10:46:14 2007
@@ -24,22 +24,30 @@
     <version>0.14</version>
     <type>netplugin</type>
   </netDependency>
-  <!--
-   <netDependency>
+  <netDependency>
+    <groupId>NMaven.Plugin</groupId>
+    <artifactId>NMaven.Plugin.Addin</artifactId>
+    <version>0.14</version>
+    <type>netplugin</type>
+  </netDependency>
+
+  <!--IDE-->
+  <netDependency>
     <groupId>NMaven.VisualStudio</groupId>
     <artifactId>NMaven.VisualStudio.Addin</artifactId>
     <version>0.14</version>
-    <type>addin</type>
+    <type>visual-studio-addin</type>
+    <profile>VisualStudio2005</profile>
   </netDependency>
-  -->
-   <netDependency>
-    <groupId>NMaven.Plugin</groupId>
-    <artifactId>NMaven.Plugin.Addin</artifactId>
+  <netDependency>
+    <groupId>NMaven.VisualStudio</groupId>
+    <artifactId>NMaven.VisualStudio</artifactId>
     <version>0.14</version>
-    <type>netplugin</type>
+    <type>library</type>
+    <profile>VisualStudio2005</profile>
   </netDependency>
-  
-   <!--Plugin Framework-->
+
+  <!--Plugin Framework-->
   <netDependency>
     <groupId>NMaven.Plugin</groupId>
     <artifactId>NMaven.Plugin</artifactId>

Modified: 
incubator/nmaven/branches/SI_XPT/plugins/maven-vsinstaller-plugin/src/main/java/org/apache/maven/dotnet/plugin/vsinstaller/VsInstallerMojo.java
URL: 
http://svn.apache.org/viewvc/incubator/nmaven/branches/SI_XPT/plugins/maven-vsinstaller-plugin/src/main/java/org/apache/maven/dotnet/plugin/vsinstaller/VsInstallerMojo.java?view=diff&rev=537246&r1=537245&r2=537246
==============================================================================
--- 
incubator/nmaven/branches/SI_XPT/plugins/maven-vsinstaller-plugin/src/main/java/org/apache/maven/dotnet/plugin/vsinstaller/VsInstallerMojo.java
 (original)
+++ 
incubator/nmaven/branches/SI_XPT/plugins/maven-vsinstaller-plugin/src/main/java/org/apache/maven/dotnet/plugin/vsinstaller/VsInstallerMojo.java
 Fri May 11 10:46:14 2007
@@ -72,6 +72,7 @@
         Map handlers = new HashMap();
         handlers.put( "library", createArtifactHandler( "library", "dll" ) );
         handlers.put( "netplugin", createArtifactHandler( "netplugin", "dll" ) 
);
+        handlers.put( "visual-studio-addin", createArtifactHandler( 
"visual-studio-addin", "dll" ) );
         artifactHandlerManager.addHandlers( handlers );
         ArtifactRepository remoteArtifactRepository = new 
DefaultArtifactRepository( "nmaven",
                                                                                
      "http://localhost:8080/repository";,
@@ -82,7 +83,7 @@
 
         try
         {
-            
artifactContext.getArtifactInstaller().resolveAndInstallNetDependenciesForProfile(
 null,
+            
artifactContext.getArtifactInstaller().resolveAndInstallNetDependenciesForProfile(
 "VisualStudio2005",
                                                                                
                new ArrayList<Dependency>() );
         }
         catch ( ArtifactResolutionException e )


Reply via email to