You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@logging.apache.org by rg...@apache.org on 2022/12/27 04:30:13 UTC

[logging-log4j2] branch master updated: LOG4J2-3644 - Remove package scanning support

This is an automated email from the ASF dual-hosted git repository.

rgoers pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git


The following commit(s) were added to refs/heads/master by this push:
     new 3f00ca525c LOG4J2-3644 - Remove package scanning support
3f00ca525c is described below

commit 3f00ca525c0b9f31f189e2d19cbd6cd4b1c4fc86
Author: Ralph Goers <rg...@apache.org>
AuthorDate: Mon Dec 26 21:30:02 2022 -0700

    LOG4J2-3644 - Remove package scanning support
---
 .../plugins/util/PluginManagerPackagesTest.java    | 119 ---------------------
 ...ncWaitStrategyFactoryConfigGlobalLoggerTest.xml |   1 -
 .../AsyncWaitStrategyFactoryConfigTest.xml         |   1 -
 .../src/test/resources/customplugin/log4j2-741.xml |  29 -----
 .../src/test/resources/log4j-rolling-3490.xml      |   2 +-
 .../src/test/resources/perf9MMapNoLoc.xml          |   2 +-
 .../log4j/core/config/AbstractConfiguration.java   |   1 -
 .../config/builder/impl/BuiltConfiguration.java    |   4 -
 .../builder/impl/DefaultConfigurationBuilder.java  |   4 -
 .../config/composite/CompositeConfiguration.java   |   4 +-
 .../log4j/core/config/jason/JsonConfiguration.java |   2 +-
 .../log4j/core/config/json/JsonConfiguration.java  |   2 +-
 .../log4j/core/config/xml/XmlConfiguration.java    |   2 +-
 .../logging/log4j/core/lookup/Interpolator.java    |  27 ++---
 .../test/resources/log4j2-jdbc-driver-manager.xml  |   2 +-
 .../test/resources/log4j2-streams-unit-test.xml    |   2 +-
 .../resources/log4j2-json-layout-timestamp.xml     |   2 +-
 .../src/test/resources/log4j2-json-layout.xml      |   2 +-
 .../src/test/resources/log4j2-xml-layout.xml       |   2 +-
 .../src/test/resources/log4j2-yaml-layout.xml      |   2 +-
 .../logging/log4j/plugins/di/InjectorTest.java     |   1 -
 .../logging/log4j/plugins/di/DefaultInjector.java  |   9 +-
 .../org/apache/logging/log4j/plugins/di/Keys.java  |   3 -
 .../log4j/plugins/model/PluginRegistry.java        |  13 +--
 .../src/test/resources/log4j2-1482.xml             |   2 +-
 .../src/test/resources/log4j2-1482.xml             |   2 +-
 log4j-taglib/src/test/resources/log4j-test1.xml    |   2 +-
 src/site/asciidoc/manual/appenders.adoc            |  58 +++++-----
 src/site/asciidoc/manual/configuration.adoc        |   5 -
 src/site/asciidoc/manual/filters.adoc              |  30 +++---
 src/site/asciidoc/manual/plugins.adoc              |   9 +-
 31 files changed, 75 insertions(+), 271 deletions(-)

diff --git a/log4j-core-test/src/test/java/org/apache/logging/log4j/core/config/plugins/util/PluginManagerPackagesTest.java b/log4j-core-test/src/test/java/org/apache/logging/log4j/core/config/plugins/util/PluginManagerPackagesTest.java
deleted file mode 100644
index 1cd15e2e10..0000000000
--- a/log4j-core-test/src/test/java/org/apache/logging/log4j/core/config/plugins/util/PluginManagerPackagesTest.java
+++ /dev/null
@@ -1,119 +0,0 @@
-/*
- * 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.
- */
-package org.apache.logging.log4j.core.config.plugins.util;
-
-import org.apache.logging.log4j.LogManager;
-import org.apache.logging.log4j.Logger;
-import org.apache.logging.log4j.core.LoggerContext;
-import org.apache.logging.log4j.core.config.Configuration;
-import org.apache.logging.log4j.core.config.ConfigurationFactory;
-import org.apache.logging.log4j.core.config.Configurator;
-import org.apache.logging.log4j.core.test.appender.ListAppender;
-import org.apache.logging.log4j.status.StatusLogger;
-import org.apache.logging.log4j.util.Strings;
-import org.junit.jupiter.api.AfterAll;
-import org.junit.jupiter.api.Test;
-
-import javax.tools.Diagnostic;
-import javax.tools.DiagnosticCollector;
-import javax.tools.JavaCompiler;
-import javax.tools.JavaFileObject;
-import javax.tools.StandardJavaFileManager;
-import javax.tools.ToolProvider;
-import java.nio.file.Files;
-import java.nio.file.Path;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Locale;
-
-import static org.assertj.core.api.Assertions.assertThat;
-import static org.junit.jupiter.api.Assertions.assertDoesNotThrow;
-
-public class PluginManagerPackagesTest {
-    private static final Path TEST_SOURCE = Path.of("target", "test-classes", "customplugin", "FixedStringLayout.java");
-    private static LoggerContext ctx;
-
-    @AfterAll
-    public static void cleanupClass() {
-        System.clearProperty(ConfigurationFactory.CONFIGURATION_FILE_PROPERTY);
-        if (ctx != null) {
-            ctx.reconfigure();
-        }
-        StatusLogger.getLogger().reset();
-    }
-
-    @AfterAll
-    public static void afterClass() throws Exception {
-        Files.deleteIfExists(TEST_SOURCE);
-        Files.deleteIfExists(TEST_SOURCE.resolveSibling("FixedStringLayout.class"));
-    }
-
-    @Test
-    public void test() throws Exception {
-
-        // To ensure our custom plugin is NOT included in the log4j plugin metadata file,
-        // we make sure the class does not exist until after the build is finished.
-        // So we don't create the custom plugin class until this test is run.
-        final Path orig = TEST_SOURCE.resolveSibling("FixedStringLayout.java.source");
-        final Path source = Files.move(orig, TEST_SOURCE);
-        compile(source);
-        Files.move(source, orig);
-
-        // load the compiled class
-        Class.forName("customplugin.FixedStringLayout");
-
-        // now that the custom plugin class exists, we load the config
-        // with the packages element pointing to our custom plugin
-        ctx = Configurator.initialize("Test1", "customplugin/log4j2-741.xml");
-        Configuration config = ctx.getConfiguration();
-        ListAppender listAppender = config.getAppender("List");
-
-        final Logger logger = LogManager.getLogger(PluginManagerPackagesTest.class);
-        logger.info("this message is ignored");
-
-        assertThat(listAppender.getMessages()).hasSize(1).hasSameElementsAs(List.of("abc123XYZ"));
-    }
-
-    static void compile(final Path path) {
-        // set up compiler
-        final JavaCompiler compiler = ToolProvider.getSystemJavaCompiler();
-        final DiagnosticCollector<JavaFileObject> diagnostics = new DiagnosticCollector<>();
-        final List<String> errors = new ArrayList<>();
-        assertDoesNotThrow(() -> {
-            try (final StandardJavaFileManager fileManager = compiler.getStandardFileManager(diagnostics, null, null)) {
-                final Iterable<? extends JavaFileObject> compilationUnits = fileManager.getJavaFileObjectsFromPaths(List.of(path));
-                String classPath = System.getProperty("jdk.module.path");
-                List<String> options = new ArrayList<>();
-                if (Strings.isNotBlank(classPath)) {
-                    options.add("-classpath");
-                    options.add(classPath);
-                }
-                options.add("-proc:none");
-                // compile generated source
-                compiler.getTask(null, fileManager, diagnostics, options, null, compilationUnits).call();
-
-                // check we don't have any compilation errors
-                for (final Diagnostic<? extends JavaFileObject> diagnostic : diagnostics.getDiagnostics()) {
-                    if (diagnostic.getKind() == Diagnostic.Kind.ERROR) {
-                        errors.add(String.format("Compile error: %s%n", diagnostic.getMessage(Locale.getDefault())));
-                    }
-                }
-            }
-        });
-        assertThat(errors).isEmpty();
-    }
-}
diff --git a/log4j-core-test/src/test/resources/AsyncWaitStrategyFactoryConfigGlobalLoggerTest.xml b/log4j-core-test/src/test/resources/AsyncWaitStrategyFactoryConfigGlobalLoggerTest.xml
index 5f98b2ea47..195bca37cb 100644
--- a/log4j-core-test/src/test/resources/AsyncWaitStrategyFactoryConfigGlobalLoggerTest.xml
+++ b/log4j-core-test/src/test/resources/AsyncWaitStrategyFactoryConfigGlobalLoggerTest.xml
@@ -1,6 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <Configuration name="asyncwait-global1" >
-  <!--  packages="org.apache.logging.log4j.core.async" -->
 
   <AsyncWaitStrategyFactory
       class="org.apache.logging.log4j.core.async.AsyncWaitStrategyFactoryConfigTest$YieldingWaitStrategyFactory" />
diff --git a/log4j-core-test/src/test/resources/AsyncWaitStrategyFactoryConfigTest.xml b/log4j-core-test/src/test/resources/AsyncWaitStrategyFactoryConfigTest.xml
index 04211fd3da..b9b0fe81b6 100644
--- a/log4j-core-test/src/test/resources/AsyncWaitStrategyFactoryConfigTest.xml
+++ b/log4j-core-test/src/test/resources/AsyncWaitStrategyFactoryConfigTest.xml
@@ -1,6 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <Configuration name="async-wait-1" >
-  <!--  packages="org.apache.logging.log4j.core.async" -->
 
   <AsyncWaitStrategyFactory
       class="org.apache.logging.log4j.core.async.AsyncWaitStrategyFactoryConfigTest$YieldingWaitStrategyFactory" />
diff --git a/log4j-core-test/src/test/resources/customplugin/log4j2-741.xml b/log4j-core-test/src/test/resources/customplugin/log4j2-741.xml
deleted file mode 100644
index 4d99db09ae..0000000000
--- a/log4j-core-test/src/test/resources/customplugin/log4j2-741.xml
+++ /dev/null
@@ -1,29 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- 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.
--->
-<Configuration status="off" packages="customplugin">
-  <Appenders>
-    <List name="List">
-      <FixedString fixedString="abc123XYZ" />
-    </List>
-  </Appenders>
-  <Loggers>
-    <Root level="trace">
-      <AppenderRef ref="List" />
-    </Root>
-  </Loggers>
-</Configuration>
diff --git a/log4j-core-test/src/test/resources/log4j-rolling-3490.xml b/log4j-core-test/src/test/resources/log4j-rolling-3490.xml
index 117274a138..fbd262745d 100644
--- a/log4j-core-test/src/test/resources/log4j-rolling-3490.xml
+++ b/log4j-core-test/src/test/resources/log4j-rolling-3490.xml
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<Configuration status="warn" name="MyApp" packages="">
+<Configuration status="warn" name="MyApp">
   <Appenders>
     <RollingFile name="RollingFile" filePattern="target/rolling-3490/app-%i.log">
       <PatternLayout>
diff --git a/log4j-core-test/src/test/resources/perf9MMapNoLoc.xml b/log4j-core-test/src/test/resources/perf9MMapNoLoc.xml
index 9c5055c4da..3f6b940999 100644
--- a/log4j-core-test/src/test/resources/perf9MMapNoLoc.xml
+++ b/log4j-core-test/src/test/resources/perf9MMapNoLoc.xml
@@ -16,7 +16,7 @@
   ~ limitations under the license.
   -->
 
-<Configuration status="off" packages="org.apache.logging.log4j.core.async.perftest">
+<Configuration status="off">
   <Appenders>
     <MemoryMappedFile name="MMapFile" fileName="perftest.log" regionLength="1073741824">
       <PatternLayout>
diff --git a/log4j-core/src/main/java/org/apache/logging/log4j/core/config/AbstractConfiguration.java b/log4j-core/src/main/java/org/apache/logging/log4j/core/config/AbstractConfiguration.java
index 0f6766dcba..db1a5c8325 100644
--- a/log4j-core/src/main/java/org/apache/logging/log4j/core/config/AbstractConfiguration.java
+++ b/log4j-core/src/main/java/org/apache/logging/log4j/core/config/AbstractConfiguration.java
@@ -250,7 +250,6 @@ public abstract class AbstractConfiguration extends AbstractFilterable implement
         runtimeStrSubstitutor.setConfiguration(this);
         configurationStrSubstitutor.setConfiguration(this);
         initializeScriptManager();
-        injector.registerBindingIfAbsent(Keys.PLUGIN_PACKAGES_KEY, this::getPluginPackages);
         corePlugins = injector.getInstance(Core.PLUGIN_NAMESPACE_KEY);
         final PluginNamespace levelPlugins = injector.getInstance(new @Namespace(Level.CATEGORY) Key<>() {});
         levelPlugins.forEach(type -> {
diff --git a/log4j-core/src/main/java/org/apache/logging/log4j/core/config/builder/impl/BuiltConfiguration.java b/log4j-core/src/main/java/org/apache/logging/log4j/core/config/builder/impl/BuiltConfiguration.java
index fa5f6a27d2..9cdf578a8c 100644
--- a/log4j-core/src/main/java/org/apache/logging/log4j/core/config/builder/impl/BuiltConfiguration.java
+++ b/log4j-core/src/main/java/org/apache/logging/log4j/core/config/builder/impl/BuiltConfiguration.java
@@ -135,10 +135,6 @@ public class BuiltConfiguration extends AbstractConfiguration {
         return statusConfig;
     }
 
-    public void setPluginPackages(final String packages) {
-        pluginPackages.addAll(Arrays.asList(packages.split(Patterns.COMMA_SEPARATOR)));
-    }
-
     public void setShutdownHook(final String flag) {
         isShutdownHookEnabled = !"disable".equalsIgnoreCase(flag);
     }
diff --git a/log4j-core/src/main/java/org/apache/logging/log4j/core/config/builder/impl/DefaultConfigurationBuilder.java b/log4j-core/src/main/java/org/apache/logging/log4j/core/config/builder/impl/DefaultConfigurationBuilder.java
index 83dccac91f..3cfc608249 100644
--- a/log4j-core/src/main/java/org/apache/logging/log4j/core/config/builder/impl/DefaultConfigurationBuilder.java
+++ b/log4j-core/src/main/java/org/apache/logging/log4j/core/config/builder/impl/DefaultConfigurationBuilder.java
@@ -24,7 +24,6 @@ import java.lang.reflect.Constructor;
 import java.util.List;
 import java.util.Map;
 import java.util.concurrent.TimeUnit;
-
 import javax.xml.stream.XMLOutputFactory;
 import javax.xml.stream.XMLStreamException;
 import javax.xml.stream.XMLStreamWriter;
@@ -202,9 +201,6 @@ public class DefaultConfigurationBuilder<T extends BuiltConfiguration> implement
             if (destination != null) {
                 configuration.getStatusConfiguration().setDestination(destination);
             }
-            if (packages != null) {
-                configuration.setPluginPackages(packages);
-            }
             if (shutdownFlag != null) {
                 configuration.setShutdownHook(shutdownFlag);
             }
diff --git a/log4j-core/src/main/java/org/apache/logging/log4j/core/config/composite/CompositeConfiguration.java b/log4j-core/src/main/java/org/apache/logging/log4j/core/config/composite/CompositeConfiguration.java
index 1b6f634a10..880a426e67 100644
--- a/log4j-core/src/main/java/org/apache/logging/log4j/core/config/composite/CompositeConfiguration.java
+++ b/log4j-core/src/main/java/org/apache/logging/log4j/core/config/composite/CompositeConfiguration.java
@@ -76,7 +76,7 @@ public class CompositeConfiguration extends AbstractConfiguration implements Rec
             } else if ("verbose".equalsIgnoreCase(key)) {
                 statusConfig.setVerbosity(value);
             } else if ("packages".equalsIgnoreCase(key)) {
-                pluginPackages.addAll(Arrays.asList(value.split(Patterns.COMMA_SEPARATOR)));
+                LOGGER.warn("The packages attribute is no longer supported");
             } else if ("name".equalsIgnoreCase(key)) {
                 setName(value);
             }
@@ -166,7 +166,7 @@ public class CompositeConfiguration extends AbstractConfiguration implements Rec
     public String toString() {
         return getClass().getName() + "@" + Integer.toHexString(hashCode()) + " [configurations=" + configurations
                 + ", mergeStrategy=" + mergeStrategy + ", rootNode=" + rootNode + ", listeners=" + listeners
-                + ", pluginPackages=" + pluginPackages + ", corePlugins=" + corePlugins + ", isShutdownHookEnabled="
+                + ", corePlugins=" + corePlugins + ", isShutdownHookEnabled="
                 + isShutdownHookEnabled + ", shutdownTimeoutMillis=" + shutdownTimeoutMillis + ", scriptManager="
                 + scriptManager + "]";
     }
diff --git a/log4j-core/src/main/java/org/apache/logging/log4j/core/config/jason/JsonConfiguration.java b/log4j-core/src/main/java/org/apache/logging/log4j/core/config/jason/JsonConfiguration.java
index d2fc448381..18f1cf2604 100644
--- a/log4j-core/src/main/java/org/apache/logging/log4j/core/config/jason/JsonConfiguration.java
+++ b/log4j-core/src/main/java/org/apache/logging/log4j/core/config/jason/JsonConfiguration.java
@@ -75,7 +75,7 @@ public class JsonConfiguration extends AbstractConfiguration implements Reconfig
                 } else if ("verbose".equalsIgnoreCase(key)) {
                     statusConfig.setVerbosity(value);
                 } else if ("packages".equalsIgnoreCase(key)) {
-                    pluginPackages.addAll(Arrays.asList(value.split(Patterns.COMMA_SEPARATOR)));
+                    LOGGER.warn("The packages attribute is no longer supported");
                 } else if ("name".equalsIgnoreCase(key)) {
                     setName(value);
                 } else if ("monitorInterval".equalsIgnoreCase(key)) {
diff --git a/log4j-core/src/main/java/org/apache/logging/log4j/core/config/json/JsonConfiguration.java b/log4j-core/src/main/java/org/apache/logging/log4j/core/config/json/JsonConfiguration.java
index e125fd30d0..813c42e53c 100644
--- a/log4j-core/src/main/java/org/apache/logging/log4j/core/config/json/JsonConfiguration.java
+++ b/log4j-core/src/main/java/org/apache/logging/log4j/core/config/json/JsonConfiguration.java
@@ -83,7 +83,7 @@ public class JsonConfiguration extends AbstractConfiguration implements Reconfig
                 } else if ("verbose".equalsIgnoreCase(entry.getKey())) {
                     statusConfig.setVerbosity(value);
                 } else if ("packages".equalsIgnoreCase(key)) {
-                    pluginPackages.addAll(Arrays.asList(value.split(Patterns.COMMA_SEPARATOR)));
+                    LOGGER.warn("The packages attribute is no longer supported");
                 } else if ("name".equalsIgnoreCase(key)) {
                     setName(value);
                 } else if ("monitorInterval".equalsIgnoreCase(key)) {
diff --git a/log4j-core/src/main/java/org/apache/logging/log4j/core/config/xml/XmlConfiguration.java b/log4j-core/src/main/java/org/apache/logging/log4j/core/config/xml/XmlConfiguration.java
index 3ed0caf7c1..830a3c0737 100644
--- a/log4j-core/src/main/java/org/apache/logging/log4j/core/config/xml/XmlConfiguration.java
+++ b/log4j-core/src/main/java/org/apache/logging/log4j/core/config/xml/XmlConfiguration.java
@@ -121,7 +121,7 @@ public class XmlConfiguration extends AbstractConfiguration implements Reconfigu
                 } else if ("verbose".equalsIgnoreCase(key)) {
                     statusConfig.setVerbosity(value);
                 } else if ("packages".equalsIgnoreCase(key)) {
-                    pluginPackages.addAll(Arrays.asList(value.split(Patterns.COMMA_SEPARATOR)));
+                    LOGGER.warn("The packages attribute is no longer supported");
                 } else if ("name".equalsIgnoreCase(key)) {
                     setName(value);
                 } else if ("strict".equalsIgnoreCase(key)) {
diff --git a/log4j-core/src/main/java/org/apache/logging/log4j/core/lookup/Interpolator.java b/log4j-core/src/main/java/org/apache/logging/log4j/core/lookup/Interpolator.java
index bef28b7237..13540b1aec 100644
--- a/log4j-core/src/main/java/org/apache/logging/log4j/core/lookup/Interpolator.java
+++ b/log4j-core/src/main/java/org/apache/logging/log4j/core/lookup/Interpolator.java
@@ -16,6 +16,14 @@
  */
 package org.apache.logging.log4j.core.lookup;
 
+import java.lang.ref.WeakReference;
+import java.util.List;
+import java.util.Locale;
+import java.util.Map;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.function.Supplier;
+import java.util.stream.Collectors;
+
 import org.apache.logging.log4j.Logger;
 import org.apache.logging.log4j.core.LogEvent;
 import org.apache.logging.log4j.core.LoggerContext;
@@ -27,14 +35,6 @@ import org.apache.logging.log4j.plugins.di.Injector;
 import org.apache.logging.log4j.plugins.di.Keys;
 import org.apache.logging.log4j.status.StatusLogger;
 
-import java.lang.ref.WeakReference;
-import java.util.List;
-import java.util.Locale;
-import java.util.Map;
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.function.Supplier;
-import java.util.stream.Collectors;
-
 /**
  * Proxies other {@link StrLookup}s using a keys within ${} markers.
  */
@@ -63,23 +63,16 @@ public class Interpolator extends AbstractConfigurationAwareLookup implements Lo
 
     private WeakReference<LoggerContext> loggerContext = null;
 
-    // Used by tests
-    public Interpolator(final StrLookup defaultLookup) {
-        this(defaultLookup, List.of());
-    }
-
     /**
      * Constructs an Interpolator using a given StrLookup and a list of packages to find Lookup plugins in.
      * Only used in the Interpolator.
      *
      * @param defaultLookup  the default StrLookup to use as a fallback
-     * @param pluginPackages a list of packages to scan for Lookup plugins
      * @since 2.1
      */
-    public Interpolator(final StrLookup defaultLookup, final List<String> pluginPackages) {
+    public Interpolator(final StrLookup defaultLookup) {
         this.defaultLookup = defaultLookup == null ? new PropertiesLookup(Map.of()) : defaultLookup;
         final Injector injector = DI.createInjector();
-        injector.registerBinding(Keys.PLUGIN_PACKAGES_KEY, () -> pluginPackages);
         injector.getInstance(PLUGIN_CATEGORY_KEY)
                 .forEach((key, value) -> {
                     try {
@@ -112,7 +105,7 @@ public class Interpolator extends AbstractConfigurationAwareLookup implements Lo
      * Creates the default Interpolator with the provided properties.
      */
     public Interpolator(final Map<String, String> properties) {
-        this(new PropertiesLookup(properties), List.of());
+        this(new PropertiesLookup(properties));
     }
 
     public StrLookup getDefaultLookup() {
diff --git a/log4j-iostreams/src/test/resources/log4j2-jdbc-driver-manager.xml b/log4j-iostreams/src/test/resources/log4j2-jdbc-driver-manager.xml
index 2c59243d34..46dd36a246 100644
--- a/log4j-iostreams/src/test/resources/log4j2-jdbc-driver-manager.xml
+++ b/log4j-iostreams/src/test/resources/log4j2-jdbc-driver-manager.xml
@@ -6,7 +6,7 @@
   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. -->
-<Configuration name="UnitTest" status="info" packages="org.apache.logging.log4j.test">
+<Configuration name="UnitTest" status="info">
   <Appenders>
     <List name="List">
       <PatternLayout pattern="%level %m%n" />
diff --git a/log4j-iostreams/src/test/resources/log4j2-streams-unit-test.xml b/log4j-iostreams/src/test/resources/log4j2-streams-unit-test.xml
index d6f0211d03..201f915e7c 100644
--- a/log4j-iostreams/src/test/resources/log4j2-streams-unit-test.xml
+++ b/log4j-iostreams/src/test/resources/log4j2-streams-unit-test.xml
@@ -15,7 +15,7 @@
   ~ See the License for the specific language governing permissions and
   ~ limitations under the License.
   -->
-<Configuration name="UnitTest" status="error" packages="org.apache.logging.log4j.test">
+<Configuration name="UnitTest" status="error">
   <Appenders>
     <List name="UnitTest">
       <PatternLayout pattern="%level %m%n"/>
diff --git a/log4j-layout-jackson-json/src/test/resources/log4j2-json-layout-timestamp.xml b/log4j-layout-jackson-json/src/test/resources/log4j2-json-layout-timestamp.xml
index 7e199d1fa0..b56fd1778c 100644
--- a/log4j-layout-jackson-json/src/test/resources/log4j2-json-layout-timestamp.xml
+++ b/log4j-layout-jackson-json/src/test/resources/log4j2-json-layout-timestamp.xml
@@ -16,7 +16,7 @@
  limitations under the License.
 
 -->
-<Configuration status="INFO" packages="">
+<Configuration status="INFO">
 	<Appenders>
 		<List name="List">
 			<JsonLayout compact="true" eventEol="true" includeTimeMillis="true"/>
diff --git a/log4j-layout-jackson-json/src/test/resources/log4j2-json-layout.xml b/log4j-layout-jackson-json/src/test/resources/log4j2-json-layout.xml
index 93886b379d..d9c7116b0a 100644
--- a/log4j-layout-jackson-json/src/test/resources/log4j2-json-layout.xml
+++ b/log4j-layout-jackson-json/src/test/resources/log4j2-json-layout.xml
@@ -16,7 +16,7 @@
  limitations under the License.
 
 -->
-<Configuration status="INFO" packages="">
+<Configuration status="INFO">
   <Appenders>
     <File name="stdout" ignoreExceptions="false" fileName="target/test-json-layout.log" append="false">
       <JsonLayout compact="true" eventEol="true" />
diff --git a/log4j-layout-jackson-xml/src/test/resources/log4j2-xml-layout.xml b/log4j-layout-jackson-xml/src/test/resources/log4j2-xml-layout.xml
index f0b17095ad..228e0b0693 100644
--- a/log4j-layout-jackson-xml/src/test/resources/log4j2-xml-layout.xml
+++ b/log4j-layout-jackson-xml/src/test/resources/log4j2-xml-layout.xml
@@ -16,7 +16,7 @@
  limitations under the License.
 
 -->
-<Configuration status="INFO" packages="">
+<Configuration status="INFO">
   <Appenders>
     <File name="stdout" ignoreExceptions="false" fileName="target/test-xml-layout.log" append="false">
       <XmlLayout compact="true" eventEol="true" />
diff --git a/log4j-layout-jackson-yaml/src/test/resources/log4j2-yaml-layout.xml b/log4j-layout-jackson-yaml/src/test/resources/log4j2-yaml-layout.xml
index f01d1e67ab..8e3b0b367a 100644
--- a/log4j-layout-jackson-yaml/src/test/resources/log4j2-yaml-layout.xml
+++ b/log4j-layout-jackson-yaml/src/test/resources/log4j2-yaml-layout.xml
@@ -16,7 +16,7 @@
  limitations under the License.
 
 -->
-<Configuration status="INFO" packages="">
+<Configuration status="INFO">
   <Appenders>
     <File name="stdout" ignoreExceptions="false" fileName="target/test-yaml-layout.log" append="false">
       <YamlLayout compact="true" eventEol="true" />
diff --git a/log4j-plugins-test/src/test/java/org/apache/logging/log4j/plugins/di/InjectorTest.java b/log4j-plugins-test/src/test/java/org/apache/logging/log4j/plugins/di/InjectorTest.java
index b92ebe95b6..5166d69346 100644
--- a/log4j-plugins-test/src/test/java/org/apache/logging/log4j/plugins/di/InjectorTest.java
+++ b/log4j-plugins-test/src/test/java/org/apache/logging/log4j/plugins/di/InjectorTest.java
@@ -862,7 +862,6 @@ class InjectorTest {
     @Test
     void namespaceQualifierInjection() {
         final ContainerPluginBeanInjection instance = DI.createInjector()
-                .registerBinding(Keys.PLUGIN_PACKAGES_KEY, () -> List.of(BaseBean.class.getPackageName()))
                 .getInstance(ContainerPluginBeanInjection.class);
         assertThat(instance.list).hasSize(3).first().isInstanceOf(BetaBean.class);
         assertThat(instance.collection).containsExactlyElementsOf(instance.list);
diff --git a/log4j-plugins/src/main/java/org/apache/logging/log4j/plugins/di/DefaultInjector.java b/log4j-plugins/src/main/java/org/apache/logging/log4j/plugins/di/DefaultInjector.java
index 12bc867140..0cde8a2e79 100644
--- a/log4j-plugins/src/main/java/org/apache/logging/log4j/plugins/di/DefaultInjector.java
+++ b/log4j-plugins/src/main/java/org/apache/logging/log4j/plugins/di/DefaultInjector.java
@@ -305,19 +305,14 @@ class DefaultInjector implements Injector {
     }
 
     private Supplier<PluginNamespace> createPluginNamespaceFactory(final Key<PluginNamespace> key) {
-        return Lazy.lazy(() -> getInstance(PluginRegistry.class).getNamespace(key.getNamespace(), getPluginPackages()))::value;
-    }
-
-    private List<String> getPluginPackages() {
-        final Binding<List<String>> pluginPackagesBinding = bindingMap.get(Keys.PLUGIN_PACKAGES_KEY, List.of());
-        return pluginPackagesBinding != null ? pluginPackagesBinding.getSupplier().get() : List.of();
+        return Lazy.lazy(() -> getInstance(PluginRegistry.class).getNamespace(key.getNamespace()))::value;
     }
 
     private <T> Stream<PluginType<T>> streamPluginsFromNamespace(final Key<T> itemKey) {
         if (itemKey == null) {
             return Stream.empty();
         }
-        final PluginNamespace namespace = getInstance(PluginRegistry.class).getNamespace(itemKey.getNamespace(), getPluginPackages());
+        final PluginNamespace namespace = getInstance(PluginRegistry.class).getNamespace(itemKey.getNamespace());
         final Type type = itemKey.getType();
         return namespace.stream()
                 .filter(pluginType -> TypeUtil.isAssignable(type, pluginType.getPluginClass()))
diff --git a/log4j-plugins/src/main/java/org/apache/logging/log4j/plugins/di/Keys.java b/log4j-plugins/src/main/java/org/apache/logging/log4j/plugins/di/Keys.java
index 7b0bc5d63f..4ab14d0e83 100644
--- a/log4j-plugins/src/main/java/org/apache/logging/log4j/plugins/di/Keys.java
+++ b/log4j-plugins/src/main/java/org/apache/logging/log4j/plugins/di/Keys.java
@@ -47,9 +47,6 @@ public final class Keys {
     public static final String SUBSTITUTOR_NAME = "StringSubstitutor";
     public static final Key<Function<String, String>> SUBSTITUTOR_KEY = new @Named(SUBSTITUTOR_NAME) Key<>() {};
 
-    public static final String PLUGIN_PACKAGES_NAME = "PluginPackages";
-    public static final Key<List<String>> PLUGIN_PACKAGES_KEY = new @Named(PLUGIN_PACKAGES_NAME) Key<>() {};
-
     public static String getNamespace(final AnnotatedElement element) {
         return Optional.ofNullable(AnnotationUtil.getLogicalAnnotation(element, Namespace.class))
                 .map(Namespace::value)
diff --git a/log4j-plugins/src/main/java/org/apache/logging/log4j/plugins/model/PluginRegistry.java b/log4j-plugins/src/main/java/org/apache/logging/log4j/plugins/model/PluginRegistry.java
index ae44270768..1850437a54 100644
--- a/log4j-plugins/src/main/java/org/apache/logging/log4j/plugins/model/PluginRegistry.java
+++ b/log4j-plugins/src/main/java/org/apache/logging/log4j/plugins/model/PluginRegistry.java
@@ -248,7 +248,7 @@ public class PluginRegistry {
      * Gets the registered plugins for the given namespace. If additional scan packages are provided, then plugins
      * are scanned and loaded from there as well.
      */
-    public PluginNamespace getNamespace(final String namespace, final List<String> additionalScanPackages) {
+    public PluginNamespace getNamespace(final String namespace) {
         final var pluginNamespace = new PluginNamespace(namespace);
 
         // First, iterate the PluginService services and legacy Log4j2Plugin.dat files found in the main CLASSPATH
@@ -260,17 +260,6 @@ public class PluginRegistry {
         // Next, iterate OSGi modules that provide plugins as OSGi services
         namespacesByBundleId.values().forEach(bundle -> pluginNamespace.mergeAll(bundle.get(namespace)));
 
-        // Finally, iterate over additional packages from configuration
-        if (additionalScanPackages != null) {
-            for (final String pkg : additionalScanPackages) {
-                pluginNamespace.mergeAll(namespacesByPackage.computeIfAbsent(pkg, ignored -> {
-                    final var bundle = new Namespaces();
-                    loadFromPackage(bundle, pkg);
-                    return bundle;
-                }).get(namespace));
-            }
-        }
-
         LOGGER.debug("Discovered {} plugins in namespace '{}'", box(pluginNamespace.size()), namespace);
 
         return pluginNamespace;
diff --git a/log4j-slf4j-impl/src/test/resources/log4j2-1482.xml b/log4j-slf4j-impl/src/test/resources/log4j2-1482.xml
index e17953ca93..209b9b49ca 100644
--- a/log4j-slf4j-impl/src/test/resources/log4j2-1482.xml
+++ b/log4j-slf4j-impl/src/test/resources/log4j2-1482.xml
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<Configuration status="warn" name="MyApp" packages="">
+<Configuration status="warn" name="MyApp">
   <Properties>
     <Property name="audit-path">target/log4j2-1482</Property>
     <Property name="file-name">audit</Property>
diff --git a/log4j-slf4j2-impl/src/test/resources/log4j2-1482.xml b/log4j-slf4j2-impl/src/test/resources/log4j2-1482.xml
index e17953ca93..209b9b49ca 100644
--- a/log4j-slf4j2-impl/src/test/resources/log4j2-1482.xml
+++ b/log4j-slf4j2-impl/src/test/resources/log4j2-1482.xml
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<Configuration status="warn" name="MyApp" packages="">
+<Configuration status="warn" name="MyApp">
   <Properties>
     <Property name="audit-path">target/log4j2-1482</Property>
     <Property name="file-name">audit</Property>
diff --git a/log4j-taglib/src/test/resources/log4j-test1.xml b/log4j-taglib/src/test/resources/log4j-test1.xml
index f8ae21f5e0..74e5ec7165 100644
--- a/log4j-taglib/src/test/resources/log4j-test1.xml
+++ b/log4j-taglib/src/test/resources/log4j-test1.xml
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<Configuration packages="org.apache.logging.log4j.test" status="warn" name="TaglibLoggerTest">
+<Configuration status="warn" name="TaglibLoggerTest">
   <properties>
     <property name="filename">target/test.log</property>
   </properties>
diff --git a/src/site/asciidoc/manual/appenders.adoc b/src/site/asciidoc/manual/appenders.adoc
index 96690a65a8..c314f0f7e9 100644
--- a/src/site/asciidoc/manual/appenders.adoc
+++ b/src/site/asciidoc/manual/appenders.adoc
@@ -128,7 +128,7 @@ A typical AsyncAppender configuration might look like:
 [source,xml]
 ----
 <?xml version="1.0" encoding="UTF-8"?>
-<Configuration status="warn" name="MyApp" packages="">
+<Configuration status="warn" name="MyApp">
   <Appenders>
     <File name="MyFile" fileName="logs/app.log">
       <PatternLayout>
@@ -380,7 +380,7 @@ A typical Console configuration might look like:
 [source,prettyprint,linenums]
 ----
 <?xml version="1.0" encoding="UTF-8"?>
-<Configuration status="warn" name="MyApp" packages="">
+<Configuration status="warn" name="MyApp">
   <Appenders>
     <Console name="STDOUT" target="SYSTEM_OUT">
       <PatternLayout pattern="%m%n"/>
@@ -432,7 +432,7 @@ A Failover configuration might look like:
 [source,xml]
 ----
 <?xml version="1.0" encoding="UTF-8"?>
-<Configuration status="warn" name="MyApp" packages="">
+<Configuration status="warn" name="MyApp">
   <Appenders>
     <RollingFile name="RollingFile" fileName="logs/app.log" filePattern="logs/app-%d{MM-dd-yyyy}.log.gz"
                  ignoreExceptions="false">
@@ -574,7 +574,7 @@ Here is a sample File configuration:
 [source,xml]
 ----
 <?xml version="1.0" encoding="UTF-8"?>
-<Configuration status="warn" name="MyApp" packages="">
+<Configuration status="warn" name="MyApp">
   <Appenders>
     <File name="MyFile" fileName="logs/app.log">
       <PatternLayout>
@@ -748,7 +748,7 @@ RFC5424Layout, and persists encrypted events to disk:
 [source,xml]
 ----
 <?xml version="1.0" encoding="UTF-8"?>
-<Configuration status="warn" name="MyApp" packages="">
+<Configuration status="warn" name="MyApp">
   <Appenders>
     <Flume name="eventLogger" compress="true" type="persistent" dataDir="./logData">
       <Agent host="192.168.10.101" port="8800"/>
@@ -772,7 +772,7 @@ RFC5424Layout and passes the events to an embedded Flume Agent.
 [source,xml]
 ----
 <?xml version="1.0" encoding="UTF-8"?>
-<Configuration status="warn" name="MyApp" packages="">
+<Configuration status="warn" name="MyApp">
   <Appenders>
     <Flume name="eventLogger" compress="true" type="Embedded">
       <Agent host="192.168.10.101" port="8800"/>
@@ -802,7 +802,7 @@ an embedded Flume Agent.
 [source,xml]
 ----
 <?xml version="1.0" encoding="UTF-8"?>
-<Configuration status="error" name="MyApp" packages="">
+<Configuration status="error" name="MyApp">
   <Appenders>
     <Flume name="eventLogger" compress="true" type="Embedded">
       <Property name="channels">file</Property>
@@ -1832,7 +1832,7 @@ Here is a sample MemoryMappedFile configuration:
 [source,prettyprint,linenums]
 ----
 <?xml version="1.0" encoding="UTF-8"?>
-<Configuration status="warn" name="MyApp" packages="">
+<Configuration status="warn" name="MyApp">
   <Appenders>
     <MemoryMappedFile name="MyFile" fileName="logs/app.log">
       <PatternLayout>
@@ -2277,7 +2277,7 @@ Here is a sample RandomAccessFile configuration:
 [source,prettyprint,linenums]
 ----
 <?xml version="1.0" encoding="UTF-8"?>
-<Configuration status="warn" name="MyApp" packages="">
+<Configuration status="warn" name="MyApp">
   <Appenders>
     <RandomAccessFile name="MyFile" fileName="logs/app.log">
       <PatternLayout>
@@ -2354,7 +2354,7 @@ product key and its value to the MapMessage.:
 [source,prettyprint,linenums]
 ----
 <?xml version="1.0" encoding="UTF-8"?>
-<Configuration status="warn" name="MyApp" packages="">
+<Configuration status="warn" name="MyApp">
   <Appenders>
     <Console name="STDOUT" target="SYSTEM_OUT">
       <PatternLayout pattern="%m%n"/>
@@ -2395,7 +2395,7 @@ product key and its value to the MapMessage:
 [source,prettyprint,linenums]
 ----
 <?xml version="1.0" encoding="UTF-8"?>
-<Configuration status="warn" name="MyApp" packages="">
+<Configuration status="warn" name="MyApp">
   <Appenders>
     <Console name="STDOUT" target="SYSTEM_OUT">
       <PatternLayout pattern="%m%n"/>
@@ -2872,7 +2872,7 @@ the current year and month, and will compress each archive using gzip:
 [source,prettyprint,linenums]
 ----
 <?xml version="1.0" encoding="UTF-8"?>
-<Configuration status="warn" name="MyApp" packages="">
+<Configuration status="warn" name="MyApp">
   <Appenders>
     <RollingFile name="RollingFile" fileName="logs/app.log"
                  filePattern="logs/$${date:yyyy-MM}/app-%d{MM-dd-yyyy}-%i.log.gz">
@@ -2899,7 +2899,7 @@ files before removing them.
 [source,prettyprint,linenums]
 ----
 <?xml version="1.0" encoding="UTF-8"?>
-<Configuration status="warn" name="MyApp" packages="">
+<Configuration status="warn" name="MyApp">
   <Appenders>
     <RollingFile name="RollingFile" fileName="logs/app.log"
                  filePattern="logs/$${date:yyyy-MM}/app-%d{MM-dd-yyyy}-%i.log.gz">
@@ -2930,7 +2930,7 @@ and will roll every 6 hours when the hour is divisible by 6:
 [source,prettyprint,linenums]
 ----
 <?xml version="1.0" encoding="UTF-8"?>
-<Configuration status="warn" name="MyApp" packages="">
+<Configuration status="warn" name="MyApp">
   <Appenders>
     <RollingFile name="RollingFile" fileName="logs/app.log"
                  filePattern="logs/$${date:yyyy-MM}/app-%d{yyyy-MM-dd-HH}-%i.log.gz">
@@ -2959,7 +2959,7 @@ while the file size is limited to 250MB:
 [source,prettyprint,linenums]
 ----
 <?xml version="1.0" encoding="UTF-8"?>
-<Configuration status="warn" name="MyApp" packages="">
+<Configuration status="warn" name="MyApp">
   <Appenders>
     <RollingFile name="RollingFile" filePattern="logs/app-%d{yyyy-MM-dd-HH}-%i.log.gz">
       <PatternLayout>
@@ -2985,7 +2985,7 @@ number of files saved each hour to 10:
 [source,prettyprint,linenums]
 ----
 <?xml version="1.0" encoding="UTF-8"?>
-<Configuration status="warn" name="MyApp" packages="">
+<Configuration status="warn" name="MyApp">
   <Appenders>
     <RollingFile name="RollingFile" filePattern="logs/app-%d{yyyy-MM-dd-HH}-%i.log.gz">
       <PatternLayout>
@@ -3187,7 +3187,7 @@ and are 60 days old or older are deleted at rollover time.
 [source,prettyprint,linenums]
 ----
 <?xml version="1.0" encoding="UTF-8"?>
-<Configuration status="warn" name="MyApp" packages="">
+<Configuration status="warn" name="MyApp">
   <Properties>
     <Property name="baseDir">logs</Property>
   </Properties>
@@ -3224,7 +3224,7 @@ comes first.
 [source,prettyprint,linenums]
 ----
 <?xml version="1.0" encoding="UTF-8"?>
-<Configuration status="warn" name="MyApp" packages="">
+<Configuration status="warn" name="MyApp">
   <Properties>
     <Property name="baseDir">logs</Property>
   </Properties>
@@ -3314,7 +3314,7 @@ by the script.
 [source,prettyprint,linenums]
 ----
 <?xml version="1.0" encoding="UTF-8"?>
-<Configuration status="trace" name="MyApp" packages="">
+<Configuration status="trace" name="MyApp">
   <Properties>
     <Property name="baseDir">logs</Property>
   </Properties>
@@ -3439,7 +3439,7 @@ files.
 [source,prettyprint,linenums]
 ----
 <?xml version="1.0" encoding="UTF-8"?>
-<Configuration status="trace" name="MyApp" packages="">
+<Configuration status="trace" name="MyApp">
   <Properties>
     <Property name="baseDir">logs</Property>
   </Properties>
@@ -3613,7 +3613,7 @@ will compress each archive using gzip:
 [source,prettyprint,linenums]
 ----
 <?xml version="1.0" encoding="UTF-8"?>
-<Configuration status="warn" name="MyApp" packages="">
+<Configuration status="warn" name="MyApp">
   <Appenders>
     <RollingRandomAccessFile name="RollingRandomAccessFile" fileName="logs/app.log"
                  filePattern="logs/$${date:yyyy-MM}/app-%d{MM-dd-yyyy}-%i.log.gz">
@@ -3640,7 +3640,7 @@ files before removing them.
 [source,prettyprint,linenums]
 ----
 <?xml version="1.0" encoding="UTF-8"?>
-<Configuration status="warn" name="MyApp" packages="">
+<Configuration status="warn" name="MyApp">
   <Appenders>
     <RollingRandomAccessFile name="RollingRandomAccessFile" fileName="logs/app.log"
                  filePattern="logs/$${date:yyyy-MM}/app-%d{MM-dd-yyyy}-%i.log.gz">
@@ -3672,7 +3672,7 @@ the hour is divisible by 6:
 [source,prettyprint,linenums]
 ----
 <?xml version="1.0" encoding="UTF-8"?>
-<Configuration status="warn" name="MyApp" packages="">
+<Configuration status="warn" name="MyApp">
   <Appenders>
     <RollingRandomAccessFile name="RollingRandomAccessFile" fileName="logs/app.log"
                  filePattern="logs/$${date:yyyy-MM}/app-%d{yyyy-MM-dd-HH}-%i.log.gz">
@@ -3888,7 +3888,7 @@ created as needed.
 [source,prettyprint,linenums]
 ----
 <?xml version="1.0" encoding="UTF-8"?>
-<Configuration status="warn" name="MyApp" packages="">
+<Configuration status="warn" name="MyApp">
   <Appenders>
     <Flume name="AuditLogger" compress="true">
       <Agent host="192.168.10.101" port="8800"/>
@@ -3998,7 +3998,7 @@ Appender in a link:#FailoverAppender[FailoverAppender].
 [source,prettyprint,linenums]
 ----
 <?xml version="1.0" encoding="UTF-8"?>
-<Configuration status="warn" name="MyApp" packages="">
+<Configuration status="warn" name="MyApp">
   <Appenders>
     <SMTP name="Mail" subject="Error Log" to="errors@logging.apache.org" from="test@logging.apache.org"
           smtpHost="localhost" smtpPort="25" bufferSize="50">
@@ -4127,7 +4127,7 @@ This is an unsecured TCP configuration:
 [source,prettyprint,linenums]
 ----
 <?xml version="1.0" encoding="UTF-8"?>
-<Configuration status="warn" name="MyApp" packages="">
+<Configuration status="warn" name="MyApp">
   <Appenders>
     <Socket name="socket" host="localhost" port="9500">
       <JsonLayout properties="true"/>
@@ -4146,7 +4146,7 @@ This is a secured link:#SSL[SSL] configuration:
 [source,prettyprint,linenums]
 ----
 <?xml version="1.0" encoding="UTF-8"?>
-<Configuration status="warn" name="MyApp" packages="">
+<Configuration status="warn" name="MyApp">
   <Appenders>
     <Socket name="socket" host="localhost" port="9500">
       <JsonLayout properties="true"/>
@@ -4404,7 +4404,7 @@ A sample syslogAppender configuration that is configured with two
 [source,xml]
 ----
 <?xml version="1.0" encoding="UTF-8"?>
-<Configuration status="warn" name="MyApp" packages="">
+<Configuration status="warn" name="MyApp">
   <Appenders>
     <Syslog name="bsd" host="localhost" port="514" protocol="TCP"/>
     <Syslog name="RFC5424" format="RFC5424" host="localhost" port="8514"
@@ -4430,7 +4430,7 @@ conforms with either the BSD Syslog format or the RFC 5424 format.
 [source,xml]
 ----
 <?xml version="1.0" encoding="UTF-8"?>
-<Configuration status="warn" name="MyApp" packages="">
+<Configuration status="warn" name="MyApp">
   <Appenders>
     <Syslog name="bsd" host="localhost" port="6514" protocol="SSL">
       <SSL>
diff --git a/src/site/asciidoc/manual/configuration.adoc b/src/site/asciidoc/manual/configuration.adoc
index 429166cca9..3106622e93 100644
--- a/src/site/asciidoc/manual/configuration.adoc
+++ b/src/site/asciidoc/manual/configuration.adoc
@@ -598,11 +598,6 @@ elapse before the file configuration is checked for changes.
 |name
 |The name of the configuration.
 
-|packages
-|A comma separated list of package names to search for
-plugins. Plugins are only loaded once per classloader so changing this
-value may not have any effect upon reconfiguration.
-
 |schema
 |Identifies the location for the classloader to located the XML
 Schema to use to validate the configuration. Only valid when strict is
diff --git a/src/site/asciidoc/manual/filters.adoc b/src/site/asciidoc/manual/filters.adoc
index f713fe0e29..89a3b569ca 100644
--- a/src/site/asciidoc/manual/filters.adoc
+++ b/src/site/asciidoc/manual/filters.adoc
@@ -85,7 +85,7 @@ A configuration containing the BurstFilter might look like:
 [source,xml]
 ----
 <?xml version="1.0" encoding="UTF-8"?>
-<Configuration status="warn" name="MyApp" packages="">
+<Configuration status="warn" name="MyApp">
   <Appenders>
     <RollingFile name="RollingFile" fileName="logs/app.log"
                  filePattern="logs/app-%d{MM-dd-yyyy}.log.gz">
@@ -116,7 +116,7 @@ A configuration containing the CompositeFilter might look like:
 [source,xml]
 ----
 <?xml version="1.0" encoding="UTF-8"?>
-<Configuration status="warn" name="MyApp" packages="">
+<Configuration status="warn" name="MyApp">
   <Filters>
     <MarkerFilter marker="EVENT" onMatch="ACCEPT" onMismatch="NEUTRAL"/>
     <DynamicThresholdFilter key="loginId" defaultThreshold="ERROR"
@@ -197,7 +197,7 @@ Here is a sample configuration containing the DynamicThresholdFilter:
 [source,xml]
 ----
 <?xml version="1.0" encoding="UTF-8"?>
-<Configuration status="warn" name="MyApp" packages="">
+<Configuration status="warn" name="MyApp">
   <DynamicThresholdFilter key="loginId" defaultThreshold="ERROR"
                           onMatch="ACCEPT" onMismatch="NEUTRAL">
     <KeyValuePair key="User1" value="DEBUG"/>
@@ -261,7 +261,7 @@ events:
 [source,xml]
 ----
 <?xml version="1.0" encoding="UTF-8"?>
-<Configuration status="warn" name="MyApp" packages="">
+<Configuration status="warn" name="MyApp">
   <MapFilter onMatch="ACCEPT" onMismatch="NEUTRAL" operator="or">
     <KeyValuePair key="eventId" value="Login"/>
     <KeyValuePair key="eventId" value="Logout"/>
@@ -290,7 +290,7 @@ preceding example since the only logger configured is the root.
 [source,xml]
 ----
 <?xml version="1.0" encoding="UTF-8"?>
-<Configuration status="warn" name="MyApp" packages="">
+<Configuration status="warn" name="MyApp">
   <Appenders>
     <RollingFile name="RollingFile" fileName="logs/app.log"
                  filePattern="logs/app-%d{MM-dd-yyyy}.log.gz">
@@ -321,7 +321,7 @@ root is only configured with a single appender reference.
 [source,xml]
 ----
 <?xml version="1.0" encoding="UTF-8"?>
-<Configuration status="warn" name="MyApp" packages="">
+<Configuration status="warn" name="MyApp">
   <Appenders>
     <RollingFile name="RollingFile" fileName="logs/app.log"
                  filePattern="logs/app-%d{MM-dd-yyyy}.log.gz">
@@ -378,7 +378,7 @@ appender if the Marker matches:
 [source,xml]
 ----
 <?xml version="1.0" encoding="UTF-8"?>
-<Configuration status="warn" name="MyApp" packages="">
+<Configuration status="warn" name="MyApp">
   <Appenders>
     <RollingFile name="RollingFile" fileName="logs/app.log"
                  filePattern="logs/app-%d{MM-dd-yyyy}.log.gz">
@@ -438,7 +438,7 @@ appender if the Marker matches:
 [source,xml]
 ----
 <?xml version="1.0" encoding="UTF-8"?>
-<Configuration status="warn" name="MyApp" packages="">
+<Configuration status="warn" name="MyApp">
   <MutableContextMapFilter onMatch="ACCEPT" onMismatch="NEUTRAL" operator="or"
     configLocation="http://localhost:8080/threadContextFilter.json" pollInterval="300"/>
   <Appenders>
@@ -496,7 +496,7 @@ appender if no marker is there:
 [source,xml]
 ----
 <?xml version="1.0" encoding="UTF-8"?>
-<Configuration status="warn" name="MyApp" packages="">
+<Configuration status="warn" name="MyApp">
   <Appenders>
     <RollingFile name="RollingFile" fileName="logs/app.log"
                  filePattern="logs/app-%d{MM-dd-yyyy}.log.gz">
@@ -553,7 +553,7 @@ appender if it contains the word "test":
 [source,xml]
 ----
 <?xml version="1.0" encoding="UTF-8"?>
-<Configuration status="warn" name="MyApp" packages="">
+<Configuration status="warn" name="MyApp">
   <Appenders>
     <RollingFile name="RollingFile" fileName="logs/app.log"
                  filePattern="logs/app-%d{MM-dd-yyyy}.log.gz">
@@ -734,7 +734,7 @@ particular events:
 [source,xml]
 ----
 <?xml version="1.0" encoding="UTF-8"?>
-<Configuration status="warn" name="MyApp" packages="">
+<Configuration status="warn" name="MyApp">
   <StructuredDataFilter onMatch="ACCEPT" onMismatch="NEUTRAL" operator="or">
     <KeyValuePair key="id" value="Login"/>
     <KeyValuePair key="id" value="Logout"/>
@@ -798,7 +798,7 @@ A configuration containing the ContextMapFilter might look like:
 [source,xml]
 ----
 <?xml version="1.0" encoding="UTF-8"?>
-<Configuration status="warn" name="MyApp" packages="">
+<Configuration status="warn" name="MyApp">
   <ContextMapFilter onMatch="ACCEPT" onMismatch="NEUTRAL" operator="or">
     <KeyValuePair key="User1" value="DEBUG"/>
     <KeyValuePair key="User2" value="WARN"/>
@@ -826,7 +826,7 @@ The ContextMapFilter can also be applied to a logger for filtering:
 [source,xml]
 ----
 <?xml version="1.0" encoding="UTF-8"?>
-<Configuration status="warn" name="MyApp" packages="">
+<Configuration status="warn" name="MyApp">
   <Appenders>
     <RollingFile name="RollingFile" fileName="logs/app.log"
                  filePattern="logs/app-%d{MM-dd-yyyy}.log.gz">
@@ -885,7 +885,7 @@ appender if the level matches:
 [source,xml]
 ----
 <?xml version="1.0" encoding="UTF-8"?>
-<Configuration status="warn" name="MyApp" packages="">
+<Configuration status="warn" name="MyApp">
   <Appenders>
     <RollingFile name="RollingFile" fileName="logs/app.log"
                  filePattern="logs/app-%d{MM-dd-yyyy}.log.gz">
@@ -946,7 +946,7 @@ appender from 5:00 to 5:30 am each day using the default timezone:
 [source,xml]
 ----
 <?xml version="1.0" encoding="UTF-8"?>
-<Configuration status="warn" name="MyApp" packages="">
+<Configuration status="warn" name="MyApp">
   <Appenders>
     <RollingFile name="RollingFile" fileName="logs/app.log"
                  filePattern="logs/app-%d{MM-dd-yyyy}.log.gz">
diff --git a/src/site/asciidoc/manual/plugins.adoc b/src/site/asciidoc/manual/plugins.adoc
index 73fec5ec51..3185575c79 100644
--- a/src/site/asciidoc/manual/plugins.adoc
+++ b/src/site/asciidoc/manual/plugins.adoc
@@ -29,7 +29,7 @@ link:../log4j-core/apidocs/org/apache/logging/log4j/core/config/Configuration.ht
 will invoke the
 link:../log4j-plugins/apidocs/org/apache/logging/log4j/plugins/util/PluginRegistry.html[`PluginRegistry`]
 to load the built-in Log4j plugins as well as any custom plugins. The
-`Injector` locates plugins by looking in five places:
+`Injector` locates plugins by looking in the following places:
 
 1.  Plugin collection classes on the classpath that are loaded by java.util.ServiceLoader.
 These classes are generated automatically during the build (more details below).
@@ -37,12 +37,7 @@ These classes are generated automatically during the build (more details below).
 bundle. A `BundleListener` is added on activation to continue checking
 new bundles after `log4j-plugins` has started. Bundles must register their plugin collection
 class as an OSGi service.
-3.  A comma-separated list of packages specified by the
-`log4j.plugin.packages` system property.
-4.  Packages from the `@Named("PluginPackages") List<String>` binding in `Injector` (if provided before configuration occurs).
-5.  The link:./configuration.html#ConfigurationSyntax[packages] declared
-in your log4j2 configuration file.
-6. Serialized plugin listing files on the classpath. These files were generated by
+3. Serialized plugin listing files on the classpath. These files were generated by
 the plugin annotation processor in Log4j 2 2.x. These are processed to allow
 compatibility.