You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by mt...@apache.org on 2021/10/13 10:38:11 UTC

[maven] branch MNG-6389-introduce-seperate-toolchain-artifact updated (78de56c -> b4a753a)

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

mthmulders pushed a change to branch MNG-6389-introduce-seperate-toolchain-artifact
in repository https://gitbox.apache.org/repos/asf/maven.git.


 discard 78de56c  [MNG-6389] Resolve PR feedback
 discard 9502e10  [MNG-6389] Remove files that were supposed to be moved
     new c26cfce  [MNG-6389] Isolate test from model reading code
     new 3c818a2  [MNG-6389] Remove files that were supposed to be moved
     new b4a753a  [MNG-6389] Resolve PR feedback

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (78de56c)
            \
             N -- N -- N   refs/heads/MNG-6389-introduce-seperate-toolchain-artifact (b4a753a)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../maven/toolchain/DefaultToolchainTest.java      |  48 ++--
 .../building/DefaultToolchainsBuilderTest.java     | 283 ---------------------
 .../building/ToolchainsBuildingExceptionTest.java  |  73 ------
 .../org/apache/maven/toolchain/global.xml          |  35 ---
 .../toolchain/model/toolchains-jdks-extra.xml      |  45 ----
 .../maven/toolchain/model/toolchains-jdks.xml      |  43 ----
 .../resources/org/apache/maven/toolchain/user.xml  |  35 ---
 .../toolchain/merge/MavenToolchainMerger.java      |   2 +-
 8 files changed, 29 insertions(+), 535 deletions(-)
 delete mode 100644 maven-core/src/test/java/org/apache/maven/toolchain/building/DefaultToolchainsBuilderTest.java
 delete mode 100644 maven-core/src/test/java/org/apache/maven/toolchain/building/ToolchainsBuildingExceptionTest.java
 delete mode 100644 maven-core/src/test/resources/org/apache/maven/toolchain/global.xml
 delete mode 100644 maven-core/src/test/resources/org/apache/maven/toolchain/model/toolchains-jdks-extra.xml
 delete mode 100644 maven-core/src/test/resources/org/apache/maven/toolchain/model/toolchains-jdks.xml
 delete mode 100644 maven-core/src/test/resources/org/apache/maven/toolchain/user.xml

[maven] 01/03: [MNG-6389] Isolate test from model reading code

Posted by mt...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

mthmulders pushed a commit to branch MNG-6389-introduce-seperate-toolchain-artifact
in repository https://gitbox.apache.org/repos/asf/maven.git

commit c26cfcedc3b7fdacd33bb4435d592a4feb0bfdc5
Author: Maarten Mulders <mt...@apache.org>
AuthorDate: Wed Oct 13 12:30:42 2021 +0200

    [MNG-6389] Isolate test from model reading code
---
 .../maven/toolchain/DefaultToolchainTest.java      | 48 +++++++++++++---------
 1 file changed, 28 insertions(+), 20 deletions(-)

diff --git a/maven-core/src/test/java/org/apache/maven/toolchain/DefaultToolchainTest.java b/maven-core/src/test/java/org/apache/maven/toolchain/DefaultToolchainTest.java
index 29f0fc6..f335003 100644
--- a/maven-core/src/test/java/org/apache/maven/toolchain/DefaultToolchainTest.java
+++ b/maven-core/src/test/java/org/apache/maven/toolchain/DefaultToolchainTest.java
@@ -25,13 +25,11 @@ import static org.junit.jupiter.api.Assertions.assertNotEquals;
 import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.verify;
 
-import java.io.InputStream;
 import java.util.Collections;
 
 import org.apache.maven.toolchain.java.DefaultJavaToolChain;
-import org.apache.maven.toolchain.model.PersistedToolchains;
 import org.apache.maven.toolchain.model.ToolchainModel;
-import org.apache.maven.toolchain.model.io.xpp3.MavenToolchainsXpp3Reader;
+import org.codehaus.plexus.util.xml.Xpp3Dom;
 import org.junit.jupiter.api.BeforeEach;
 import org.junit.jupiter.api.Test;
 import org.mockito.MockitoAnnotations;
@@ -41,8 +39,6 @@ public class DefaultToolchainTest
 {
     private final Logger logger = mock( Logger.class );
 
-    private MavenToolchainsXpp3Reader reader = new MavenToolchainsXpp3Reader();
-
     @BeforeEach
     public void setUp()
         throws Exception
@@ -129,21 +125,33 @@ public class DefaultToolchainTest
 
     @Test
     public void testEquals()
-        throws Exception
     {
-        try ( InputStream jdksIS = ToolchainModel.class.getResourceAsStream( "toolchains-jdks.xml" );
-              InputStream jdksExtraIS = ToolchainModel.class.getResourceAsStream( "toolchains-jdks-extra.xml" ) )
-        {
-            PersistedToolchains jdks = reader.read( jdksIS );
-            PersistedToolchains jdksExtra = reader.read( jdksExtraIS );
-
-            DefaultToolchain tc1 = new DefaultJavaToolChain( jdks.getToolchains().get( 0 ), null );
-            DefaultToolchain tc2 = new DefaultJavaToolChain( jdksExtra.getToolchains().get( 0 ), null );
-
-            assertEquals( tc1, tc1 );
-            assertNotEquals( tc1, tc2 );
-            assertNotEquals( tc2, tc1 );
-            assertEquals( tc2, tc2 );
-        }
+        ToolchainModel tm1 = new ToolchainModel();
+        tm1.setType( "jdk" );
+        tm1.addProvide( "version", "1.5" );
+        tm1.addProvide( "vendor", "sun" );
+        Xpp3Dom configuration1 = new Xpp3Dom("configuration");
+        Xpp3Dom jdkHome1 = new Xpp3Dom( "jdkHome" );
+        jdkHome1.setValue("${env.JAVA_HOME}");
+        configuration1.addChild( jdkHome1 );
+        tm1.setConfiguration( configuration1 );
+
+        ToolchainModel tm2 = new ToolchainModel();
+        tm1.setType( "jdk" );
+        tm1.addProvide( "version", "1.4" );
+        tm1.addProvide( "vendor", "sun" );
+        Xpp3Dom configuration2 = new Xpp3Dom("configuration");
+        Xpp3Dom jdkHome2 = new Xpp3Dom( "jdkHome" );
+        jdkHome2.setValue("${env.JAVA_HOME}");
+        configuration2.addChild( jdkHome2 );
+        tm2.setConfiguration( configuration2 );
+
+        DefaultToolchain tc1 = new DefaultJavaToolChain( tm1, null );
+        DefaultToolchain tc2 = new DefaultJavaToolChain( tm2, null );
+
+        assertEquals( tc1, tc1 );
+        assertNotEquals( tc1, tc2 );
+        assertNotEquals( tc2, tc1 );
+        assertEquals( tc2, tc2 );
     }
 }

[maven] 02/03: [MNG-6389] Remove files that were supposed to be moved

Posted by mt...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

mthmulders pushed a commit to branch MNG-6389-introduce-seperate-toolchain-artifact
in repository https://gitbox.apache.org/repos/asf/maven.git

commit 3c818a200f22c89f0704424bf0d8894cd2ed5613
Author: Maarten Mulders <mt...@apache.org>
AuthorDate: Wed Oct 13 11:53:37 2021 +0200

    [MNG-6389] Remove files that were supposed to be moved
---
 .../building/DefaultToolchainsBuilderTest.java     | 283 ---------------------
 .../building/ToolchainsBuildingExceptionTest.java  |  73 ------
 .../toolchain/merge/MavenToolchainMergerTest.java  | 135 ----------
 .../org/apache/maven/toolchain/global.xml          |  35 ---
 .../toolchain/model/toolchains-jdks-extend.xml     |  45 ----
 .../toolchain/model/toolchains-jdks-extra.xml      |  45 ----
 .../maven/toolchain/model/toolchains-jdks.xml      |  43 ----
 .../resources/org/apache/maven/toolchain/user.xml  |  35 ---
 8 files changed, 694 deletions(-)

diff --git a/maven-core/src/test/java/org/apache/maven/toolchain/building/DefaultToolchainsBuilderTest.java b/maven-core/src/test/java/org/apache/maven/toolchain/building/DefaultToolchainsBuilderTest.java
deleted file mode 100644
index 94c15b8..0000000
--- a/maven-core/src/test/java/org/apache/maven/toolchain/building/DefaultToolchainsBuilderTest.java
+++ /dev/null
@@ -1,283 +0,0 @@
-package org.apache.maven.toolchain.building;
-
-/*
- * 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.maven.building.StringSource;
-import org.apache.maven.toolchain.io.DefaultToolchainsReader;
-import org.apache.maven.toolchain.io.DefaultToolchainsWriter;
-import org.apache.maven.toolchain.io.ToolchainsParseException;
-import org.apache.maven.toolchain.model.PersistedToolchains;
-import org.apache.maven.toolchain.model.ToolchainModel;
-import org.codehaus.plexus.interpolation.os.OperatingSystemUtils;
-import org.codehaus.plexus.util.xml.Xpp3Dom;
-import org.junit.jupiter.api.Test;
-import org.junit.jupiter.api.BeforeEach;
-import org.mockito.ArgumentMatchers;
-import org.mockito.InjectMocks;
-import org.mockito.MockitoAnnotations;
-import org.mockito.Spy;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.HashMap;
-import java.util.Map;
-
-import static org.junit.jupiter.api.Assertions.assertEquals;
-import static org.junit.jupiter.api.Assertions.assertNotNull;
-import static org.mockito.ArgumentMatchers.any;
-import static org.mockito.Mockito.doReturn;
-import static org.mockito.Mockito.doThrow;
-
-public class DefaultToolchainsBuilderTest
-{
-    private static final String LS = System.lineSeparator();
-
-    @Spy
-    private DefaultToolchainsReader toolchainsReader;
-
-    @Spy
-    private DefaultToolchainsWriter toolchainsWriter;
-
-    @InjectMocks
-    private DefaultToolchainsBuilder toolchainBuilder;
-
-    @BeforeEach
-    public void onSetup()
-    {
-        MockitoAnnotations.initMocks( this );
-
-        Map<String, String> envVarMap = new HashMap<>();
-        envVarMap.put("testKey", "testValue");
-        envVarMap.put("testSpecialCharactersKey", "<test&Value>");
-        OperatingSystemUtils.setEnvVarSource(new TestEnvVarSource(envVarMap));
-    }
-
-    @Test
-    public void testBuildEmptyRequest()
-        throws Exception
-    {
-        ToolchainsBuildingRequest request = new DefaultToolchainsBuildingRequest();
-        ToolchainsBuildingResult result = toolchainBuilder.build( request );
-        assertNotNull( result.getEffectiveToolchains() );
-        assertNotNull( result.getProblems() );
-        assertEquals( 0, result.getProblems().size() );
-    }
-
-    @Test
-    public void testBuildRequestWithUserToolchains()
-        throws Exception
-    {
-        ToolchainsBuildingRequest request = new DefaultToolchainsBuildingRequest();
-        request.setUserToolchainsSource( new StringSource( "" ) );
-
-        PersistedToolchains userResult = new PersistedToolchains();
-        ToolchainModel toolchain = new ToolchainModel();
-        toolchain.setType( "TYPE" );
-        toolchain.addProvide( "key", "user_value" );
-        userResult.addToolchain(  toolchain );
-        doReturn(userResult).when( toolchainsReader ).read( any( InputStream.class ), ArgumentMatchers.<String, Object>anyMap());
-
-        ToolchainsBuildingResult result = toolchainBuilder.build( request );
-        assertNotNull( result.getEffectiveToolchains() );
-        assertEquals( 1, result.getEffectiveToolchains().getToolchains().size() );
-        assertEquals( "TYPE", result.getEffectiveToolchains().getToolchains().get(0).getType() );
-        assertEquals( "user_value", result.getEffectiveToolchains().getToolchains().get(0).getProvides().getProperty( "key" ) );
-        assertNotNull( result.getProblems() );
-        assertEquals( 0, result.getProblems().size() );
-    }
-
-    @Test
-    public void testBuildRequestWithGlobalToolchains()
-        throws Exception
-    {
-        ToolchainsBuildingRequest request = new DefaultToolchainsBuildingRequest();
-        request.setGlobalToolchainsSource( new StringSource( "" ) );
-
-        PersistedToolchains globalResult = new PersistedToolchains();
-        ToolchainModel toolchain = new ToolchainModel();
-        toolchain.setType( "TYPE" );
-        toolchain.addProvide( "key", "global_value" );
-        globalResult.addToolchain(  toolchain );
-        doReturn(globalResult).when( toolchainsReader ).read( any( InputStream.class ), ArgumentMatchers.<String, Object>anyMap());
-
-        ToolchainsBuildingResult result = toolchainBuilder.build( request );
-        assertNotNull( result.getEffectiveToolchains() );
-        assertEquals( 1, result.getEffectiveToolchains().getToolchains().size() );
-        assertEquals( "TYPE", result.getEffectiveToolchains().getToolchains().get(0).getType() );
-        assertEquals( "global_value", result.getEffectiveToolchains().getToolchains().get(0).getProvides().getProperty( "key" ) );
-        assertNotNull( result.getProblems() );
-        assertEquals( 0, result.getProblems().size() );
-    }
-
-    @Test
-    public void testBuildRequestWithBothToolchains()
-        throws Exception
-    {
-        ToolchainsBuildingRequest request = new DefaultToolchainsBuildingRequest();
-        request.setGlobalToolchainsSource( new StringSource( "" ) );
-        request.setUserToolchainsSource( new StringSource( "" ) );
-
-        PersistedToolchains userResult = new PersistedToolchains();
-        ToolchainModel userToolchain = new ToolchainModel();
-        userToolchain.setType( "TYPE" );
-        userToolchain.addProvide( "key", "user_value" );
-        userResult.addToolchain(  userToolchain );
-
-        PersistedToolchains globalResult = new PersistedToolchains();
-        ToolchainModel globalToolchain = new ToolchainModel();
-        globalToolchain.setType( "TYPE" );
-        globalToolchain.addProvide( "key", "global_value" );
-        globalResult.addToolchain(  globalToolchain );
-        doReturn(globalResult).doReturn(userResult).when( toolchainsReader ).read( any( InputStream.class ), ArgumentMatchers.<String, Object>anyMap());
-
-        ToolchainsBuildingResult result = toolchainBuilder.build( request );
-        assertNotNull( result.getEffectiveToolchains() );
-        assertEquals( 2, result.getEffectiveToolchains().getToolchains().size() );
-        assertEquals( "TYPE", result.getEffectiveToolchains().getToolchains().get(0).getType() );
-        assertEquals( "user_value", result.getEffectiveToolchains().getToolchains().get(0).getProvides().getProperty( "key" ) );
-        assertEquals( "TYPE", result.getEffectiveToolchains().getToolchains().get(1).getType() );
-        assertEquals( "global_value", result.getEffectiveToolchains().getToolchains().get(1).getProvides().getProperty( "key" ) );
-        assertNotNull( result.getProblems() );
-        assertEquals( 0, result.getProblems().size() );
-    }
-
-    @Test
-    public void testStrictToolchainsParseException() throws Exception
-    {
-        ToolchainsBuildingRequest request = new DefaultToolchainsBuildingRequest();
-        request.setGlobalToolchainsSource( new StringSource( "" ) );
-        ToolchainsParseException parseException = new ToolchainsParseException( "MESSAGE", 4, 2 );
-        doThrow(parseException).when( toolchainsReader ).read( any( InputStream.class ), ArgumentMatchers.<String, Object>anyMap());
-
-        try
-        {
-            toolchainBuilder.build( request );
-        }
-        catch ( ToolchainsBuildingException e )
-        {
-            assertEquals( "1 problem was encountered while building the effective toolchains" + LS +
-                "[FATAL] Non-parseable toolchains (memory): MESSAGE @ line 4, column 2" + LS, e.getMessage() );
-        }
-    }
-
-    @Test
-    public void testIOException() throws Exception
-    {
-        ToolchainsBuildingRequest request = new DefaultToolchainsBuildingRequest();
-        request.setGlobalToolchainsSource( new StringSource( "", "LOCATION" ) );
-        IOException ioException = new IOException( "MESSAGE" );
-        doThrow(ioException).when( toolchainsReader ).read( any( InputStream.class ), ArgumentMatchers.<String, Object>anyMap());
-
-        try
-        {
-            toolchainBuilder.build( request );
-        }
-        catch ( ToolchainsBuildingException e )
-        {
-            assertEquals( "1 problem was encountered while building the effective toolchains" + LS +
-                "[FATAL] Non-readable toolchains LOCATION: MESSAGE" + LS, e.getMessage() );
-        }
-    }
-
-    @Test
-    public void testEnvironmentVariablesAreInterpolated()
-            throws Exception
-    {
-        ToolchainsBuildingRequest request = new DefaultToolchainsBuildingRequest();
-        request.setUserToolchainsSource( new StringSource( "" ) );
-
-        PersistedToolchains persistedToolchains = new PersistedToolchains();
-        ToolchainModel toolchain = new ToolchainModel();
-        toolchain.setType( "TYPE" );
-        toolchain.addProvide( "key", "${env.testKey}" );
-
-        Xpp3Dom configurationChild = new Xpp3Dom("jdkHome");
-        configurationChild.setValue("${env.testKey}");
-        Xpp3Dom configuration = new Xpp3Dom("configuration");
-        configuration.addChild(configurationChild);
-        toolchain.setConfiguration(configuration);
-        persistedToolchains.addToolchain( toolchain );
-        doReturn(persistedToolchains).when( toolchainsReader ).read( any( InputStream.class ), ArgumentMatchers.<String, Object>anyMap());
-
-        ToolchainsBuildingResult result = toolchainBuilder.build( request );
-        String interpolatedValue = "testValue";
-        assertEquals(interpolatedValue, result.getEffectiveToolchains().getToolchains().get(0).getProvides().getProperty( "key" ) );
-        Xpp3Dom toolchainConfiguration = (Xpp3Dom) result.getEffectiveToolchains().getToolchains().get(0).getConfiguration();
-        assertEquals(interpolatedValue, toolchainConfiguration.getChild("jdkHome").getValue());
-        assertNotNull( result.getProblems() );
-        assertEquals( 0, result.getProblems().size() );
-    }
-
-    @Test
-    public void testNonExistingEnvironmentVariablesAreNotInterpolated()
-            throws Exception
-    {
-        ToolchainsBuildingRequest request = new DefaultToolchainsBuildingRequest();
-        request.setUserToolchainsSource( new StringSource( "" ) );
-
-        PersistedToolchains persistedToolchains = new PersistedToolchains();
-        ToolchainModel toolchain = new ToolchainModel();
-        toolchain.setType( "TYPE" );
-        toolchain.addProvide( "key", "${env.testNonExistingKey}" );
-
-        persistedToolchains.addToolchain( toolchain );
-        doReturn(persistedToolchains).when( toolchainsReader ).read( any( InputStream.class ), ArgumentMatchers.<String, Object>anyMap());
-
-        ToolchainsBuildingResult result = toolchainBuilder.build( request );
-        assertEquals("${env.testNonExistingKey}", result.getEffectiveToolchains().getToolchains().get(0).getProvides().getProperty( "key" ) );
-        assertNotNull( result.getProblems() );
-        assertEquals( 0, result.getProblems().size() );
-    }
-
-    @Test
-    public void testEnvironmentVariablesWithSpecialCharactersAreInterpolated()
-            throws Exception
-    {
-        ToolchainsBuildingRequest request = new DefaultToolchainsBuildingRequest();
-        request.setUserToolchainsSource( new StringSource( "" ) );
-
-        PersistedToolchains persistedToolchains = new PersistedToolchains();
-        ToolchainModel toolchain = new ToolchainModel();
-        toolchain.setType( "TYPE" );
-        toolchain.addProvide( "key", "${env.testSpecialCharactersKey}" );
-
-        persistedToolchains.addToolchain( toolchain );
-        doReturn(persistedToolchains).when( toolchainsReader ).read( any( InputStream.class ), ArgumentMatchers.<String, Object>anyMap());
-
-        ToolchainsBuildingResult result = toolchainBuilder.build( request );
-        String interpolatedValue = "<test&Value>";
-        assertEquals(interpolatedValue, result.getEffectiveToolchains().getToolchains().get(0).getProvides().getProperty( "key" ) );
-        assertNotNull( result.getProblems() );
-        assertEquals( 0, result.getProblems().size() );
-    }
-
-    static class TestEnvVarSource implements OperatingSystemUtils.EnvVarSource {
-        private final Map<String, String> envVarMap;
-
-        TestEnvVarSource(Map<String, String> envVarMap) {
-            this.envVarMap = envVarMap;
-        }
-
-        public Map<String, String> getEnvMap() {
-            return envVarMap;
-        }
-    }
-
-}
diff --git a/maven-core/src/test/java/org/apache/maven/toolchain/building/ToolchainsBuildingExceptionTest.java b/maven-core/src/test/java/org/apache/maven/toolchain/building/ToolchainsBuildingExceptionTest.java
deleted file mode 100644
index 8189268..0000000
--- a/maven-core/src/test/java/org/apache/maven/toolchain/building/ToolchainsBuildingExceptionTest.java
+++ /dev/null
@@ -1,73 +0,0 @@
-package org.apache.maven.toolchain.building;
-
-/*
- * 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 static org.junit.jupiter.api.Assertions.assertEquals;
-
-import java.util.Collections;
-
-import org.apache.maven.building.Problem;
-import org.apache.maven.building.ProblemCollector;
-import org.apache.maven.building.ProblemCollectorFactory;
-import org.junit.jupiter.api.Test;
-
-public class ToolchainsBuildingExceptionTest
-{
-    private static final String LS = System.lineSeparator();
-
-    @Test
-    public void testNoProblems()
-    {
-        ToolchainsBuildingException e = new ToolchainsBuildingException( Collections.<Problem>emptyList() );
-        assertEquals( "0 problems were encountered while building the effective toolchains" + LS, e.getMessage() );
-    }
-
-    @Test
-    public void testOneProblem()
-    {
-        ProblemCollector problemCollector = ProblemCollectorFactory.newInstance( null );
-        problemCollector.add( Problem.Severity.ERROR, "MESSAGE", 3, 5, new Exception() );
-        ToolchainsBuildingException e = new ToolchainsBuildingException( problemCollector.getProblems() );
-        assertEquals( "1 problem was encountered while building the effective toolchains" + LS +
-                      "[ERROR] MESSAGE @ line 3, column 5" + LS, e.getMessage() );
-    }
-
-    @Test
-    public void testUnknownPositionAndSource()
-    {
-        ProblemCollector problemCollector = ProblemCollectorFactory.newInstance( null );
-        problemCollector.add( Problem.Severity.ERROR, "MESSAGE", -1, -1, new Exception() );
-        ToolchainsBuildingException e = new ToolchainsBuildingException( problemCollector.getProblems() );
-        assertEquals( "1 problem was encountered while building the effective toolchains" + LS +
-                      "[ERROR] MESSAGE" + LS, e.getMessage() );
-    }
-
-    @Test
-    public void testUnknownPosition()
-    {
-        ProblemCollector problemCollector = ProblemCollectorFactory.newInstance( null );
-        problemCollector.setSource( "SOURCE" );
-        problemCollector.add( Problem.Severity.ERROR, "MESSAGE", -1, -1, new Exception() );
-        ToolchainsBuildingException e = new ToolchainsBuildingException( problemCollector.getProblems() );
-        assertEquals( "1 problem was encountered while building the effective toolchains" + LS +
-                      "[ERROR] MESSAGE @ SOURCE" + LS, e.getMessage() );
-    }
-
-}
diff --git a/maven-core/src/test/java/org/apache/maven/toolchain/merge/MavenToolchainMergerTest.java b/maven-core/src/test/java/org/apache/maven/toolchain/merge/MavenToolchainMergerTest.java
deleted file mode 100644
index 7bed9a9..0000000
--- a/maven-core/src/test/java/org/apache/maven/toolchain/merge/MavenToolchainMergerTest.java
+++ /dev/null
@@ -1,135 +0,0 @@
-package org.apache.maven.toolchain.merge;
-
-/*
- * 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.maven.toolchain.model.PersistedToolchains;
-import org.apache.maven.toolchain.model.ToolchainModel;
-import org.apache.maven.toolchain.model.TrackableBase;
-import org.apache.maven.toolchain.model.io.xpp3.MavenToolchainsXpp3Reader;
-import org.codehaus.plexus.util.xml.Xpp3Dom;
-import org.junit.jupiter.api.Test;
-
-import java.io.InputStream;
-
-import static org.junit.jupiter.api.Assertions.assertEquals;
-
-public class MavenToolchainMergerTest
-{
-    private MavenToolchainMerger merger = new MavenToolchainMerger();
-
-    private MavenToolchainsXpp3Reader reader = new MavenToolchainsXpp3Reader();
-
-    @Test
-    public void testMergeNulls()
-    {
-        merger.merge( null, null, null );
-
-        PersistedToolchains pt = new PersistedToolchains();
-        merger.merge( pt, null, null );
-        merger.merge( null, pt, null );
-    }
-
-    @Test
-    public void testMergeJdk()
-        throws Exception
-    {
-        try ( InputStream isDominant = ToolchainModel.class.getResourceAsStream( "toolchains-jdks.xml" );
-              InputStream isRecessive = ToolchainModel.class.getResourceAsStream( "toolchains-jdks.xml" ) )
-        {
-            PersistedToolchains dominant = reader.read( isDominant );
-            PersistedToolchains recessive = reader.read( isRecessive );
-            assertEquals( 2, dominant.getToolchains().size() );
-
-            merger.merge( dominant, recessive, TrackableBase.USER_LEVEL );
-            assertEquals( 2, dominant.getToolchains().size() );
-        }
-    }
-
-    @Test
-    public void testMergeJdkExtra()
-        throws Exception
-    {
-        try ( InputStream jdksIS = ToolchainModel.class.getResourceAsStream( "toolchains-jdks.xml" );
-              InputStream jdksExtraIS = ToolchainModel.class.getResourceAsStream( "toolchains-jdks-extra.xml" ) )
-        {
-            PersistedToolchains jdks = reader.read( jdksIS );
-            PersistedToolchains jdksExtra = reader.read( jdksExtraIS );
-            assertEquals( 2, jdks.getToolchains().size() );
-
-            merger.merge( jdks, jdksExtra, TrackableBase.USER_LEVEL );
-            assertEquals( 4, jdks.getToolchains().size() );
-            assertEquals( 2, jdksExtra.getToolchains().size() );
-        }
-        try ( InputStream jdksIS = ToolchainModel.class.getResourceAsStream( "toolchains-jdks.xml" );
-              InputStream jdksExtraIS = ToolchainModel.class.getResourceAsStream( "toolchains-jdks-extra.xml" ) )
-        {
-            PersistedToolchains jdks = reader.read( jdksIS );
-            PersistedToolchains jdksExtra = reader.read( jdksExtraIS );
-            assertEquals( 2, jdks.getToolchains().size() );
-
-            // switch dominant with recessive
-            merger.merge( jdksExtra, jdks, TrackableBase.USER_LEVEL );
-            assertEquals( 4, jdksExtra.getToolchains().size() );
-            assertEquals( 2, jdks.getToolchains().size() );
-        }
-    }
-
-    @Test
-    public void testMergeJdkExtend()
-        throws Exception
-    {
-        try ( InputStream jdksIS = ToolchainModel.class.getResourceAsStream( "toolchains-jdks.xml" );
-              InputStream jdksExtendIS = ToolchainModel.class.getResourceAsStream( "toolchains-jdks-extend.xml" ) )
-        {
-            PersistedToolchains jdks = reader.read( jdksIS );
-            PersistedToolchains jdksExtend = reader.read( jdksExtendIS );
-            assertEquals( 2, jdks.getToolchains().size() );
-
-            merger.merge( jdks, jdksExtend, TrackableBase.USER_LEVEL );
-            assertEquals( 2, jdks.getToolchains().size() );
-            Xpp3Dom config0 = (Xpp3Dom) jdks.getToolchains().get( 0 ).getConfiguration();
-            assertEquals( "lib/tools.jar", config0.getChild( "toolsJar" ).getValue() );
-            assertEquals( 2, config0.getChildCount() );
-            Xpp3Dom config1 = (Xpp3Dom) jdks.getToolchains().get( 1 ).getConfiguration();
-            assertEquals( 2, config1.getChildCount() );
-            assertEquals( "lib/classes.jar", config1.getChild( "toolsJar" ).getValue() );
-            assertEquals( 2, jdksExtend.getToolchains().size() );
-        }
-        try ( InputStream jdksIS = ToolchainModel.class.getResourceAsStream( "toolchains-jdks.xml" );
-              InputStream jdksExtendIS = ToolchainModel.class.getResourceAsStream( "toolchains-jdks-extend.xml" ) )
-        {
-            PersistedToolchains jdks = reader.read( jdksIS );
-            PersistedToolchains jdksExtend = reader.read( jdksExtendIS );
-            assertEquals( 2, jdks.getToolchains().size() );
-
-            // switch dominant with recessive
-            merger.merge( jdksExtend, jdks, TrackableBase.USER_LEVEL );
-            assertEquals( 2, jdksExtend.getToolchains().size() );
-            Xpp3Dom config0 = (Xpp3Dom) jdksExtend.getToolchains().get( 0 ).getConfiguration();
-            assertEquals( "lib/tools.jar", config0.getChild( "toolsJar" ).getValue() );
-            assertEquals( 2, config0.getChildCount() );
-            Xpp3Dom config1 = (Xpp3Dom) jdksExtend.getToolchains().get( 1 ).getConfiguration();
-            assertEquals( 2, config1.getChildCount() );
-            assertEquals( "lib/classes.jar", config1.getChild( "toolsJar" ).getValue() );
-            assertEquals( 2, jdks.getToolchains().size() );
-        }
-    }
-
-}
diff --git a/maven-core/src/test/resources/org/apache/maven/toolchain/global.xml b/maven-core/src/test/resources/org/apache/maven/toolchain/global.xml
deleted file mode 100644
index cd9be74..0000000
--- a/maven-core/src/test/resources/org/apache/maven/toolchain/global.xml
+++ /dev/null
@@ -1,35 +0,0 @@
-<?xml version="1.0" encoding="UTF8"?>
-
-<!--
-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.
--->
-
-<toolchains>
-  <toolchain>
-     <type>basic</type>
-     <configuration>
-       <global>true</global>
-     </configuration>
-  </toolchain>
-  <toolchain>
-     <type>rare</type>
-     <configuration>
-       <global>true</global>
-     </configuration>
-  </toolchain>
-</toolchains>
\ No newline at end of file
diff --git a/maven-core/src/test/resources/org/apache/maven/toolchain/model/toolchains-jdks-extend.xml b/maven-core/src/test/resources/org/apache/maven/toolchain/model/toolchains-jdks-extend.xml
deleted file mode 100644
index 64de88a..0000000
--- a/maven-core/src/test/resources/org/apache/maven/toolchain/model/toolchains-jdks-extend.xml
+++ /dev/null
@@ -1,45 +0,0 @@
-<?xml version="1.0" encoding="UTF8"?>
-
-<!--
-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.
--->
-
-<toolchains>
-  <toolchain>
-     <type>jdk</type>
-     <provides>
-         <version>1.5</version>
-         <vendor>sun</vendor>
-     </provides>
-     <configuration>
-        <jdkHome>${env.JAVA_HOME}</jdkHome>
-        <toolsJar>lib/tools.jar</toolsJar>
-     </configuration>
-  </toolchain>
-  <toolchain>
-     <type>jdk</type>
-     <provides>
-         <version>1.6</version>
-         <vendor>sun</vendor>
-     </provides>
-     <configuration>
-        <jdkHome>${env.JAVA_HOME}</jdkHome>
-        <toolsJar>lib/classes.jar</toolsJar>
-     </configuration>
-  </toolchain>
-</toolchains>
\ No newline at end of file
diff --git a/maven-core/src/test/resources/org/apache/maven/toolchain/model/toolchains-jdks-extra.xml b/maven-core/src/test/resources/org/apache/maven/toolchain/model/toolchains-jdks-extra.xml
deleted file mode 100644
index 35c3217..0000000
--- a/maven-core/src/test/resources/org/apache/maven/toolchain/model/toolchains-jdks-extra.xml
+++ /dev/null
@@ -1,45 +0,0 @@
-<?xml version="1.0" encoding="UTF8"?>
-
-<!--
-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.
--->
-
-<toolchains>
-  <toolchain>
-     <type>jdk</type>
-     <provides>
-         <version>1.4</version>
-         <vendor>sun</vendor>
-         <!-- no id, so it's considered 'default' -->
-     </provides>
-     <configuration>
-        <jdkHome>${env.JAVA_HOME}</jdkHome>
-     </configuration>
-  </toolchain>
-  <toolchain>
-     <type>jdk</type>
-     <provides>
-         <version>1.7</version>
-         <vendor>ibm</vendor>
-         <id>ibm_17</id>
-     </provides>
-     <configuration>
-        <jdkHome>${env.JAVA_HOME}</jdkHome>
-     </configuration>
-  </toolchain>
-</toolchains>
\ No newline at end of file
diff --git a/maven-core/src/test/resources/org/apache/maven/toolchain/model/toolchains-jdks.xml b/maven-core/src/test/resources/org/apache/maven/toolchain/model/toolchains-jdks.xml
deleted file mode 100644
index 5233a33..0000000
--- a/maven-core/src/test/resources/org/apache/maven/toolchain/model/toolchains-jdks.xml
+++ /dev/null
@@ -1,43 +0,0 @@
-<?xml version="1.0" encoding="UTF8"?>
-
-<!--
-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.
--->
-
-<toolchains>
-  <toolchain>
-     <type>jdk</type>
-     <provides>
-         <version>1.5</version>
-         <vendor>sun</vendor>
-     </provides>
-     <configuration>
-        <jdkHome>${env.JAVA_HOME}</jdkHome>
-     </configuration>
-  </toolchain>
-  <toolchain>
-     <type>jdk</type>
-     <provides>
-         <version>1.6</version>
-         <vendor>sun</vendor>
-     </provides>
-     <configuration>
-        <jdkHome>${env.JAVA_HOME}</jdkHome>
-     </configuration>
-  </toolchain>
-</toolchains>
\ No newline at end of file
diff --git a/maven-core/src/test/resources/org/apache/maven/toolchain/user.xml b/maven-core/src/test/resources/org/apache/maven/toolchain/user.xml
deleted file mode 100644
index d11181f..0000000
--- a/maven-core/src/test/resources/org/apache/maven/toolchain/user.xml
+++ /dev/null
@@ -1,35 +0,0 @@
-<?xml version="1.0" encoding="UTF8"?>
-
-<!--
-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.
--->
-
-<toolchains>
-  <toolchain>
-     <type>basic</type>
-     <configuration>
-       <user>true</user>
-     </configuration>
-  </toolchain>
-  <toolchain>
-     <type>rare</type>
-     <configuration>
-       <user>true</user>
-     </configuration>
-  </toolchain>
-</toolchains>
\ No newline at end of file

[maven] 03/03: [MNG-6389] Resolve PR feedback

Posted by mt...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

mthmulders pushed a commit to branch MNG-6389-introduce-seperate-toolchain-artifact
in repository https://gitbox.apache.org/repos/asf/maven.git

commit b4a753aaa9f51dd99d05198b6bcf9f10bcdf0575
Author: Giovanni van der Schelde <Gi...@infosupport.com>
AuthorDate: Wed Oct 13 12:11:09 2021 +0200

    [MNG-6389] Resolve PR feedback
---
 maven-core/pom.xml                                        |  2 ++
 .../building/DefaultToolchainsBuildingResult.java         |  6 +++---
 .../toolchain/building/ToolchainsBuildingException.java   |  4 ++--
 .../toolchain/building/ToolchainsBuildingResult.java      |  4 ++--
 .../maven/toolchain/io/DefaultToolchainsReader.java       | 15 ++++++++-------
 .../org/apache/maven/toolchain/io/ToolchainsReader.java   |  4 ++--
 .../maven/toolchain/merge/MavenToolchainMerger.java       | 10 +++++-----
 7 files changed, 24 insertions(+), 21 deletions(-)

diff --git a/maven-core/pom.xml b/maven-core/pom.xml
index 9e12f98..f46fdeb 100644
--- a/maven-core/pom.xml
+++ b/maven-core/pom.xml
@@ -220,10 +220,12 @@ under the License.
         <artifactId>modello-maven-plugin</artifactId>
         <configuration>
           <version>1.1.0</version>
+          <!-- This is a required attribute and is intentionally left empty -->
           <models></models>
         </configuration>
         <executions>
           <execution>
+            <!-- This step is required to generate xdoc, and does not generate java code -->
             <id>modello-site-doc</id>
             <phase>pre-site</phase>
             <goals>
diff --git a/maven-toolchain-builder/src/main/java/org/apache/maven/toolchain/building/DefaultToolchainsBuildingResult.java b/maven-toolchain-builder/src/main/java/org/apache/maven/toolchain/building/DefaultToolchainsBuildingResult.java
index fd96162..2d07a4a 100644
--- a/maven-toolchain-builder/src/main/java/org/apache/maven/toolchain/building/DefaultToolchainsBuildingResult.java
+++ b/maven-toolchain-builder/src/main/java/org/apache/maven/toolchain/building/DefaultToolchainsBuildingResult.java
@@ -19,12 +19,12 @@ package org.apache.maven.toolchain.building;
  * under the License.
  */
 
-import org.apache.maven.building.Problem;
-import org.apache.maven.toolchain.model.PersistedToolchains;
-
 import java.util.ArrayList;
 import java.util.List;
 
+import org.apache.maven.building.Problem;
+import org.apache.maven.toolchain.model.PersistedToolchains;
+
 /**
  * Holds the result of the merged toolchains and holds the problems during this build, if any.
  *
diff --git a/maven-toolchain-builder/src/main/java/org/apache/maven/toolchain/building/ToolchainsBuildingException.java b/maven-toolchain-builder/src/main/java/org/apache/maven/toolchain/building/ToolchainsBuildingException.java
index dce9e5c..ccd354b 100644
--- a/maven-toolchain-builder/src/main/java/org/apache/maven/toolchain/building/ToolchainsBuildingException.java
+++ b/maven-toolchain-builder/src/main/java/org/apache/maven/toolchain/building/ToolchainsBuildingException.java
@@ -19,13 +19,13 @@ package org.apache.maven.toolchain.building;
  * under the License.
  */
 
-import org.apache.maven.building.Problem;
-
 import java.io.PrintWriter;
 import java.io.StringWriter;
 import java.util.ArrayList;
 import java.util.List;
 
+import org.apache.maven.building.Problem;
+
 /**
  * @author Robert Scholte
  * @since 3.3.0
diff --git a/maven-toolchain-builder/src/main/java/org/apache/maven/toolchain/building/ToolchainsBuildingResult.java b/maven-toolchain-builder/src/main/java/org/apache/maven/toolchain/building/ToolchainsBuildingResult.java
index 4ec3ee6..f7c5f71 100644
--- a/maven-toolchain-builder/src/main/java/org/apache/maven/toolchain/building/ToolchainsBuildingResult.java
+++ b/maven-toolchain-builder/src/main/java/org/apache/maven/toolchain/building/ToolchainsBuildingResult.java
@@ -19,11 +19,11 @@ package org.apache.maven.toolchain.building;
  * under the License.
  */
 
+import java.util.List;
+
 import org.apache.maven.building.Problem;
 import org.apache.maven.toolchain.model.PersistedToolchains;
 
-import java.util.List;
-
 /**
  * Collects the output of the toolchains builder.
  *
diff --git a/maven-toolchain-builder/src/main/java/org/apache/maven/toolchain/io/DefaultToolchainsReader.java b/maven-toolchain-builder/src/main/java/org/apache/maven/toolchain/io/DefaultToolchainsReader.java
index 4d766a1..2522551 100644
--- a/maven-toolchain-builder/src/main/java/org/apache/maven/toolchain/io/DefaultToolchainsReader.java
+++ b/maven-toolchain-builder/src/main/java/org/apache/maven/toolchain/io/DefaultToolchainsReader.java
@@ -19,13 +19,6 @@ package org.apache.maven.toolchain.io;
  * under the License.
  */
 
-import org.apache.maven.toolchain.model.PersistedToolchains;
-import org.apache.maven.toolchain.model.io.xpp3.MavenToolchainsXpp3Reader;
-import org.codehaus.plexus.util.ReaderFactory;
-import org.codehaus.plexus.util.xml.pull.XmlPullParserException;
-
-import javax.inject.Named;
-import javax.inject.Singleton;
 import java.io.File;
 import java.io.IOException;
 import java.io.InputStream;
@@ -33,6 +26,14 @@ import java.io.Reader;
 import java.util.Map;
 import java.util.Objects;
 
+import javax.inject.Named;
+import javax.inject.Singleton;
+
+import org.apache.maven.toolchain.model.PersistedToolchains;
+import org.apache.maven.toolchain.model.io.xpp3.MavenToolchainsXpp3Reader;
+import org.codehaus.plexus.util.ReaderFactory;
+import org.codehaus.plexus.util.xml.pull.XmlPullParserException;
+
 /**
  * Handles deserialization of toolchains from the default textual format.
  *
diff --git a/maven-toolchain-builder/src/main/java/org/apache/maven/toolchain/io/ToolchainsReader.java b/maven-toolchain-builder/src/main/java/org/apache/maven/toolchain/io/ToolchainsReader.java
index 306b832..44dc2bd 100644
--- a/maven-toolchain-builder/src/main/java/org/apache/maven/toolchain/io/ToolchainsReader.java
+++ b/maven-toolchain-builder/src/main/java/org/apache/maven/toolchain/io/ToolchainsReader.java
@@ -19,14 +19,14 @@ package org.apache.maven.toolchain.io;
  * under the License.
  */
 
-import org.apache.maven.toolchain.model.PersistedToolchains;
-
 import java.io.File;
 import java.io.IOException;
 import java.io.InputStream;
 import java.io.Reader;
 import java.util.Map;
 
+import org.apache.maven.toolchain.model.PersistedToolchains;
+
 /**
  * Handles deserialization of toolchains from some kind of textual format like XML.
  *
diff --git a/maven-toolchain-builder/src/main/java/org/apache/maven/toolchain/merge/MavenToolchainMerger.java b/maven-toolchain-builder/src/main/java/org/apache/maven/toolchain/merge/MavenToolchainMerger.java
index b477f82..9b6596e 100644
--- a/maven-toolchain-builder/src/main/java/org/apache/maven/toolchain/merge/MavenToolchainMerger.java
+++ b/maven-toolchain-builder/src/main/java/org/apache/maven/toolchain/merge/MavenToolchainMerger.java
@@ -19,14 +19,14 @@ package org.apache.maven.toolchain.merge;
  * under the License.
  */
 
-import org.apache.maven.toolchain.model.PersistedToolchains;
-import org.apache.maven.toolchain.model.ToolchainModel;
-import org.codehaus.plexus.util.xml.Xpp3Dom;
-
 import java.util.LinkedHashMap;
 import java.util.List;
 import java.util.Map;
 
+import org.apache.maven.toolchain.model.PersistedToolchains;
+import org.apache.maven.toolchain.model.ToolchainModel;
+import org.codehaus.plexus.util.xml.Xpp3Dom;
+
 /**
  *
  * @author Robert Scholte
@@ -100,4 +100,4 @@ public class MavenToolchainMerger
         return model;
     }
 
-}
+}
\ No newline at end of file