Author: jvanzyl
Date: Mon Mar 23 01:40:38 2009
New Revision: 757296

URL: http://svn.apache.org/viewvc?rev=757296&view=rev
Log:
o inject the logger in the lifecycle executor

Modified:
    
maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/lifecycle/DefaultLifecycleExecutor.java
    
maven/components/branches/MNG-2766/maven-core/src/main/resources/META-INF/plexus/components.xml

Modified: 
maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/lifecycle/DefaultLifecycleExecutor.java
URL: 
http://svn.apache.org/viewvc/maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/lifecycle/DefaultLifecycleExecutor.java?rev=757296&r1=757295&r2=757296&view=diff
==============================================================================
--- 
maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/lifecycle/DefaultLifecycleExecutor.java
 (original)
+++ 
maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/lifecycle/DefaultLifecycleExecutor.java
 Mon Mar 23 01:40:38 2009
@@ -38,7 +38,7 @@
 import org.apache.maven.plugin.descriptor.PluginDescriptor;
 import org.apache.maven.project.MavenProject;
 import org.codehaus.plexus.component.annotations.Requirement;
-import org.codehaus.plexus.logging.AbstractLogEnabled;
+import org.codehaus.plexus.logging.Logger;
 import org.codehaus.plexus.personality.plexus.lifecycle.phase.Initializable;
 import 
org.codehaus.plexus.personality.plexus.lifecycle.phase.InitializationException;
 
@@ -46,11 +46,10 @@
  * @author Jason van Zyl
  */
 public class DefaultLifecycleExecutor
-    extends AbstractLogEnabled
     implements LifecycleExecutor, Initializable
 {
-    //@Requirement
-    //private getLogger() getLogger();
+    @Requirement
+    private Logger logger;
 
     @Requirement
     private PluginManager pluginManager;
@@ -192,7 +191,7 @@
             {
                 line();
 
-                getLogger().info( "Building " + currentProject.getName() );
+                logger.info( "Building " + currentProject.getName() );
 
                 line();
 
@@ -460,7 +459,7 @@
 
     protected void line()
     {
-        getLogger().info( 
"------------------------------------------------------------------------" );
+        logger.info( 
"------------------------------------------------------------------------" );
     }
 
     private PluginDescriptor loadPlugin( Plugin plugin, MavenProject project, 
MavenSession session )

Modified: 
maven/components/branches/MNG-2766/maven-core/src/main/resources/META-INF/plexus/components.xml
URL: 
http://svn.apache.org/viewvc/maven/components/branches/MNG-2766/maven-core/src/main/resources/META-INF/plexus/components.xml?rev=757296&r1=757295&r2=757296&view=diff
==============================================================================
--- 
maven/components/branches/MNG-2766/maven-core/src/main/resources/META-INF/plexus/components.xml
 (original)
+++ 
maven/components/branches/MNG-2766/maven-core/src/main/resources/META-INF/plexus/components.xml
 Mon Mar 23 01:40:38 2009
@@ -1,44 +1,43 @@
-<!--
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements.  See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership.  The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License.  You may obtain a copy of the License at
 
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied.  See the License for the
-specific language governing permissions and limitations
-under the License.
--->
-
-<!-- 
-
-There is currently only one component descriptor that cannot be generated from 
annotations because
-of the accompanying configurationl. Our options are to embed this information 
programatically or
-use a configuration source to pull in the lifecycle information.
-
--->
+  <!--
+    Licensed to the Apache Software Foundation (ASF) under one or more 
contributor license agreements. See the NOTICE
+    file distributed with this work for additional information regarding 
copyright ownership. The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the "License"); you may not 
use this file except in compliance with
+    the License. You may obtain a copy of the License at 
http://www.apache.org/licenses/LICENSE-2.0 Unless required by
+    applicable law or agreed to in writing, software distributed under the 
License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
See the License for the specific language
+    governing permissions and limitations under the License.
+  -->
+
+  <!--
+
+    There is currently only one component descriptor that cannot be generated 
from annotations because of the
+    accompanying configurationl. Our options are to embed this information 
programatically or use a configuration source
+    to pull in the lifecycle information.
+  -->
 <component-set>
   <components>
     <component>
       <role>org.apache.maven.plugin.MavenPluginCollector</role>
-      
<implementation>org.apache.maven.plugin.MavenPluginCollector</implementation>
-    </component>  
+      <implementation>org.apache.maven.plugin.MavenPluginCollector
+      </implementation>
+    </component>
     <component>
       <role>org.apache.maven.lifecycle.LifecycleExecutor</role>
-      
<implementation>org.apache.maven.lifecycle.DefaultLifecycleExecutor</implementation>
+      <implementation>org.apache.maven.lifecycle.DefaultLifecycleExecutor
+      </implementation>
       <requirements>
         <requirement>
+          <role>org.codehaus.plexus.logging.Logger</role>
+          <role-hint>default</role-hint>
+          <field-name>logger</field-name>
+        </requirement>
+        <requirement>
           <role>org.apache.maven.plugin.PluginManager</role>
         </requirement>
         <requirement>
-          <role>org.apache.maven.lifecycle.mapping.LifecycleMapping</role>
+          <role>org.apache.maven.lifecycle.mapping.LifecycleMapping
+          </role>
           <field-name>lifecycleMappings</field-name>
         </requirement>
       </requirements>
@@ -81,7 +80,8 @@
               <phase>post-clean</phase>
             </phases>
             <default-phases>
-              <clean>org.apache.maven.plugins:maven-clean-plugin:clean</clean>
+              <clean>org.apache.maven.plugins:maven-clean-plugin:clean
+              </clean>
             </default-phases>
           </lifecycle>
           <lifecycle>
@@ -93,8 +93,10 @@
               <phase>site-deploy</phase>
             </phases>
             <default-phases>
-              <site>org.apache.maven.plugins:maven-site-plugin:site</site>
-              
<site-deploy>org.apache.maven.plugins:maven-site-plugin:deploy</site-deploy>
+              <site>org.apache.maven.plugins:maven-site-plugin:site
+              </site>
+              <site-deploy>org.apache.maven.plugins:maven-site-plugin:deploy
+              </site-deploy>
             </default-phases>
           </lifecycle>
         </lifecycles>
@@ -102,19 +104,22 @@
     </component>
 
     <component>
-      <role>org.sonatype.plexus.components.sec.dispatcher.SecDispatcher</role>
+      <role>org.sonatype.plexus.components.sec.dispatcher.SecDispatcher
+      </role>
       <role-hint>maven</role-hint>
-      
<implementation>org.sonatype.plexus.components.sec.dispatcher.DefaultSecDispatcher</implementation>
+      
<implementation>org.sonatype.plexus.components.sec.dispatcher.DefaultSecDispatcher
+      </implementation>
       <description>Maven Security dispatcher</description>
       <requirements>
         <requirement>
-          <role>org.sonatype.plexus.components.cipher.PlexusCipher</role>
+          <role>org.sonatype.plexus.components.cipher.PlexusCipher
+          </role>
           <field-name>_cipher</field-name>
         </requirement>
       </requirements>
       <configuration>
         <_configuration-file>~/.m2/settings-security.xml</_configuration-file>
       </configuration>
-    </component>               
-  </components>  
+    </component>
+  </components>
 </component-set>


Reply via email to