incubator-nmaven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sisb...@apache.org
Subject svn commit: r542378 - in /incubator/nmaven/trunk: ./ assemblies/NMaven.IDE/src/main/csharp/NMaven/IDE/Controls/ assemblies/NMaven.Model/AutomationExtensibility/ assemblies/NMaven.VisualStudio.Addin/src/main/csharp/NMaven/VisualStudio/Addin/ plugins/mav...
Date Tue, 29 May 2007 02:26:42 GMT
Author: sisbell
Date: Mon May 28 19:26:41 2007
New Revision: 542378

URL: http://svn.apache.org/viewvc?view=rev&rev=542378
Log:
Support for deploying individual artifact files.

Added:
    incubator/nmaven/trunk/plugins/maven-deploy-plugin/src/main/java/org/apache/maven/dotnet/plugins/DeployFileMojo.java
  (with props)
Modified:
    incubator/nmaven/trunk/assemblies/NMaven.IDE/src/main/csharp/NMaven/IDE/Controls/MavenBuildControl.cs
    incubator/nmaven/trunk/assemblies/NMaven.Model/AutomationExtensibility/pom.xml
    incubator/nmaven/trunk/assemblies/NMaven.VisualStudio.Addin/src/main/csharp/NMaven/VisualStudio/Addin/Connect.cs
    incubator/nmaven/trunk/bootstrap-build.bat
    incubator/nmaven/trunk/plugins/maven-embedder-plugin/src/main/java/org/apache/maven/dotnet/plugin/embedder/EmbedderStarterMojo.java

Modified: incubator/nmaven/trunk/assemblies/NMaven.IDE/src/main/csharp/NMaven/IDE/Controls/MavenBuildControl.cs
URL: http://svn.apache.org/viewvc/incubator/nmaven/trunk/assemblies/NMaven.IDE/src/main/csharp/NMaven/IDE/Controls/MavenBuildControl.cs?view=diff&rev=542378&r1=542377&r2=542378
==============================================================================
--- incubator/nmaven/trunk/assemblies/NMaven.IDE/src/main/csharp/NMaven/IDE/Controls/MavenBuildControl.cs
(original)
+++ incubator/nmaven/trunk/assemblies/NMaven.IDE/src/main/csharp/NMaven/IDE/Controls/MavenBuildControl.cs
Mon May 28 19:26:41 2007
@@ -298,6 +298,7 @@
             ProcessStartInfo processStartInfo =
                 new ProcessStartInfo("mvn", @"org.apache.maven.dotnet.plugins:maven-embedder-plugin:start
-Dport=8080 -DwarFile=""" + warFileInfo.FullName + @"""");
             processStartInfo.UseShellExecute = true;
+            processStartInfo.WindowStyle = ProcessWindowStyle.Hidden;
             System.Diagnostics.Process.Start(processStartInfo);
         }
 
@@ -336,9 +337,7 @@
             List<MavenProject> mavenProjects = null;
             try
             {
-                logger.Log(Level.INFO, "CCCC");
                 mavenProjects = ideContext.GetMavenProjectsFrom(fileInfo.Directory);
-                logger.Log(Level.INFO, "DDDD");
             }
             catch (IOException ex)
             {

Modified: incubator/nmaven/trunk/assemblies/NMaven.Model/AutomationExtensibility/pom.xml
URL: http://svn.apache.org/viewvc/incubator/nmaven/trunk/assemblies/NMaven.Model/AutomationExtensibility/pom.xml?view=diff&rev=542378&r1=542377&r2=542378
==============================================================================
--- incubator/nmaven/trunk/assemblies/NMaven.Model/AutomationExtensibility/pom.xml (original)
+++ incubator/nmaven/trunk/assemblies/NMaven.Model/AutomationExtensibility/pom.xml Mon May
28 19:26:41 2007
@@ -27,7 +27,6 @@
   <groupId>NMaven.Model</groupId>
   <artifactId>NMaven.Model.AutomationExtensibility</artifactId>
   <packaging>library</packaging>
-  <version>0.14-SNAPSHOT</version>
   <name>NMaven.Model.AutomationExtensibility</name>
   <!--
   <build>

Modified: incubator/nmaven/trunk/assemblies/NMaven.VisualStudio.Addin/src/main/csharp/NMaven/VisualStudio/Addin/Connect.cs
URL: http://svn.apache.org/viewvc/incubator/nmaven/trunk/assemblies/NMaven.VisualStudio.Addin/src/main/csharp/NMaven/VisualStudio/Addin/Connect.cs?view=diff&rev=542378&r1=542377&r2=542378
==============================================================================
--- incubator/nmaven/trunk/assemblies/NMaven.VisualStudio.Addin/src/main/csharp/NMaven/VisualStudio/Addin/Connect.cs
(original)
+++ incubator/nmaven/trunk/assemblies/NMaven.VisualStudio.Addin/src/main/csharp/NMaven/VisualStudio/Addin/Connect.cs
Mon May 28 19:26:41 2007
@@ -50,6 +50,7 @@
         {
             _applicationObject = (DTE2)application;
             _addInInstance = (AddIn)addInInst;
+            
             if (connectMode == ext_ConnectMode.ext_cm_UISetup)
             {
                 object[] contextGUIDS = new object[] { };
@@ -126,6 +127,7 @@
    			    ProcessStartInfo processStartInfo =
                     new ProcessStartInfo("mvn", @"org.apache.maven.dotnet.plugins:maven-embedder-plugin:start
-Dport=8080 -DwarFile=""" + warFileInfo.FullName + @"""");
 			    processStartInfo.UseShellExecute = true;
+                processStartInfo.WindowStyle = ProcessWindowStyle.Hidden;
                 System.Diagnostics.Process.Start(processStartInfo);
 
                 MavenBuildControl mavenBuildControl = new MavenBuildControl();

Modified: incubator/nmaven/trunk/bootstrap-build.bat
URL: http://svn.apache.org/viewvc/incubator/nmaven/trunk/bootstrap-build.bat?view=diff&rev=542378&r1=542377&r2=542378
==============================================================================
--- incubator/nmaven/trunk/bootstrap-build.bat (original)
+++ incubator/nmaven/trunk/bootstrap-build.bat Mon May 28 19:26:41 2007
@@ -6,7 +6,7 @@
 IF errorlevel 1 GOTO END
 
 ECHO Installing 3rd Party Assemblies in the Local Repo
-call mvn org.apache.maven.dotnet.plugins:maven-install-plugin:install-file -Dfile=./thirdparty/NUnit/NUnit.Framework.dll
-DgroupId=NUnit -DartifactId=NUnit.Framework -Dpackaging=dll -DartifactVersion=2.2.8.0
+call mvn org.apache.maven.dotnet.plugins:maven-install-plugin:install-file -Dfile=./thirdparty/NUnit/NUnit.Framework.dll
-DgroupId=NUnit -DartifactId=NUnit.Framework -Dpackaging=library -DartifactVersion=2.2.8.0
 IF errorlevel 1 GOTO END
 
 if "%1" == "-DMicrosoft" (

Added: incubator/nmaven/trunk/plugins/maven-deploy-plugin/src/main/java/org/apache/maven/dotnet/plugins/DeployFileMojo.java
URL: http://svn.apache.org/viewvc/incubator/nmaven/trunk/plugins/maven-deploy-plugin/src/main/java/org/apache/maven/dotnet/plugins/DeployFileMojo.java?view=auto&rev=542378
==============================================================================
--- incubator/nmaven/trunk/plugins/maven-deploy-plugin/src/main/java/org/apache/maven/dotnet/plugins/DeployFileMojo.java
(added)
+++ incubator/nmaven/trunk/plugins/maven-deploy-plugin/src/main/java/org/apache/maven/dotnet/plugins/DeployFileMojo.java
Mon May 28 19:26:41 2007
@@ -0,0 +1,111 @@
+package org.apache.maven.dotnet.plugins;
+
+import org.apache.maven.plugin.AbstractMojo;
+import org.apache.maven.plugin.MojoExecutionException;
+import org.apache.maven.plugin.MojoFailureException;
+import org.apache.maven.artifact.deployer.ArtifactDeploymentException;
+import org.apache.maven.artifact.deployer.ArtifactDeployer;
+import org.apache.maven.artifact.repository.ArtifactRepository;
+import org.apache.maven.artifact.repository.ArtifactRepositoryFactory;
+import org.apache.maven.artifact.Artifact;
+import org.apache.maven.artifact.metadata.ArtifactMetadata;
+import org.apache.maven.artifact.factory.ArtifactFactory;
+import org.apache.maven.project.artifact.ProjectArtifactMetadata;
+import org.apache.maven.dotnet.artifact.AssemblyRepositoryLayout;
+
+import java.io.File;
+
+/**
+ * @goal deploy-file
+ * @phase deploy
+ * @requiresProject false
+ */
+public class DeployFileMojo
+    extends AbstractMojo
+{
+
+    /**
+     * @parameter expression="${localRepository}"
+     * @required
+     */
+    private ArtifactRepository localRepository;
+
+    /**
+     * @parameter expression = "${file}
+     * @required
+     */
+    private File artifactFile;
+
+    /**
+     * @parameter expression = "${pomFile}
+     */
+    private File pomFile;
+
+    /**
+     * @parameter expression = "${groupId}
+     * @required
+     */
+    private String groupId;
+
+    /**
+     * @parameter expression = "${artifactId}
+     * @required
+     */
+    private String artifactId;
+
+    /**
+     * @parameter expression = "${artifactVersion}
+     * @required
+     */
+    private String version;
+
+    /**
+     * @parameter expression = "${packaging}
+     * @required
+     */
+    private String packaging;
+
+    /**
+     * @component
+     */
+    private ArtifactDeployer artifactDeployer;
+
+    /**
+     * Component used to create a repository
+     *
+     * @component
+     */
+    private ArtifactRepositoryFactory repositoryFactory;
+
+    /**
+     * @component
+     */
+    private ArtifactFactory artifactFactory;
+
+    /**
+     *
+     * @parameter expression="${url}"
+     * @required
+     */
+    private String url;
+
+    public void execute()
+        throws MojoExecutionException, MojoFailureException
+    {
+        Artifact artifact = artifactFactory.createArtifact( groupId, artifactId, version,
packaging, "dll" );
+        ArtifactMetadata metadata = new ProjectArtifactMetadata( artifact, pomFile );
+        artifact.addMetadata( metadata );
+
+        ArtifactRepository deploymentRepository =
+            repositoryFactory.createDeploymentArtifactRepository( null, url, new AssemblyRepositoryLayout(),
true );
+
+        try
+        {
+            artifactDeployer.deploy( artifactFile, artifact, deploymentRepository, localRepository
);
+        }
+        catch ( ArtifactDeploymentException e )
+        {
+            throw new MojoExecutionException( "NMAVEN-DEPLOY: Deploy Failed", e );
+        }
+    }
+}

Propchange: incubator/nmaven/trunk/plugins/maven-deploy-plugin/src/main/java/org/apache/maven/dotnet/plugins/DeployFileMojo.java
------------------------------------------------------------------------------
    svn:eol-style = native

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?view=diff&rev=542378&r1=542377&r2=542378
==============================================================================
--- 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
Mon May 28 19:26:41 2007
@@ -114,6 +114,11 @@
     private String frameworkVersion;
 
     /**
+     * @parameter expression = "${pom.version}"
+     */
+    private String pomVersion;
+
+    /**
      * File logger: needed for creating logs when the IDE starts because the console output
and thrown exceptions are
      * not available
      */
@@ -201,8 +206,6 @@
         List<String> commands = new ArrayList<String>();
         commands.add( "-Dport=" + String.valueOf( port ) );
         commands.add( "-DwarFile=" + warFile.getAbsolutePath() );
-        //    commands.add( "-DwarFile=\"" + new File( localRepository,
-        //                                           "org\\apache\\maven\\dotnet\\dotnet-service-embedder\\0.14-SNAPSHOT\\dotnet-service-embedder-0.14-SNAPSHOT.war"
).getAbsolutePath() + "\"");
         commands.add( "-classpath" );
         commands.add( artifactsToClassPath( result.getArtifacts() ) );
         commands.add( "org.apache.maven.dotnet.jetty.JettyStarter" );
@@ -277,9 +280,9 @@
         {
             sb.append( "\"" ).append( artifact.getFile().getAbsolutePath() ).append( "\""
).append( ";" );
         }
-        //TODO: Cleanup
-        File starterFile = new File( localRepository,
-                                     "org\\apache\\maven\\dotnet\\dotnet-jetty\\0.14-SNAPSHOT\\dotnet-jetty-0.14-SNAPSHOT.jar"
);
+
+        File starterFile = new File( localRepository, "org\\apache\\maven\\dotnet\\dotnet-jetty\\"
+ pomVersion +
+            "\\dotnet-jetty-" + pomVersion + ".jar" );
         sb.append( "\"" ).append( starterFile.getAbsolutePath() ).append( "\"" );
         return sb.toString();
     }



Mime
View raw message