incubator-nmaven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sisb...@apache.org
Subject svn commit: r528027 - in /incubator/nmaven/branches/SI_XPT/components/dotnet-embedder/src: main/java/org/apache/maven/dotnet/embedder/ main/java/org/apache/maven/dotnet/embedder/impl/ main/java/org/apache/maven/dotnet/embedder/logger/ test/java/
Date Thu, 12 Apr 2007 16:54:48 GMT
Author: sisbell
Date: Thu Apr 12 09:54:47 2007
New Revision: 528027

URL: http://svn.apache.org/viewvc?view=rev&rev=528027
Log:
The embedder logger now opens the logger socket only upon exeuction of the mavenExecutionRequest.
This solves a couple of problems: 1) It can now handle multiple instances of the IDEs running;
2) it solves the problem of the IDE needing the embedder running and the embedder needing
the IDE running.

Modified:
    incubator/nmaven/branches/SI_XPT/components/dotnet-embedder/src/main/java/org/apache/maven/dotnet/embedder/MavenExecutionRequest.java
    incubator/nmaven/branches/SI_XPT/components/dotnet-embedder/src/main/java/org/apache/maven/dotnet/embedder/MavenProject.java
    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-embedder/src/main/java/org/apache/maven/dotnet/embedder/impl/MavenExecutionRequestImpl.java
    incubator/nmaven/branches/SI_XPT/components/dotnet-embedder/src/main/java/org/apache/maven/dotnet/embedder/impl/MavenProjectImpl.java
    incubator/nmaven/branches/SI_XPT/components/dotnet-embedder/src/main/java/org/apache/maven/dotnet/embedder/logger/SocketLogger.java
    incubator/nmaven/branches/SI_XPT/components/dotnet-embedder/src/main/java/org/apache/maven/dotnet/embedder/logger/SocketLoggerManager.java
    incubator/nmaven/branches/SI_XPT/components/dotnet-embedder/src/test/java/ServiceTest.java

Modified: incubator/nmaven/branches/SI_XPT/components/dotnet-embedder/src/main/java/org/apache/maven/dotnet/embedder/MavenExecutionRequest.java
URL: http://svn.apache.org/viewvc/incubator/nmaven/branches/SI_XPT/components/dotnet-embedder/src/main/java/org/apache/maven/dotnet/embedder/MavenExecutionRequest.java?view=diff&rev=528027&r1=528026&r2=528027
==============================================================================
--- incubator/nmaven/branches/SI_XPT/components/dotnet-embedder/src/main/java/org/apache/maven/dotnet/embedder/MavenExecutionRequest.java
(original)
+++ incubator/nmaven/branches/SI_XPT/components/dotnet-embedder/src/main/java/org/apache/maven/dotnet/embedder/MavenExecutionRequest.java
Thu Apr 12 09:54:47 2007
@@ -21,4 +21,9 @@
     
     void setGoal(String goal);
 
+     @XmlElement(name="loggerPort", namespace="urn:maven-embedder")
+    int getLoggerPort();
+
+    void setLoggerPort(int port);
+
 }

Modified: incubator/nmaven/branches/SI_XPT/components/dotnet-embedder/src/main/java/org/apache/maven/dotnet/embedder/MavenProject.java
URL: http://svn.apache.org/viewvc/incubator/nmaven/branches/SI_XPT/components/dotnet-embedder/src/main/java/org/apache/maven/dotnet/embedder/MavenProject.java?view=diff&rev=528027&r1=528026&r2=528027
==============================================================================
--- incubator/nmaven/branches/SI_XPT/components/dotnet-embedder/src/main/java/org/apache/maven/dotnet/embedder/MavenProject.java
(original)
+++ incubator/nmaven/branches/SI_XPT/components/dotnet-embedder/src/main/java/org/apache/maven/dotnet/embedder/MavenProject.java
Thu Apr 12 09:54:47 2007
@@ -1,10 +1,7 @@
 package org.apache.maven.dotnet.embedder;
 
-import org.codehaus.xfire.aegis.type.java5.*;
-import org.apache.maven.model.Model;
-
-import java.util.List;
 import java.util.Set;
+import org.codehaus.xfire.aegis.type.java5.*;
 
 @XmlType(namespace="urn:maven-embedder")
 public interface MavenProject extends Comparable
@@ -29,4 +26,7 @@
 
     @XmlElement(name="mavenProjects", namespace="urn:maven-embedder")
     Set<MavenProject> getMavenProjects();
+
+    @XmlElement(name="isOrphaned", namespace="urn:maven-embedder")
+    boolean isOrphaned();
 }

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=528027&r1=528026&r2=528027
==============================================================================
--- 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
Thu Apr 12 09:54:47 2007
@@ -4,27 +4,23 @@
 import org.apache.maven.dotnet.embedder.MavenExecutionRequest;
 import org.apache.maven.dotnet.embedder.MavenProject;
 import org.apache.maven.dotnet.embedder.logger.SocketLoggerManager;
+import org.apache.maven.dotnet.embedder.logger.SocketLogger;
 import org.apache.maven.embedder.MavenEmbedder;
 import org.apache.maven.embedder.MavenEmbedderException;
 import org.apache.maven.embedder.Configuration;
 import org.apache.maven.embedder.DefaultConfiguration;
-import org.apache.maven.embedder.ContainerCustomizer;
-import org.apache.maven.settings.Settings;
 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;
-
 import org.codehaus.plexus.classworlds.ClassWorld;
-import org.codehaus.plexus.PlexusContainer;
 import org.codehaus.plexus.util.xml.pull.XmlPullParserException;
 import org.codehaus.plexus.util.DirectoryScanner;
-import org.codehaus.plexus.component.repository.ComponentDescriptor;
+
 
 import java.util.List;
 import java.util.ArrayList;
-import java.util.Properties;
 import java.util.Set;
 import java.util.HashSet;
 import java.io.File;
@@ -43,55 +39,39 @@
 
     public void execute( MavenExecutionRequest request )
     {
-
-        System.out.println( "POM FILE = " + request.getPomFile() );
-        System.out.println( "GOAL = " + request.getGoal() );
+        if ( request.getLoggerPort() <= 0 )
+        {
+            resetSocket( 9099 );
+        }
+        else
+        {
+            resetSocket( request.getLoggerPort() );
+        }
 
         List<String> goals = new ArrayList<String>();
         goals.add( request.getGoal() );
-       // File executionRootDirectory = new File( new File( request.getPomFile() ).getParent()
);
-        Properties props = new Properties();
-        props.putAll( System.getProperties() );
-        props.put( "settings.localRepository", new File(
-            System.getProperty( "user.home" ) + File.separator + ".m2/repository" ).getAbsolutePath()
);
         org.apache.maven.execution.MavenExecutionRequest executionRequest = new DefaultMavenExecutionRequest();
-        executionRequest.setPomFile(request.getPomFile() );
+        executionRequest.setPomFile( request.getPomFile() );
         executionRequest.setGoals( goals );
         executionRequest.setRecursive( true );
-        //executionRequest.setBaseDirectory( executionRootDirectory );
-
-        Settings settings = embedder.getSettings();
-        if ( settings != null )
-        {
-            System.out.println( "SETTINGS = " + settings.isOffline() );
-        }
-        executionRequest.setSettings( settings );
+        executionRequest.setSettings( embedder.getSettings() );
         embedder.execute( executionRequest );
     }
 
-
-    private Set<MavenProject> getFlatSetFor( Set<MavenProject> mavenProjects
)
-    {
-        Set<MavenProject> flatSet = new HashSet<MavenProject>();
-        flatSet.addAll( mavenProjects );
-        for ( MavenProject mavenProject : mavenProjects )
-        {
-            flatSet.addAll( getFlatSetFor( mavenProject.getMavenProjects() ) );
-        }
-        return flatSet;
-    }
-
     public Set<org.apache.maven.dotnet.embedder.MavenProject> getMavenProjectsFor(
String basedir )
     {
-        Set<MavenProject> allMavenProjects = getMavenProjectsWithoutSubprojects( basedir
);
+        Set<MavenProject> allMavenProjects = getMavenProjectsFrom( basedir, "**/*pom*.xml"
);
         Set<MavenProject> mavenProjects = new HashSet<MavenProject>();
-        for ( MavenProject mavenProject : getMavenProjectsFrom( basedir ) )
+        for ( MavenProject mavenProject : getMavenProjectsFrom( basedir, "*pom*.xml" ) )
         {
-            System.out.println( "ADDING: " + mavenProject.getArtifactId() + ":" + mavenProject.getPomPath());
             mavenProjects.addAll( attachMavenProjectsFor( new File( mavenProject.getPomPath()
), allMavenProjects ) );
         }
         Set<MavenProject> orphanedMavenProjects = new HashSet<MavenProject>(
allMavenProjects );
         orphanedMavenProjects.removeAll( getFlatSetFor( mavenProjects ) );
+        for ( MavenProject mavenProject : orphanedMavenProjects )
+        {
+            ( (MavenProjectImpl) mavenProject ).setIsOrphaned( true );
+        }
         mavenProjects.addAll( orphanedMavenProjects );
         return mavenProjects;
     }
@@ -99,7 +79,6 @@
     public void initialize()
     {
         ClassWorld classWorld = new ClassWorld();
-
         try
         {
             classWorld.newRealm( "plexus.core", Thread.currentThread().getContextClassLoader()
);
@@ -117,21 +96,7 @@
         File userSettingsPath = new File( userLoc, "settings.xml" );
         configuration.setUserSettingsFile( userSettingsPath );
         configuration.setMavenEmbedderLogger( null );
-
-        configuration.setConfigurationCustomizer( new ContainerCustomizer()
-        {
-            public void customize( PlexusContainer plexusContainer )
-            {
-                SocketLoggerManager loggerManager = new SocketLoggerManager();
-                loggerManager.initialize();
-                plexusContainer.setLoggerManager( loggerManager );
-
-                ComponentDescriptor componentDescriptor =
-                    plexusContainer.getComponentDescriptor( org.codehaus.plexus.logging.LoggerManager.ROLE
);
-                componentDescriptor.setImplementation( "org.apache.maven.dotnet.embedder.logger.SocketLoggerManager"
);
-            }
-        } );
-
+        
         try
         {
             embedder = new MavenEmbedder( configuration );
@@ -154,54 +119,37 @@
         }
     }
 
-    private Set<MavenProject> getMavenProjectsFrom( String rootDirectory )
+    private void resetSocket( int port )
     {
-        DirectoryScanner scanner = new DirectoryScanner();
-        scanner.setBasedir( rootDirectory );
-        String[] includes = new String[1];
-        includes[0] = "*pom*.xml";
-        scanner.setIncludes( includes );
-        scanner.scan();
-
-        Set<MavenProject> mavenProjects = new HashSet<MavenProject>();
-        for ( String pomFile : scanner.getIncludedFiles() )
+        SocketLoggerManager socketLoggerManager =
+            (SocketLoggerManager) embedder.getPlexusContainer().getLoggerManager();
+        SocketLogger socketLogger = (SocketLogger) socketLoggerManager.createLogger( "90"
);
+        try
         {
+            socketLogger.setHandlerFor( port );
+        }
+        catch ( IOException e )
+        {
+            e.printStackTrace();
+        }
+    }
 
-            MavenProjectImpl mavenProject = new MavenProjectImpl();
-            Model model = null;
-            try
-            {
-                model = embedder.readModel( new File( rootDirectory, pomFile ) );
-            }
-            catch ( XmlPullParserException e )
-            {
-                e.printStackTrace();
-            }
-            catch ( IOException e )
-            {
-                e.printStackTrace();
-            }
-            if ( model != null )
-            {
-                mavenProject.setArtifactId( model.getArtifactId() );
-                mavenProject.setGroupId( model.getGroupId() );
-                mavenProject.setVersion( model.getVersion() );
-                mavenProject.setPomPath( new File( rootDirectory, pomFile ).getAbsolutePath()
);
-                mavenProject.setModel( model );
-                mavenProjects.add( mavenProject );
-            }
+    private Set<MavenProject> getFlatSetFor( Set<MavenProject> mavenProjects
)
+    {
+        Set<MavenProject> flatSet = new HashSet<MavenProject>();
+        flatSet.addAll( mavenProjects );
+        for ( MavenProject mavenProject : mavenProjects )
+        {
+            flatSet.addAll( getFlatSetFor( mavenProject.getMavenProjects() ) );
         }
-        //Collections.sort( mavenProjects );
-        return mavenProjects;
+        return flatSet;
     }
 
-    private Set<MavenProject> getMavenProjectsWithoutSubprojects( String rootDirectory
)
+    private Set<MavenProject> getMavenProjectsFrom( String rootDirectory, String pattern
)
     {
         DirectoryScanner scanner = new DirectoryScanner();
         scanner.setBasedir( rootDirectory );
-        String[] includes = new String[1];
-        includes[0] = "**/*pom*.xml";
-        scanner.setIncludes( includes );
+        scanner.setIncludes( new String[]{pattern} );
         scanner.scan();
 
         Set<MavenProject> mavenProjects = new HashSet<MavenProject>();
@@ -231,7 +179,6 @@
                 mavenProjects.add( mavenProject );
             }
         }
-        //Collections.sort( mavenProjects );
         return mavenProjects;
     }
 
@@ -259,7 +206,7 @@
             File moduleFile = new File( pomFile.getParent() + "/" + module + "/pom.xml" );
             MavenProject childProject = getMavenProjectForPomFile( moduleFile, allMavenProjects
);
             childProjects.add( childProject );
-            attachMavenProjectsFor( moduleFile, allMavenProjects);
+            attachMavenProjectsFor( moduleFile, allMavenProjects );
         }
         mavenProject.setMavenProjects( childProjects );
         return attachedMavenProjects;
@@ -275,7 +222,6 @@
         for ( MavenProject mavenProject : mavenProjects )
         {
             System.out.println( dashes.toString() + mavenProject.getArtifactId() );
-
             printProjects( mavenProject.getMavenProjects(), indent + 1 );
         }
     }

Modified: incubator/nmaven/branches/SI_XPT/components/dotnet-embedder/src/main/java/org/apache/maven/dotnet/embedder/impl/MavenExecutionRequestImpl.java
URL: http://svn.apache.org/viewvc/incubator/nmaven/branches/SI_XPT/components/dotnet-embedder/src/main/java/org/apache/maven/dotnet/embedder/impl/MavenExecutionRequestImpl.java?view=diff&rev=528027&r1=528026&r2=528027
==============================================================================
--- incubator/nmaven/branches/SI_XPT/components/dotnet-embedder/src/main/java/org/apache/maven/dotnet/embedder/impl/MavenExecutionRequestImpl.java
(original)
+++ incubator/nmaven/branches/SI_XPT/components/dotnet-embedder/src/main/java/org/apache/maven/dotnet/embedder/impl/MavenExecutionRequestImpl.java
Thu Apr 12 09:54:47 2007
@@ -2,13 +2,16 @@
 
 import org.apache.maven.dotnet.embedder.MavenExecutionRequest;
 
-public class MavenExecutionRequestImpl implements MavenExecutionRequest
-    
+public class MavenExecutionRequestImpl
+    implements MavenExecutionRequest
+
 {
     private String pomFile;
 
     private String goal;
 
+    private int loggerPort;
+
     public String getPomFile()
     {
         return pomFile;
@@ -27,6 +30,16 @@
     public void setGoal( String goal )
     {
         this.goal = goal;
+    }
+
+    public int getLoggerPort()
+    {
+        return loggerPort;
+    }
+
+    public void setLoggerPort( int port )
+    {
+        this.loggerPort = port;
     }
 
 

Modified: incubator/nmaven/branches/SI_XPT/components/dotnet-embedder/src/main/java/org/apache/maven/dotnet/embedder/impl/MavenProjectImpl.java
URL: http://svn.apache.org/viewvc/incubator/nmaven/branches/SI_XPT/components/dotnet-embedder/src/main/java/org/apache/maven/dotnet/embedder/impl/MavenProjectImpl.java?view=diff&rev=528027&r1=528026&r2=528027
==============================================================================
--- incubator/nmaven/branches/SI_XPT/components/dotnet-embedder/src/main/java/org/apache/maven/dotnet/embedder/impl/MavenProjectImpl.java
(original)
+++ incubator/nmaven/branches/SI_XPT/components/dotnet-embedder/src/main/java/org/apache/maven/dotnet/embedder/impl/MavenProjectImpl.java
Thu Apr 12 09:54:47 2007
@@ -21,6 +21,8 @@
 
     private Model model;
 
+    private boolean isOrphaned = false;
+
     public Set<MavenProject> getMavenProjects()
     {
         return mavenProjects;
@@ -28,7 +30,7 @@
 
     public Model getModel()
     {
-        return model;  //To change body of implemented methods use File | Settings | File
Templates.
+        return model;
     }
 
     public void setModel( Model model )
@@ -79,6 +81,15 @@
     public void setVersion( String version )
     {
         this.version = version;
+    }
+
+    public boolean isOrphaned() {
+        return isOrphaned;
+    }
+
+    public void setIsOrphaned(boolean isOrphaned)
+    {
+        this.isOrphaned = isOrphaned;
     }
 
     public boolean equals( Object o )

Modified: incubator/nmaven/branches/SI_XPT/components/dotnet-embedder/src/main/java/org/apache/maven/dotnet/embedder/logger/SocketLogger.java
URL: http://svn.apache.org/viewvc/incubator/nmaven/branches/SI_XPT/components/dotnet-embedder/src/main/java/org/apache/maven/dotnet/embedder/logger/SocketLogger.java?view=diff&rev=528027&r1=528026&r2=528027
==============================================================================
--- incubator/nmaven/branches/SI_XPT/components/dotnet-embedder/src/main/java/org/apache/maven/dotnet/embedder/logger/SocketLogger.java
(original)
+++ incubator/nmaven/branches/SI_XPT/components/dotnet-embedder/src/main/java/org/apache/maven/dotnet/embedder/logger/SocketLogger.java
Thu Apr 12 09:54:47 2007
@@ -7,23 +7,25 @@
 import java.util.logging.SocketHandler;
 import java.util.logging.LogManager;
 import java.util.logging.Handler;
+import java.util.logging.Level;
 
 public class SocketLogger
     extends AbstractLogger
 {
     private java.util.logging.Logger logger;
 
-    public SocketLogger( int threshold, java.util.logging.Logger logger )
+    public SocketLogger( int threshold )
     {
-        super( threshold, logger.getName() );
-        this.logger = logger;
+        super( threshold, "SocketLogger" );
+        logger = java.util.logging.Logger.getAnonymousLogger();
+        logger.setLevel( Level.INFO );
+        this.setThreshold( org.codehaus.plexus.logging.Logger.LEVEL_INFO);
     }
 
-    public void init()
+    public synchronized void setHandlerFor( int port )
         throws IOException
     {
-        SocketHandler socketHandler;
-        socketHandler = new SocketHandler( "localhost", 9099 );
+        SocketHandler socketHandler = new SocketHandler( "localhost", port );
         socketHandler.setFormatter( new MavenFormatter() );
         for ( Handler handler : logger.getHandlers() )
         {
@@ -34,25 +36,15 @@
 
     public Logger getChildLogger( String name )
     {
-        String childName = logger.getName() + "." + name;
-        SocketLogger socketLogger = new SocketLogger( getThreshold(), java.util.logging.Logger.getLogger(
childName ) );
-        try
-        {
-            socketLogger.init();
-        }
-        catch ( IOException e )
-        {
-            e.printStackTrace();
-            return null;
-        }
-        return socketLogger;
+        return this;
     }
 
     public void debug( String message, Throwable throwable )
     {
+
         if ( isDebugEnabled() )
         {
-            System.out.print( "[ maven embedder DEBUG] " );
+            System.out.print( "[ maven embedder DEBUG---] " );
             System.out.println( message );
 
             if ( null != throwable )
@@ -60,23 +52,12 @@
                 throwable.printStackTrace( System.out );
             }
         }
+
     }
 
-    public void info( String message )
+    public synchronized void info( String message )
     {
         logger.info( message );
-        /*
-        try
-        {
-            OutputStream os = socket.getOutputStream();
-            os.write( message1.getBytes());
-            os.flush();
-        }
-        catch ( IOException e )
-        {
-            e.printStackTrace();
-        }
-        */
 /*
         if ( isInfoEnabled() )
         {
@@ -92,9 +73,9 @@
         */
     }
 
-    public void info( String message, Throwable throwable )
+    public synchronized void info( String message, Throwable throwable )
     {
-        logger.info( "[PLEXUS-TEST1]:" + message + "[END-PLEXUS-TEST1]" );
+        logger.info( message );
 /*
         if ( isInfoEnabled() )
         {

Modified: incubator/nmaven/branches/SI_XPT/components/dotnet-embedder/src/main/java/org/apache/maven/dotnet/embedder/logger/SocketLoggerManager.java
URL: http://svn.apache.org/viewvc/incubator/nmaven/branches/SI_XPT/components/dotnet-embedder/src/main/java/org/apache/maven/dotnet/embedder/logger/SocketLoggerManager.java?view=diff&rev=528027&r1=528026&r2=528027
==============================================================================
--- incubator/nmaven/branches/SI_XPT/components/dotnet-embedder/src/main/java/org/apache/maven/dotnet/embedder/logger/SocketLoggerManager.java
(original)
+++ incubator/nmaven/branches/SI_XPT/components/dotnet-embedder/src/main/java/org/apache/maven/dotnet/embedder/logger/SocketLoggerManager.java
Thu Apr 12 09:54:47 2007
@@ -10,49 +10,24 @@
 {
     private static SocketLogger logger;
 
-    public void enableLogging( Logger logger )
+    public SocketLoggerManager()
     {
-        System.out.println( "SET NEW LOGGER!!!!" );
-        logger = createLogger( "SocketLogger" );
+        if ( logger != null )
+        {
+            return;
+        }
+
+        logger = new SocketLogger( getThreshold() );
     }
 
     public Logger createLogger( String key )
     {
-        System.out.println( "CREATING LOGGER" );
-        if ( logger != null )
-        {
-            return logger;
-        }
-        logger = new SocketLogger( getThreshold(), java.util.logging.Logger.getLogger( key
) );
-        try
-        {
-            logger.init();
-        }
-        catch ( IOException e )
-        {
-            e.printStackTrace();
-            return null;
-        }
         return logger;
+
     }
 
     public Logger getLoggerForComponent( String role, String roleHint )
     {
-        System.out.println( "GET LOGGER COMPONENT" );
-        if ( logger != null )
-        {
-            return logger;
-        }
-        logger = new SocketLogger( getThreshold(), java.util.logging.Logger.getLogger( role
) );
-        try
-        {
-            logger.init();
-        }
-        catch ( IOException e )
-        {
-            e.printStackTrace();
-            return null;
-        }
         return logger;
     }
 }

Modified: incubator/nmaven/branches/SI_XPT/components/dotnet-embedder/src/test/java/ServiceTest.java
URL: http://svn.apache.org/viewvc/incubator/nmaven/branches/SI_XPT/components/dotnet-embedder/src/test/java/ServiceTest.java?view=diff&rev=528027&r1=528026&r2=528027
==============================================================================
--- incubator/nmaven/branches/SI_XPT/components/dotnet-embedder/src/test/java/ServiceTest.java
(original)
+++ incubator/nmaven/branches/SI_XPT/components/dotnet-embedder/src/test/java/ServiceTest.java
Thu Apr 12 09:54:47 2007
@@ -20,25 +20,24 @@
     public void setUp()
     {
         ServerThread serverThread = new ServerThread();
-        //  serverThread.run();
-        //   new Thread( serverThread ).start();
+      //    serverThread.run();
+      //     new Thread( serverThread ).start();
     }
 
     public void testA()
     {
-        /*
+
        MavenEmbedderServiceImpl service = new MavenEmbedderServiceImpl();
        service.initialize();
 
        MavenExecutionRequest request = new MavenExecutionRequestImpl();
        request.setPomFile( "C:\\Documents and Settings\\shane\\nmaven-apache\\SI_XPT\\assemblies\\pom.xml"
);
        request.setGoal( "compile" );
-        */
-        //  service.execute( request );
+       service.execute( request );
         //  fail("");
     }
 
-    public void testB()
+    public void atestB()
     {
 
         MavenEmbedderServiceImpl service = new MavenEmbedderServiceImpl();
@@ -75,7 +74,7 @@
             try
             {
                 ServerSocket socket = new ServerSocket();
-                socket.bind( new InetSocketAddress( "localhost", 9090 ) );
+                socket.bind( new InetSocketAddress( "localhost", 9099 ) );
                 while ( true )
                 {
                     client = socket.accept();



Mime
View raw message