maven-m2-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From br...@apache.org
Subject cvs commit: maven-components/maven-plugins/maven-compiler-plugin/src/main/java/org/apache/maven/plugin CompilerMojo.java
Date Mon, 07 Mar 2005 23:02:44 GMT
brett       2005/03/07 15:02:44

  Modified:    maven-core/src/main/java/org/apache/maven/cli MavenCli.java
               maven-model maven.mdo
               maven-artifact/src/main/java/org/apache/maven/artifact
                        DefaultArtifact.java
               maven-plugins/maven-compiler-plugin/src/main/java/org/apache/maven/plugin
                        CompilerMojo.java
  Log:
  turn on logging, resolve some issues surrounding test dependencies
  
  Revision  Changes    Path
  1.14      +14 -6     maven-components/maven-core/src/main/java/org/apache/maven/cli/MavenCli.java
  
  Index: MavenCli.java
  ===================================================================
  RCS file: /home/cvs/maven-components/maven-core/src/main/java/org/apache/maven/cli/MavenCli.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- MavenCli.java	4 Mar 2005 09:04:22 -0000	1.13
  +++ MavenCli.java	7 Mar 2005 23:02:43 -0000	1.14
  @@ -37,9 +37,11 @@
   import org.apache.maven.monitor.event.DefaultEventMonitor;
   import org.apache.maven.monitor.event.EventDispatcher;
   import org.apache.maven.monitor.logging.DefaultLog;
  +import org.apache.maven.plugin.Plugin;
   import org.codehaus.classworlds.ClassWorld;
   import org.codehaus.plexus.embed.ArtifactEnabledEmbedder;
   import org.codehaus.plexus.logging.Logger;
  +import org.codehaus.plexus.logging.LoggerManager;
   
   import java.io.File;
   import java.io.FileInputStream;
  @@ -154,18 +156,24 @@
           ArtifactEnabledEmbedder embedder = new ArtifactEnabledEmbedder();
   
           embedder.start( classWorld );
  -        
  -        Logger logger = embedder.getContainer().getLogger();
  -        if( logger != null )
  +
  +        LoggerManager manager = (LoggerManager) embedder.lookup( LoggerManager.ROLE );
  +        if ( commandLine.hasOption( CLIManager.DEBUG ) )
  +        {
  +            manager.setThreshold( Logger.LEVEL_DEBUG );
  +        }
  +
  +        // TODO [BP]: do we set one per mojo? where to do it?
  +        Logger logger = manager.getLoggerForComponent( Plugin.ROLE );
  +        if ( logger != null )
           {
               request.setLog( new DefaultLog( logger ) );
               
               request.addEventMonitor( new DefaultEventMonitor( logger ) );
           }
           
  -        // TODO [BP]: doing this here as it is CLI specific, though it doesn't feel like
the right place.
  +        // TODO [BP]: doing this here as it is CLI specific, though it doesn't feel like
the right place (likewise logger).
           WagonManager wagonManager = (WagonManager) embedder.lookup( WagonManager.ROLE );
  -
           wagonManager.setDownloadMonitor( new ConsoleDownloadMonitor() );
   
           Maven maven = (Maven) embedder.lookup( Maven.ROLE );
  
  
  
  1.81      +2 -0      maven-components/maven-model/maven.mdo
  
  Index: maven.mdo
  ===================================================================
  RCS file: /home/cvs/maven-components/maven-model/maven.mdo,v
  retrieving revision 1.80
  retrieving revision 1.81
  diff -u -r1.80 -r1.81
  --- maven.mdo	7 Mar 2005 20:54:34 -0000	1.80
  +++ maven.mdo	7 Mar 2005 23:02:43 -0000	1.81
  @@ -807,7 +807,9 @@
             <version>4.0.0</version>
             <description>The scope of the dependency - build, compile, test, runtime</description>
             <type>String</type>
  +<!-- TODO: set default value? see DefaultArtifact first
             <defaultValue>runtime</defaultValue>
  +-->
           </field>
         </fields>
         <codeSegments>
  
  
  
  1.6       +3 -2      maven-components/maven-artifact/src/main/java/org/apache/maven/artifact/DefaultArtifact.java
  
  Index: DefaultArtifact.java
  ===================================================================
  RCS file: /home/cvs/maven-components/maven-artifact/src/main/java/org/apache/maven/artifact/DefaultArtifact.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- DefaultArtifact.java	7 Mar 2005 20:54:35 -0000	1.5
  +++ DefaultArtifact.java	7 Mar 2005 23:02:43 -0000	1.6
  @@ -57,7 +57,8 @@
       /** @todo this should be replaced by type handler */
       public DefaultArtifact( String groupId, String artifactId, String version, String type,
String extension )
       {
  -        this( groupId, artifactId, version, SCOPE_RUNTIME, type, extension );
  +        // TODO: default should be runtime, except in currently building POM where it is
compile.
  +        this( groupId, artifactId, version, SCOPE_COMPILE, type, extension );
       }
   
       public DefaultArtifact( String groupId, String artifactId, String version, String type
)
  
  
  
  1.18      +2 -1      maven-components/maven-plugins/maven-compiler-plugin/src/main/java/org/apache/maven/plugin/CompilerMojo.java
  
  Index: CompilerMojo.java
  ===================================================================
  RCS file: /home/cvs/maven-components/maven-plugins/maven-compiler-plugin/src/main/java/org/apache/maven/plugin/CompilerMojo.java,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- CompilerMojo.java	7 Mar 2005 22:08:23 -0000	1.17
  +++ CompilerMojo.java	7 Mar 2005 23:02:43 -0000	1.18
  @@ -108,6 +108,7 @@
   
           List messages = compiler.compile( compilerConfiguration );
   
  +        // TODO: doesn't appear to be called
           if ( debug )
           {
               for ( Iterator i = classpathElements.iterator(); i.hasNext(); )
  
  
  

Mime
View raw message