> map = new HashMap<>();
PlexusConfiguration[] tools = configuration.getChildren();
diff --git a/src/main/java/org/apache/maven/plugins/toolchain/ToolchainsComponentConfigurator.java b/src/main/java/org/apache/maven/plugins/toolchain/ToolchainsComponentConfigurator.java
new file mode 100644
index 0000000..524ca00
--- /dev/null
+++ b/src/main/java/org/apache/maven/plugins/toolchain/ToolchainsComponentConfigurator.java
@@ -0,0 +1,45 @@
+/*
+ * 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.maven.plugins.toolchain;
+
+import javax.inject.Inject;
+import javax.inject.Named;
+import javax.inject.Singleton;
+
+import org.codehaus.plexus.component.configurator.BasicComponentConfigurator;
+import org.codehaus.plexus.component.configurator.converters.ConfigurationConverter;
+import org.codehaus.plexus.component.configurator.converters.lookup.DefaultConverterLookup;
+
+/**
+ * A configurator for components that handles toolchain requirements specified in Maven configuration.
+ *
+ * An instance of {@code ConfigurationConverter} for toolchain requirements
+ * is injected into this configurator, and the required converter is registered
+ * during the instantiation process.
+ */
+@Named("toolchains-requirement-configurator")
+@Singleton
+public class ToolchainsComponentConfigurator extends BasicComponentConfigurator {
+
+ @Inject
+ public ToolchainsComponentConfigurator(@Named("ToolchainsRequirement") ConfigurationConverter toolchainConverter) {
+ this.converterLookup = new DefaultConverterLookup();
+ this.converterLookup.registerConverter(toolchainConverter);
+ }
+}
diff --git a/src/main/java/org/apache/maven/plugins/toolchain/ToolchainsRequirement.java b/src/main/java/org/apache/maven/plugins/toolchain/ToolchainsRequirement.java
index 2016ce1..bb93242 100644
--- a/src/main/java/org/apache/maven/plugins/toolchain/ToolchainsRequirement.java
+++ b/src/main/java/org/apache/maven/plugins/toolchain/ToolchainsRequirement.java
@@ -42,4 +42,9 @@ public Set getToolchainsTypes() {
public Map getParams(String type) {
return Collections.unmodifiableMap(toolchains.get(type));
}
+
+ @Override
+ public String toString() {
+ return "ToolchainsRequirement{toolchains=" + toolchains + '}';
+ }
}
diff --git a/src/main/resources/META-INF/plexus/components.xml b/src/main/resources/META-INF/plexus/components.xml
deleted file mode 100644
index 8d96957..0000000
--- a/src/main/resources/META-INF/plexus/components.xml
+++ /dev/null
@@ -1,53 +0,0 @@
-
-
-
-
-
- org.codehaus.plexus.component.configurator.ComponentConfigurator
- toolchains-requirement-configurator
- org.codehaus.plexus.component.configurator.BasicComponentConfigurator
-
-
- org.codehaus.plexus.component.configurator.converters.lookup.ConverterLookup
- toolchains-requirement-configurator
-
-
-
-
-
- org.codehaus.plexus.component.configurator.converters.lookup.ConverterLookup
- toolchains-requirement-configurator
- org.codehaus.plexus.component.configurator.converters.lookup.DefaultConverterLookup
-
-
- org.codehaus.plexus.component.configurator.converters.ConfigurationConverter
- ToolchainsRequirement
- customConverters
-
-
-
-
-
- org.codehaus.plexus.component.configurator.converters.ConfigurationConverter
- ToolchainsRequirement
- org.apache.maven.plugins.toolchain.ToolchainConverter
-
-
-