incubator-nmaven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sisb...@apache.org
Subject svn commit: r528763 - in /incubator/nmaven/branches/SI_XPT/components: dotnet-embedder/src/main/java/org/apache/maven/dotnet/embedder/impl/MavenEmbedderServiceImpl.java dotnet-service/embedder/src/main/webapp/WEB-INF/plexus.xml
Date Sat, 14 Apr 2007 04:58:53 GMT
Author: sisbell
Date: Fri Apr 13 21:58:52 2007
New Revision: 528763

URL: http://svn.apache.org/viewvc?view=rev&rev=528763
Log:
Made the execute method asynch. Needed this since it was blocking the log messages from immediately
writing to the output window.

Modified:
    incubator/nmaven/branches/SI_XPT/components/dotnet-embedder/src/main/java/org/apache/maven/dotnet/embedder/impl/MavenEmbedderServiceImpl.java
    incubator/nmaven/branches/SI_XPT/components/dotnet-service/embedder/src/main/webapp/WEB-INF/plexus.xml

Modified: incubator/nmaven/branches/SI_XPT/components/dotnet-embedder/src/main/java/org/apache/maven/dotnet/embedder/impl/MavenEmbedderServiceImpl.java
URL: http://svn.apache.org/viewvc/incubator/nmaven/branches/SI_XPT/components/dotnet-embedder/src/main/java/org/apache/maven/dotnet/embedder/impl/MavenEmbedderServiceImpl.java?view=diff&rev=528763&r1=528762&r2=528763
==============================================================================
--- incubator/nmaven/branches/SI_XPT/components/dotnet-embedder/src/main/java/org/apache/maven/dotnet/embedder/impl/MavenEmbedderServiceImpl.java
(original)
+++ incubator/nmaven/branches/SI_XPT/components/dotnet-embedder/src/main/java/org/apache/maven/dotnet/embedder/impl/MavenEmbedderServiceImpl.java
Fri Apr 13 21:58:52 2007
@@ -1,5 +1,12 @@
 package org.apache.maven.dotnet.embedder.impl;
 
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Set;
+import java.util.HashSet;
+import java.io.File;
+import java.io.IOException;
+
 import org.apache.maven.dotnet.embedder.MavenEmbedderService;
 import org.apache.maven.dotnet.embedder.MavenExecutionRequest;
 import org.apache.maven.dotnet.embedder.MavenProject;
@@ -11,6 +18,7 @@
 import org.apache.maven.embedder.DefaultConfiguration;
 import org.apache.maven.execution.DefaultMavenExecutionRequest;
 import org.apache.maven.model.Model;
+
 import org.codehaus.plexus.personality.plexus.lifecycle.phase.Initializable;
 import org.codehaus.plexus.personality.plexus.lifecycle.phase.Disposable;
 import org.codehaus.plexus.logging.AbstractLogEnabled;
@@ -18,14 +26,6 @@
 import org.codehaus.plexus.util.xml.pull.XmlPullParserException;
 import org.codehaus.plexus.util.DirectoryScanner;
 
-
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Set;
-import java.util.HashSet;
-import java.io.File;
-import java.io.IOException;
-
 public final class MavenEmbedderServiceImpl
     extends AbstractLogEnabled
     implements MavenEmbedderService, Initializable, Disposable
@@ -37,25 +37,32 @@
     {
     }
 
-    public void execute( MavenExecutionRequest request )
+    public void execute( final MavenExecutionRequest request )
     {
-        if ( request.getLoggerPort() <= 0 )
+        new Thread( new Runnable()
         {
-            resetSocket( 9099 );
-        }
-        else
-        {
-            resetSocket( request.getLoggerPort() );
-        }
-
-        List<String> goals = new ArrayList<String>();
-        goals.add( request.getGoal() );
-        org.apache.maven.execution.MavenExecutionRequest executionRequest = new DefaultMavenExecutionRequest();
-        executionRequest.setPomFile( request.getPomFile() );
-        executionRequest.setGoals( goals );
-        executionRequest.setRecursive( true );
-        executionRequest.setSettings( embedder.getSettings() );
-        embedder.execute( executionRequest );
+            public void run()
+            {
+                System.out.println( "PORT = " + request.getLoggerPort() );
+                if ( request.getLoggerPort() <= 0 )
+                {
+                    resetSocket( 9099 );
+                }
+                else
+                {
+                    resetSocket( request.getLoggerPort() );
+                }
+
+                List<String> goals = new ArrayList<String>();
+                goals.add( request.getGoal() );
+                org.apache.maven.execution.MavenExecutionRequest executionRequest = new DefaultMavenExecutionRequest();
+                executionRequest.setPomFile( request.getPomFile() );
+                executionRequest.setGoals( goals );
+                executionRequest.setRecursive( true );
+                executionRequest.setSettings( embedder.getSettings() );
+                embedder.execute( executionRequest );
+            }
+        } ).start();
     }
 
     public Set<org.apache.maven.dotnet.embedder.MavenProject> getMavenProjectsFor(
String basedir )
@@ -96,7 +103,7 @@
         File userSettingsPath = new File( userLoc, "settings.xml" );
         configuration.setUserSettingsFile( userSettingsPath );
         configuration.setMavenEmbedderLogger( null );
-        
+
         try
         {
             embedder = new MavenEmbedder( configuration );

Modified: incubator/nmaven/branches/SI_XPT/components/dotnet-service/embedder/src/main/webapp/WEB-INF/plexus.xml
URL: http://svn.apache.org/viewvc/incubator/nmaven/branches/SI_XPT/components/dotnet-service/embedder/src/main/webapp/WEB-INF/plexus.xml?view=diff&rev=528763&r1=528762&r2=528763
==============================================================================
--- incubator/nmaven/branches/SI_XPT/components/dotnet-service/embedder/src/main/webapp/WEB-INF/plexus.xml
(original)
+++ incubator/nmaven/branches/SI_XPT/components/dotnet-service/embedder/src/main/webapp/WEB-INF/plexus.xml
Fri Apr 13 21:58:52 2007
@@ -5,14 +5,4 @@
       <role>org.codehaus.xfire.plexus.config.ConfigurationService</role>
     </component>
   </load-on-start>
-  <components>
-    <component>
-      <role>org.codehaus.plexus.logging.LoggerManager</role>
-      <implementation>org.apache.maven.dotnet.embedder.logger.SocketLoggerManager</implementation>
-      <lifecycle-handler>basic</lifecycle-handler>
-      <configuration>
-        <threshold>info</threshold>
-      </configuration>
-    </component>
-  </components>
 </plexus>



Mime
View raw message