You are viewing a plain text version of this content. The canonical link for it is here.
Posted to nmaven-commits@incubator.apache.org by si...@apache.org on 2007/06/06 18:02:43 UTC

svn commit: r544903 - in /incubator/nmaven/trunk/plugins/maven-vsinstaller-plugin: ./ src/main/java/org/apache/maven/dotnet/plugin/vsinstaller/ src/site/apt/ src/site/apt/examples/

Author: sisbell
Date: Wed Jun  6 11:02:42 2007
New Revision: 544903

URL: http://svn.apache.org/viewvc?view=rev&rev=544903
Log:
Don't need to specify the remoteRepository variable when invoking the vsinstaller plugin. It now takes the information from the user's settings.xml file. This implementation takes all profiles (not just the active one), so that will need to be fixed (in future) to only use the active profile.

Modified:
    incubator/nmaven/trunk/plugins/maven-vsinstaller-plugin/pom.xml
    incubator/nmaven/trunk/plugins/maven-vsinstaller-plugin/src/main/java/org/apache/maven/dotnet/plugin/vsinstaller/VsInstallerMojo.java
    incubator/nmaven/trunk/plugins/maven-vsinstaller-plugin/src/site/apt/examples/install-from-file-system.apt
    incubator/nmaven/trunk/plugins/maven-vsinstaller-plugin/src/site/apt/examples/install-from-remote-repo.apt
    incubator/nmaven/trunk/plugins/maven-vsinstaller-plugin/src/site/apt/index.apt
    incubator/nmaven/trunk/plugins/maven-vsinstaller-plugin/src/site/apt/usage.apt

Modified: incubator/nmaven/trunk/plugins/maven-vsinstaller-plugin/pom.xml
URL: http://svn.apache.org/viewvc/incubator/nmaven/trunk/plugins/maven-vsinstaller-plugin/pom.xml?view=diff&rev=544903&r1=544902&r2=544903
==============================================================================
--- incubator/nmaven/trunk/plugins/maven-vsinstaller-plugin/pom.xml (original)
+++ incubator/nmaven/trunk/plugins/maven-vsinstaller-plugin/pom.xml Wed Jun  6 11:02:42 2007
@@ -26,6 +26,7 @@
   <modelVersion>4.0.0</modelVersion>
   <groupId>org.apache.maven.dotnet.plugins</groupId>
   <artifactId>maven-vsinstaller-plugin</artifactId>
+  <version>0.14-SNAPSHOT</version>
   <packaging>maven-plugin</packaging>
   <name>maven-vsinstaller-plugin</name>
   <description>

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?view=diff&rev=544903&r1=544902&r2=544903
==============================================================================
--- 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 Jun  6 11:02:42 2007
@@ -22,6 +22,9 @@
 import org.apache.maven.dotnet.vendor.Vendor;
 import org.apache.maven.dotnet.model.netdependency.NetDependency;
 import org.apache.maven.project.MavenProject;
+import org.apache.maven.settings.Settings;
+import org.apache.maven.settings.Profile;
+import org.apache.maven.settings.Repository;
 import org.codehaus.plexus.util.IOUtil;
 
 import java.io.File;
@@ -91,6 +94,11 @@
      */
     private org.apache.maven.dotnet.executable.NetExecutableFactory netExecutableFactory;
 
+    /**
+     * @parameter expression="${settings}"
+     */
+    private Settings settings;
+
     public void execute()
         throws MojoExecutionException, MojoFailureException
     {
@@ -106,13 +114,26 @@
                 "NMAVEN-1600-000: Failed to create the repository registry for this plugin", e );
         }
         List<ArtifactRepository> remoteRepositories = new ArrayList<ArtifactRepository>();
-        if ( remoteRepository != null )
+        //TODO: Only use active profiles
+        List<Profile> profiles = settings.getProfiles();
+        List<Repository> repositories = new ArrayList<Repository>();
+        for ( Profile profile : profiles )
         {
-            ArtifactRepository remoteArtifactRepository =
-                new DefaultArtifactRepository( "nmaven", remoteRepository, new DefaultRepositoryLayout() );
-            remoteRepositories.add( remoteArtifactRepository );
+            if ( profile.getRepositories() != null )
+            {
+                repositories.addAll( profile.getRepositories() );
+            }
+            if ( profile.getPluginRepositories() != null )
+            {
+                repositories.addAll( profile.getPluginRepositories() );
+            }
         }
 
+        for ( Repository repository : repositories )
+        {
+            remoteRepositories.add( new DefaultArtifactRepository( repository.getId(), repository.getUrl(),
+                                                                   new DefaultRepositoryLayout() ) );
+        }
         artifactContext.init( project, remoteRepositories, new File( localRepository ) );
 
         try

Modified: incubator/nmaven/trunk/plugins/maven-vsinstaller-plugin/src/site/apt/examples/install-from-file-system.apt
URL: http://svn.apache.org/viewvc/incubator/nmaven/trunk/plugins/maven-vsinstaller-plugin/src/site/apt/examples/install-from-file-system.apt?view=diff&rev=544903&r1=544902&r2=544903
==============================================================================
--- incubator/nmaven/trunk/plugins/maven-vsinstaller-plugin/src/site/apt/examples/install-from-file-system.apt (original)
+++ incubator/nmaven/trunk/plugins/maven-vsinstaller-plugin/src/site/apt/examples/install-from-file-system.apt Wed Jun  6 11:02:42 2007
@@ -8,12 +8,12 @@
 <settings>
   <profiles>
     <profile>
-      <id>nmaven</id>
+      <id>nmaven.snapshots</id>
       <repositories>
         <repository>
           <id>local</id>
           <name>Maven Plugin Snapshots</name>
-          <url>http://C:\m2\repo</url>
+          <url>file://C:\m2\repo</url>
           <releases>
             <enabled>true</enabled>
           </releases>
@@ -26,7 +26,7 @@
         <pluginRepository>
           <id>local-plugin</id>
           <name>Maven Plugin Snapshots</name>
-          <url>http://C:\m2\repo</url>
+          <url>file://C:\m2\repo</url>
           <releases>
             <enabled>true</enabled>
           </releases>
@@ -44,6 +44,6 @@
 
 +----+
  mvn org.apache.maven.dotnet.plugins:maven-vsinstaller-plugin:install     \
-     -DremoteRepository=http://C:\m2\repo -Pnmaven
+     -DremoteRepository=http://C:\m2\repo -Pnmaven.snapshots
 +----+
 

Modified: incubator/nmaven/trunk/plugins/maven-vsinstaller-plugin/src/site/apt/examples/install-from-remote-repo.apt
URL: http://svn.apache.org/viewvc/incubator/nmaven/trunk/plugins/maven-vsinstaller-plugin/src/site/apt/examples/install-from-remote-repo.apt?view=diff&rev=544903&r1=544902&r2=544903
==============================================================================
--- incubator/nmaven/trunk/plugins/maven-vsinstaller-plugin/src/site/apt/examples/install-from-remote-repo.apt (original)
+++ incubator/nmaven/trunk/plugins/maven-vsinstaller-plugin/src/site/apt/examples/install-from-remote-repo.apt Wed Jun  6 11:02:42 2007
@@ -1,18 +1,18 @@
 Install From Remote Repo
 
- NMaven currently does not exist on a public repo. Assuming that you have set up one yourself, do the following.
- First, configure your settings.xml file to point to your repo.
+ First, configure your settings.xml file to point to your repo. You may choose to enter the public snapshot repo
+ below or to enter your own repo that hosts the NMaven VS installer.
 
 +----+
 <settings>
   <profiles>
     <profile>
-      <id>nmaven</id>
+      <id>nmaven.snapshots</id>
       <repositories>
         <repository>
           <id>local</id>
           <name>Maven Plugin Snapshots</name>
-          <url>http://mycompany.org/repo/m2-snapshot-repository</url>
+          <url>http://people.apache.org/repo/m2-snapshot-repository</url>
           <releases>
             <enabled>true</enabled>
           </releases>
@@ -25,7 +25,7 @@
         <pluginRepository>
           <id>local-plugin</id>
           <name>Maven Plugin Snapshots</name>
-          <url>http://mycompany.org/repo/m2-snapshot-repository</url>
+          <url>http://people.apache.org/repo/m2-snapshot-repository</url>
           <releases>
             <enabled>true</enabled>
           </releases>
@@ -43,5 +43,5 @@
 
 +----+
  mvn org.apache.maven.dotnet.plugins:maven-vsinstaller-plugin:install     \
-     -DremoteRepository=http://mycompany.org/repo/m2-snapshot-repository -Pnmaven
+     -DremoteRepository=http://mycompany.org/repo/m2-snapshot-repository -Pnmaven.snapshots
 +----+

Modified: incubator/nmaven/trunk/plugins/maven-vsinstaller-plugin/src/site/apt/index.apt
URL: http://svn.apache.org/viewvc/incubator/nmaven/trunk/plugins/maven-vsinstaller-plugin/src/site/apt/index.apt?view=diff&rev=544903&r1=544902&r2=544903
==============================================================================
--- incubator/nmaven/trunk/plugins/maven-vsinstaller-plugin/src/site/apt/index.apt (original)
+++ incubator/nmaven/trunk/plugins/maven-vsinstaller-plugin/src/site/apt/index.apt Wed Jun  6 11:02:42 2007
@@ -1,4 +1,6 @@
 Maven Visual Studio 2005 Installer Plugin
 
  The VS2005 Installer plugin installs the dependent Java archives and .NET assemblies needed to run NMaven and creates
-   a Visual Studio Addin file that Visual Studio will use to load the addin.
\ No newline at end of file
+   a Visual Studio Addin file that Visual Studio will use to load the addin.
+
+   
\ No newline at end of file

Modified: incubator/nmaven/trunk/plugins/maven-vsinstaller-plugin/src/site/apt/usage.apt
URL: http://svn.apache.org/viewvc/incubator/nmaven/trunk/plugins/maven-vsinstaller-plugin/src/site/apt/usage.apt?view=diff&rev=544903&r1=544902&r2=544903
==============================================================================
--- incubator/nmaven/trunk/plugins/maven-vsinstaller-plugin/src/site/apt/usage.apt (original)
+++ incubator/nmaven/trunk/plugins/maven-vsinstaller-plugin/src/site/apt/usage.apt Wed Jun  6 11:02:42 2007
@@ -1,5 +1,26 @@
 Usage
 
+* Prerequisites
+
+ Prior to using the Visual Studio installer plugin, make sure that you have the following installed on your system:
+
+  [[1]] {{{ http://java.sun.com/javase/downloads/index_jdk5.jsp} JDK 5.0 Update x}}
+
+  [[2]] Both {{{http://msdn2.microsoft.com/en-us/downloads/default.aspx} Microsoft .NET Framework}} (2.0+)
+     AND {{{http://msdn2.microsoft.com/en-us/downloads/default.aspx} NET Framework 2.0 SDK}}. Note that the 2.0+ framework
+     is required to run NMaven, but you can still target 1.1 for your builds provided that the 1.1 version
+     is also installed.
+
+  [[3]] {{{http://nunit.org/index.php?p=download} NUnit 2.2+}}.
+
+  [[4]] {{{http://maven.apache.org/download.html} Maven 2.0.4 or higher}}
+
+  [[2]]   Visual Studio 2005 Standard or higher is needed to use the NMaven Addin
+    (Visual Studio Express Edition will not work)  
+
+
+* Installing
+
  If you have built NMaven locally on your machine, you can just type:
 
 +----+
@@ -19,4 +40,4 @@
 
  * https
 
- * file
\ No newline at end of file
+ * file