Репозиторий Sisyphus
Последнее обновление: 1 октября 2023 | Пакетов: 18631 | Посещений: 37837336
en ru br
Репозитории ALT
S:2.2.1-alt6_66jpp11
5.1: 2.0.7-alt2_9jpp5
4.1: 2.0.4-alt1_10jpp1.7
4.0: 2.0.4-alt1_10jpp1.7.M40
www.altlinux.org/Changes

Группа :: Разработка/Java
Пакет: maven2

 Главная   Изменения   Спек   Патчи   Sources   Загрузить   Gear   Bugs and FR  Repocop 

Патч: maven2-2.2.1-migrate-to-plexus-containers-container-default.patch
Скачать


From 7b57fd654710a1a21af22642eda12f8027289986 Mon Sep 17 00:00:00 2001
From: Michal Srb <msrb@redhat.com>
Date: Wed, 3 Jul 2013 10:04:03 +0200
Subject: [PATCH] Migrate to plexus-containers-container-default
---
 .../maven/profiles/DefaultProfileManager.java      | 28 ++++++++++++++++++----
 1 file changed, 23 insertions(+), 5 deletions(-)
diff --git a/maven-project/src/main/java/org/apache/maven/profiles/DefaultProfileManager.java b/maven-project/src/main/java/org/apache/maven/profiles/DefaultProfileManager.java
index e62d5ed..b72d515 100644
--- a/maven-project/src/main/java/org/apache/maven/profiles/DefaultProfileManager.java
+++ b/maven-project/src/main/java/org/apache/maven/profiles/DefaultProfileManager.java
@@ -26,8 +26,10 @@ import org.apache.maven.profiles.activation.ProfileActivator;
 import org.apache.maven.settings.Settings;
 import org.apache.maven.settings.SettingsUtils;
 import org.codehaus.plexus.PlexusContainer;
+import org.codehaus.plexus.component.factory.ComponentInstantiationException;
 import org.codehaus.plexus.component.repository.exception.ComponentLifecycleException;
 import org.codehaus.plexus.component.repository.exception.ComponentLookupException;
+import org.codehaus.plexus.logging.Logger;
 
 import java.util.ArrayList;
 import java.util.Iterator;
@@ -119,8 +121,12 @@ public class DefaultProfileManager
         Profile existing = (Profile) profilesById.get( profileId );
         if ( existing != null )
         {
-            container.getLogger().warn( "Overriding profile: \'" + profileId + "\' (source: " + existing.getSource() +
-                ") with new instance from source: " + profile.getSource() );
+            try {
+                container.lookup( Logger.class ).warn( "Overriding profile: \'" + profileId + "\' (source: " + existing.getSource() +
+                    ") with new instance from source: " + profile.getSource() );
+            } catch ( ComponentLookupException e ) {
+                throw new RuntimeException( e );
+            }
         }
 
         profilesById.put( profile.getId(), profile );
@@ -140,7 +146,11 @@ public class DefaultProfileManager
     {
         if ( !activatedIds.contains( profileId ) )
         {
-            container.getLogger().debug( "Profile with id: \'" + profileId + "\' has been explicitly activated." );
+            try {
+                container.lookup( Logger.class ).debug( "Profile with id: \'" + profileId + "\' has been explicitly activated." );
+            } catch ( ComponentLookupException e ) {
+                throw new RuntimeException( e );
+            }
 
             activatedIds.add( profileId );
         }
@@ -166,7 +176,11 @@ public class DefaultProfileManager
     {
         if ( !deactivatedIds.contains( profileId ) )
         {
-            container.getLogger().debug( "Profile with id: \'" + profileId + "\' has been explicitly deactivated." );
+            try {
+                container.lookup( Logger.class ).debug( "Profile with id: \'" + profileId + "\' has been explicitly deactivated." );
+            } catch ( ComponentLookupException e ) {
+                throw new RuntimeException( e );
+            }
 
             deactivatedIds.add( profileId );
         }
@@ -294,7 +308,11 @@ public class DefaultProfileManager
                 }
                 catch ( ComponentLifecycleException e )
                 {
-                    container.getLogger().debug( "Error releasing profile activators - ignoring.", e );
+                    try {
+                         container.lookup( Logger.class ).debug( "Error releasing profile activators - ignoring.", e );
+                    } catch ( ComponentLookupException ex ) {
+                        throw new RuntimeException( ex );
+                    }
                 }
             }
         }
-- 
1.8.1.4
 
дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin