Cleanup testcontainer: remove container interface - now in fulcrum yaafi - remove Log4J22Logge - now in fulcrum-yaafi, require fulcurm-yaafi by using new moved packages
diff --git a/pom.xml b/pom.xml
index 2d1519f..43cf94d 100644
--- a/pom.xml
+++ b/pom.xml
@@ -72,7 +72,7 @@
<groupId>org.apache.fulcrum</groupId>
<artifactId>fulcrum-yaafi</artifactId>
<version>2.0.1-SNAPSHOT</version>
- <optional>true</optional>
+ <!--optional>true</optional-->
</dependency>
<!-- required for testcontainer and not test scope, we have to define version here -->
<dependency>
diff --git a/src/java/org/apache/fulcrum/testcontainer/BaseUnit4Test.java b/src/java/org/apache/fulcrum/testcontainer/BaseUnit4Test.java
index 06fe737..8b172e9 100644
--- a/src/java/org/apache/fulcrum/testcontainer/BaseUnit4Test.java
+++ b/src/java/org/apache/fulcrum/testcontainer/BaseUnit4Test.java
@@ -33,6 +33,7 @@
import org.apache.avalon.framework.component.ComponentException;
import org.apache.avalon.framework.logger.ConsoleLogger;
+import org.apache.fulcrum.yaafi.container.Container;
import org.junit.After;
import org.mockito.invocation.InvocationOnMock;
import org.mockito.stubbing.Answer;
diff --git a/src/java/org/apache/fulcrum/testcontainer/BaseUnit5Test.java b/src/java/org/apache/fulcrum/testcontainer/BaseUnit5Test.java
index c4fe87e..95213e5 100644
--- a/src/java/org/apache/fulcrum/testcontainer/BaseUnit5Test.java
+++ b/src/java/org/apache/fulcrum/testcontainer/BaseUnit5Test.java
@@ -33,6 +33,7 @@
import org.apache.avalon.framework.component.ComponentException;
import org.apache.avalon.framework.logger.ConsoleLogger;
+import org.apache.fulcrum.yaafi.container.Container;
import org.junit.jupiter.api.AfterEach;
import org.mockito.invocation.InvocationOnMock;
import org.mockito.stubbing.Answer;
diff --git a/src/java/org/apache/fulcrum/testcontainer/BaseUnitTest.java b/src/java/org/apache/fulcrum/testcontainer/BaseUnitTest.java
index 0ba9234..198dd65 100644
--- a/src/java/org/apache/fulcrum/testcontainer/BaseUnitTest.java
+++ b/src/java/org/apache/fulcrum/testcontainer/BaseUnitTest.java
@@ -21,6 +21,7 @@
import org.apache.avalon.framework.component.ComponentException;
import org.apache.avalon.framework.logger.ConsoleLogger;
+import org.apache.fulcrum.yaafi.container.Container;
import junit.framework.TestCase;
diff --git a/src/java/org/apache/fulcrum/testcontainer/Container.java b/src/java/org/apache/fulcrum/testcontainer/Container.java
deleted file mode 100644
index 26d81da..0000000
--- a/src/java/org/apache/fulcrum/testcontainer/Container.java
+++ /dev/null
@@ -1,47 +0,0 @@
-package org.apache.fulcrum.testcontainer;
-
-/*
- * 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.
- */
-
-import org.apache.avalon.framework.activity.Disposable;
-import org.apache.avalon.framework.activity.Initializable;
-import org.apache.avalon.framework.component.ComponentException;
-
-/**
- * This is a simple interface around the ECM and Yaafi containers
- *
- * @author <a href="mailto:epugh@opensourceconnections.com">Eric Pugh</a>
- */
-public interface Container extends Initializable, Disposable
-{
- /** Key used in the context for defining the application root */
- String COMPONENT_APP_ROOT = "componentAppRoot";
-
- /** Alternate Merlin Friendly Key used in the context for defining the application root */
- String URN_AVALON_HOME = "urn:avalon:home";
-
- /** Alternate Merlin Friendly Key used in the context for defining the application root */
- String URN_AVALON_TEMP = "urn:avalon:temp";
-
- void startup(String configFileName, String roleFileName, String parametersFileName);
-
- Object lookup(String roleName) throws ComponentException;
-
- void release(Object component);
-}
diff --git a/src/java/org/apache/fulcrum/testcontainer/ECMContainer.java b/src/java/org/apache/fulcrum/testcontainer/ECMContainer.java
index a8256c2..2392687 100644
--- a/src/java/org/apache/fulcrum/testcontainer/ECMContainer.java
+++ b/src/java/org/apache/fulcrum/testcontainer/ECMContainer.java
@@ -29,6 +29,7 @@
import org.apache.avalon.framework.configuration.DefaultConfigurationBuilder;
import org.apache.avalon.framework.context.DefaultContext;
import org.apache.avalon.framework.logger.AbstractLogEnabled;
+import org.apache.fulcrum.yaafi.container.Container;
/**
* This is a simple ECM based container that can be used in unit test
* of the fulcrum components.
diff --git a/src/java/org/apache/fulcrum/testcontainer/YAAFIContainer.java b/src/java/org/apache/fulcrum/testcontainer/YAAFIContainer.java
index dcfa445..b7a8b40 100644
--- a/src/java/org/apache/fulcrum/testcontainer/YAAFIContainer.java
+++ b/src/java/org/apache/fulcrum/testcontainer/YAAFIContainer.java
@@ -25,6 +25,7 @@
import org.apache.avalon.framework.component.ComponentException;
import org.apache.avalon.framework.logger.AbstractLogEnabled;
import org.apache.avalon.framework.logger.ConsoleLogger;
+import org.apache.fulcrum.yaafi.container.Container;
import org.apache.fulcrum.yaafi.framework.container.ServiceContainer;
import org.apache.fulcrum.yaafi.framework.factory.ServiceContainerConfiguration;
import org.apache.fulcrum.yaafi.framework.factory.ServiceContainerFactory;
diff --git a/src/java/org/apache/fulcrum/testcontainer/avalon/logger/Log4J2Logger.java b/src/java/org/apache/fulcrum/testcontainer/avalon/logger/Log4J2Logger.java
deleted file mode 100644
index cf47b56..0000000
--- a/src/java/org/apache/fulcrum/testcontainer/avalon/logger/Log4J2Logger.java
+++ /dev/null
@@ -1,224 +0,0 @@
-package org.apache.fulcrum.testcontainer.avalon.logger;
-
-import java.util.Objects;
-
-import org.apache.avalon.framework.logger.Logger;
-import org.apache.logging.log4j.Level;
-
-/*
- * 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.
- */
-
-
-import org.apache.logging.log4j.LogManager;
-
-/**
- * A Log4J2 wrapper class for Logger.
- *
- * - supports only minimal logging mechanism, without suppliers or objects.
- *
- * Use org.apache.fulcrum.yaafi.framework.logger.Log4j2Logger instead.
- *
- * @author <a href="mailto:dev@turbine.apache.org">Turbine Development Team</a>
- * @version $Id$
- */
-@Deprecated
-public final class Log4J2Logger
- implements Logger
-{
-
- //underlying implementation
- private final org.apache.logging.log4j.Logger m_logger;
-
- /**
- * Create a logger that delegates to specified category.
- *
- * @param logImpl the category to delegate to
- */
- public Log4J2Logger( final org.apache.logging.log4j.Logger logImpl )
- {
- Objects.requireNonNull( logImpl, "Log4J2 logger must not be null" );
- m_logger = logImpl;
- }
-
- /**
- * Log a debug message.
- *
- * @param message the message
- */
- public final void debug( final String message )
- {
- m_logger.log( Level.DEBUG, message );
- }
-
- /**
- * Log a debug message.
- *
- * @param message the message
- * @param throwable the throwable
- */
- public final void debug( final String message, final Throwable throwable )
- {
- m_logger.log( Level.DEBUG, message, throwable );
- }
-
- /**
- * Determine if messages of priority "debug" will be logged.
- *
- * @return true if "debug" messages will be logged
- */
- public final boolean isDebugEnabled()
- {
- return m_logger.isDebugEnabled();
- }
-
- /**
- * Log a info message.
- *
- * @param message the message
- */
- public final void info( final String message )
- {
- m_logger.log( Level.INFO, message );
- }
-
- /**
- * Log a info message.
- *
- * @param message the message
- * @param throwable the throwable
- */
- public final void info( final String message, final Throwable throwable )
- {
- m_logger.log( Level.INFO, message, throwable );
- }
-
- /**
- * Determine if messages of priority "info" will be logged.
- *
- * @return true if "info" messages will be logged
- */
- public final boolean isInfoEnabled()
- {
- return m_logger.isInfoEnabled();
- }
-
- /**
- * Log a warn message.
- *
- * @param message the message
- */
- public final void warn( final String message )
- {
- m_logger.log( Level.WARN, message );
- }
-
- /**
- * Log a warn message.
- *
- * @param message the message
- * @param throwable the throwable
- */
- public final void warn( final String message, final Throwable throwable )
- {
- m_logger.log( Level.WARN, message, throwable );
- }
-
- /**
- * Determine if messages of priority "warn" will be logged.
- *
- * @return true if "warn" messages will be logged
- */
- public final boolean isWarnEnabled()
- {
- return m_logger.isEnabled( Level.WARN );
- }
-
- /**
- * Log a error message.
- *
- * @param message the message
- */
- public final void error( final String message )
- {
- m_logger.log( Level.ERROR, message );
- }
-
- /**
- * Log a error message.
- *
- * @param message the message
- * @param throwable the throwable
- */
- public final void error( final String message, final Throwable throwable )
- {
- m_logger.log( Level.ERROR, message, throwable );
- }
-
- /**
- * Determine if messages of priority "error" will be logged.
- *
- * @return true if "error" messages will be logged
- */
- public final boolean isErrorEnabled()
- {
- return m_logger.isEnabled( Level.ERROR );
- }
-
- /**
- * Log a fatalError message.
- *
- * @param message the message
- */
- public final void fatalError( final String message )
- {
- m_logger.log( Level.FATAL, message );
- }
-
- /**
- * Log a fatalError message.
- *
- * @param message the message
- * @param throwable the throwable
- */
- public final void fatalError( final String message, final Throwable throwable )
- {
- m_logger.log( Level.ERROR, message, throwable );
- }
-
- /**
- * Determine if messages of priority "fatalError" will be logged.
- *
- * @return true if "fatalError" messages will be logged
- */
- public final boolean isFatalErrorEnabled()
- {
- return m_logger.isEnabled( Level.FATAL );
- }
-
- /**
- * Create a new child logger.
- * The name of the child logger is [current-loggers-name].[passed-in-name]
- * Throws <code>IllegalArgumentException</code> if name has an empty element name
- *
- * @param name the subname of this logger
- * @return the new logger
- */
- public final Logger getChildLogger( final String name )
- {
- return new Log4J2Logger( LogManager.getLogger( m_logger.getName() + "." + name ) );
- }
-}