diff --git a/maven-compat/src/main/java/org/apache/maven/artifact/manager/DefaultWagonManager.java b/maven-compat/src/main/java/org/apache/maven/artifact/manager/DefaultWagonManager.java index 2bfefbec4c..2724b1f55c 100644 --- a/maven-compat/src/main/java/org/apache/maven/artifact/manager/DefaultWagonManager.java +++ b/maven-compat/src/main/java/org/apache/maven/artifact/manager/DefaultWagonManager.java @@ -86,8 +86,8 @@ public class DefaultWagonManager if ( id.equalsIgnoreCase( server.getId() ) ) { SettingsDecryptionResult result = settingsDecrypter.decrypt( - new DefaultSettingsDecryptionRequest( server.getDelegate() ) ); - server = new Server( result.getServer() ); + new DefaultSettingsDecryptionRequest( server ) ); + server = result.getServer(); AuthenticationInfo authInfo = new AuthenticationInfo(); authInfo.setUserName( server.getUsername() ); @@ -125,8 +125,8 @@ public class DefaultWagonManager if ( proxy.isActive() && protocol.equalsIgnoreCase( proxy.getProtocol() ) ) { SettingsDecryptionResult result = settingsDecrypter.decrypt( - new DefaultSettingsDecryptionRequest( proxy.getDelegate() ) ); - proxy = new Proxy( result.getProxy() ); + new DefaultSettingsDecryptionRequest( proxy ) ); + proxy = result.getProxy(); ProxyInfo proxyInfo = new ProxyInfo(); proxyInfo.setHost( proxy.getHost() ); diff --git a/maven-compat/src/main/java/org/apache/maven/repository/legacy/LegacyRepositorySystem.java b/maven-compat/src/main/java/org/apache/maven/repository/legacy/LegacyRepositorySystem.java index bd97b39928..0ace040c23 100644 --- a/maven-compat/src/main/java/org/apache/maven/repository/legacy/LegacyRepositorySystem.java +++ b/maven-compat/src/main/java/org/apache/maven/repository/legacy/LegacyRepositorySystem.java @@ -563,9 +563,9 @@ public class LegacyRepositorySystem if ( server != null ) { - SettingsDecryptionRequest request = new DefaultSettingsDecryptionRequest( server.getDelegate() ); + SettingsDecryptionRequest request = new DefaultSettingsDecryptionRequest( server ); SettingsDecryptionResult result = settingsDecrypter.decrypt( request ); - server = new Server( result.getServer() ); + server = result.getServer(); if ( logger.isDebugEnabled() ) { @@ -670,9 +670,9 @@ public class LegacyRepositorySystem if ( proxy != null ) { - SettingsDecryptionRequest request = new DefaultSettingsDecryptionRequest( proxy.getDelegate() ); + SettingsDecryptionRequest request = new DefaultSettingsDecryptionRequest( proxy ); SettingsDecryptionResult result = settingsDecrypter.decrypt( request ); - proxy = new org.apache.maven.settings.Proxy( result.getProxy() ); + proxy = result.getProxy(); if ( logger.isDebugEnabled() ) { diff --git a/maven-core/src/main/java/org/apache/maven/internal/aether/DefaultRepositorySystemSessionFactory.java b/maven-core/src/main/java/org/apache/maven/internal/aether/DefaultRepositorySystemSessionFactory.java index d8e187646b..38ba573aa5 100644 --- a/maven-core/src/main/java/org/apache/maven/internal/aether/DefaultRepositorySystemSessionFactory.java +++ b/maven-core/src/main/java/org/apache/maven/internal/aether/DefaultRepositorySystemSessionFactory.java @@ -194,8 +194,8 @@ public class DefaultRepositorySystemSessionFactory request.getWorkspaceReader() != null ? request.getWorkspaceReader() : workspaceRepository ); DefaultSettingsDecryptionRequest decrypt = new DefaultSettingsDecryptionRequest(); - decrypt.setProxies( Proxy.proxyToApiV4( request.getProxies() ) ); - decrypt.setServers( Server.serverToApiV4( request.getServers() ) ); + decrypt.setProxies( request.getProxies() ); + decrypt.setServers( request.getServers() ); SettingsDecryptionResult decrypted = settingsDecrypter.decrypt( decrypt ); if ( logger.isDebugEnabled() ) @@ -215,7 +215,7 @@ public class DefaultRepositorySystemSessionFactory session.setMirrorSelector( mirrorSelector ); DefaultProxySelector proxySelector = new DefaultProxySelector(); - for ( org.apache.maven.api.settings.Proxy proxy : decrypted.getProxies() ) + for ( Proxy proxy : decrypted.getProxies() ) { AuthenticationBuilder authBuilder = new AuthenticationBuilder(); authBuilder.addUsername( proxy.getUsername() ).addPassword( proxy.getPassword() ); @@ -226,7 +226,7 @@ public class DefaultRepositorySystemSessionFactory session.setProxySelector( proxySelector ); DefaultAuthenticationSelector authSelector = new DefaultAuthenticationSelector(); - for ( org.apache.maven.api.settings.Server server : decrypted.getServers() ) + for ( Server server : decrypted.getServers() ) { AuthenticationBuilder authBuilder = new AuthenticationBuilder(); authBuilder.addUsername( server.getUsername() ).addPassword( server.getPassword() ); @@ -235,7 +235,7 @@ public class DefaultRepositorySystemSessionFactory if ( server.getConfiguration() != null ) { - Dom dom = server.getConfiguration(); + Dom dom = ( ( org.codehaus.plexus.util.xml.Xpp3Dom ) server.getConfiguration() ).getDom(); List children = dom.getChildren().stream() .filter( c -> !"wagonProvider".equals( c.getName() ) ) .collect( Collectors.toList() ); diff --git a/maven-core/src/main/java/org/apache/maven/lifecycle/internal/DefaultLifecycleExecutionPlanCalculator.java b/maven-core/src/main/java/org/apache/maven/lifecycle/internal/DefaultLifecycleExecutionPlanCalculator.java index 6849193634..cb560462e4 100644 --- a/maven-core/src/main/java/org/apache/maven/lifecycle/internal/DefaultLifecycleExecutionPlanCalculator.java +++ b/maven-core/src/main/java/org/apache/maven/lifecycle/internal/DefaultLifecycleExecutionPlanCalculator.java @@ -371,9 +371,9 @@ public class DefaultLifecycleExecutionPlanCalculator mojoExecution.setConfiguration( finalConfiguration ); } - private Xpp3Dom getMojoConfiguration( MojoDescriptor mojoDescriptor ) + private Dom getMojoConfiguration( MojoDescriptor mojoDescriptor ) { - return MojoDescriptorCreator.convert( mojoDescriptor ); + return MojoDescriptorCreator.convert( mojoDescriptor ).getDom(); } @Override diff --git a/maven-core/src/main/java/org/apache/maven/lifecycle/internal/MojoDescriptorCreator.java b/maven-core/src/main/java/org/apache/maven/lifecycle/internal/MojoDescriptorCreator.java index 04a247ae03..65b1cb8b6f 100644 --- a/maven-core/src/main/java/org/apache/maven/lifecycle/internal/MojoDescriptorCreator.java +++ b/maven-core/src/main/java/org/apache/maven/lifecycle/internal/MojoDescriptorCreator.java @@ -102,7 +102,7 @@ public class MojoDescriptorCreator return null; } - public static Xpp3Dom convert( MojoDescriptor mojoDescriptor ) + public static org.codehaus.plexus.util.xml.Xpp3Dom convert( MojoDescriptor mojoDescriptor ) { PlexusConfiguration c = mojoDescriptor.getMojoConfiguration(); @@ -125,7 +125,7 @@ public class MojoDescriptorCreator } Xpp3Dom dom = new Xpp3Dom( "configuration", null, null, children, null ); - return dom; + return new org.codehaus.plexus.util.xml.Xpp3Dom( dom ); } // org.apache.maven.plugins:maven-remote-resources-plugin:1.0:process@executionId diff --git a/maven-core/src/main/java/org/apache/maven/settings/DefaultMavenSettingsBuilder.java b/maven-core/src/main/java/org/apache/maven/settings/DefaultMavenSettingsBuilder.java index 151b2e5fd6..2f2c4075e7 100644 --- a/maven-core/src/main/java/org/apache/maven/settings/DefaultMavenSettingsBuilder.java +++ b/maven-core/src/main/java/org/apache/maven/settings/DefaultMavenSettingsBuilder.java @@ -26,7 +26,6 @@ import javax.inject.Inject; import javax.inject.Named; import javax.inject.Singleton; -import org.apache.maven.api.settings.Settings; import org.apache.maven.execution.MavenExecutionRequest; import org.apache.maven.properties.internal.SystemProperties; import org.apache.maven.settings.building.DefaultSettingsBuildingRequest; diff --git a/maven-core/src/main/java/org/apache/maven/settings/MavenSettingsBuilder.java b/maven-core/src/main/java/org/apache/maven/settings/MavenSettingsBuilder.java index 45bcbc3682..c79a843d91 100644 --- a/maven-core/src/main/java/org/apache/maven/settings/MavenSettingsBuilder.java +++ b/maven-core/src/main/java/org/apache/maven/settings/MavenSettingsBuilder.java @@ -22,7 +22,6 @@ package org.apache.maven.settings; import java.io.File; import java.io.IOException; -import org.apache.maven.api.settings.Settings; import org.apache.maven.execution.MavenExecutionRequest; import org.codehaus.plexus.util.xml.pull.XmlPullParserException; diff --git a/maven-core/src/test/java/org/apache/maven/internal/impl/TestApi.java b/maven-core/src/test/java/org/apache/maven/internal/impl/TestApi.java index b39cc21a84..3809ac3b18 100644 --- a/maven-core/src/test/java/org/apache/maven/internal/impl/TestApi.java +++ b/maven-core/src/test/java/org/apache/maven/internal/impl/TestApi.java @@ -41,6 +41,7 @@ import org.apache.maven.repository.internal.MavenRepositorySystemUtils; import org.apache.maven.rtinfo.RuntimeInformation; import org.apache.maven.session.scope.internal.SessionScope; import org.apache.maven.toolchain.DefaultToolchainManagerPrivate; +import org.apache.maven.toolchain.building.ToolchainsBuilder; import org.codehaus.plexus.PlexusContainer; import org.codehaus.plexus.testing.PlexusTest; import org.eclipse.aether.RepositorySystem; diff --git a/maven-core/src/test/java/org/apache/maven/lifecycle/LifecycleExecutorTest.java b/maven-core/src/test/java/org/apache/maven/lifecycle/LifecycleExecutorTest.java index 2841887f90..b9720370ca 100644 --- a/maven-core/src/test/java/org/apache/maven/lifecycle/LifecycleExecutorTest.java +++ b/maven-core/src/test/java/org/apache/maven/lifecycle/LifecycleExecutorTest.java @@ -291,7 +291,7 @@ public class LifecycleExecutorTest MojoDescriptor mojoDescriptor = mojoDescriptorCreator.getMojoDescriptor( "org.apache.maven.its.plugins:maven-it-plugin:0.1:java", session, session.getCurrentProject() ); - Dom dom = MojoDescriptorCreator.convert( mojoDescriptor ); + Dom dom = MojoDescriptorCreator.convert( mojoDescriptor ).getDom(); System.out.println( dom ); } diff --git a/maven-embedder/src/main/java/org/apache/maven/cli/MavenCli.java b/maven-embedder/src/main/java/org/apache/maven/cli/MavenCli.java index 10cca57da7..6c17028be6 100644 --- a/maven-embedder/src/main/java/org/apache/maven/cli/MavenCli.java +++ b/maven-embedder/src/main/java/org/apache/maven/cli/MavenCli.java @@ -73,7 +73,6 @@ import org.apache.maven.shared.utils.logging.MessageUtils; import org.apache.maven.toolchain.building.DefaultToolchainsBuildingRequest; import org.apache.maven.toolchain.building.ToolchainsBuilder; import org.apache.maven.toolchain.building.ToolchainsBuildingResult; -import org.apache.maven.toolchain.model.PersistedToolchains; import org.codehaus.plexus.ContainerConfiguration; import org.codehaus.plexus.DefaultContainerConfiguration; import org.codehaus.plexus.DefaultPlexusContainer; @@ -1335,7 +1334,7 @@ public class MavenCli eventSpyDispatcher.onEvent( toolchainsResult ); executionRequestPopulator.populateFromToolchains( cliRequest.request, - new PersistedToolchains( toolchainsResult.getEffectiveToolchains() ) ); + toolchainsResult.getEffectiveToolchains() ); if ( !toolchainsResult.getProblems().isEmpty() && slf4jLogger.isWarnEnabled() ) { diff --git a/maven-embedder/src/main/java/org/apache/maven/cli/configuration/SettingsXmlConfigurationProcessor.java b/maven-embedder/src/main/java/org/apache/maven/cli/configuration/SettingsXmlConfigurationProcessor.java index 5bdc8895b4..eeb152751c 100644 --- a/maven-embedder/src/main/java/org/apache/maven/cli/configuration/SettingsXmlConfigurationProcessor.java +++ b/maven-embedder/src/main/java/org/apache/maven/cli/configuration/SettingsXmlConfigurationProcessor.java @@ -35,11 +35,12 @@ import org.apache.maven.cli.CLIManager; import org.apache.maven.cli.CliRequest; import org.apache.maven.execution.MavenExecutionRequest; import org.apache.maven.execution.MavenExecutionRequestPopulationException; -import org.apache.maven.api.settings.Mirror; -import org.apache.maven.api.settings.Proxy; -import org.apache.maven.api.settings.Repository; -import org.apache.maven.api.settings.Server; -import org.apache.maven.api.settings.Settings; +import org.apache.maven.settings.Mirror; +import org.apache.maven.settings.Profile; +import org.apache.maven.settings.Proxy; +import org.apache.maven.settings.Repository; +import org.apache.maven.settings.Server; +import org.apache.maven.settings.Settings; import org.apache.maven.settings.SettingsUtils; import org.apache.maven.settings.building.DefaultSettingsBuildingRequest; import org.apache.maven.settings.building.SettingsBuilder; @@ -188,7 +189,7 @@ public class SettingsXmlConfigurationProcessor for ( Server server : settings.getServers() ) { - request.addServer( new org.apache.maven.settings.Server( server ) ); + request.addServer( server ); } // @@ -210,7 +211,7 @@ public class SettingsXmlConfigurationProcessor continue; } - request.addProxy( new org.apache.maven.settings.Proxy( proxy ) ); + request.addProxy( proxy ); } // @@ -223,14 +224,14 @@ public class SettingsXmlConfigurationProcessor for ( Mirror mirror : settings.getMirrors() ) { - request.addMirror( new org.apache.maven.settings.Mirror( mirror ) ); + request.addMirror( mirror ); } request.setActiveProfiles( settings.getActiveProfiles() ); - for ( org.apache.maven.api.settings.Profile rawProfile : settings.getProfiles() ) + for ( Profile rawProfile : settings.getProfiles() ) { - request.addProfile( SettingsUtils.convertFromSettingsProfile( rawProfile ) ); + request.addProfile( SettingsUtils.convertFromSettingsProfile( rawProfile.getDelegate() ) ); if ( settings.getActiveProfiles().contains( rawProfile.getId() ) ) { @@ -239,8 +240,8 @@ public class SettingsXmlConfigurationProcessor { try { - request.addRemoteRepository( MavenRepositorySystem.buildArtifactRepository( - new org.apache.maven.settings.Repository( remoteRepository ) ) ); + request.addRemoteRepository( + MavenRepositorySystem.buildArtifactRepository( remoteRepository ) ); } catch ( InvalidRepositoryException e ) { @@ -254,7 +255,7 @@ public class SettingsXmlConfigurationProcessor try { request.addPluginArtifactRepository( MavenRepositorySystem.buildArtifactRepository( - new org.apache.maven.settings.Repository( pluginRepository ) ) ); + pluginRepository ) ); } catch ( InvalidRepositoryException e ) { diff --git a/maven-settings-builder/src/main/java/org/apache/maven/settings/building/DefaultSettingsBuilder.java b/maven-settings-builder/src/main/java/org/apache/maven/settings/building/DefaultSettingsBuilder.java index 183d4f77b8..6a45b3c4e4 100644 --- a/maven-settings-builder/src/main/java/org/apache/maven/settings/building/DefaultSettingsBuilder.java +++ b/maven-settings-builder/src/main/java/org/apache/maven/settings/building/DefaultSettingsBuilder.java @@ -34,7 +34,7 @@ import javax.inject.Singleton; import org.apache.maven.building.FileSource; import org.apache.maven.building.Source; import org.apache.maven.api.settings.Settings; -import org.apache.maven.api.settings.TrackableBase; +import org.apache.maven.settings.TrackableBase; import org.apache.maven.settings.io.SettingsParseException; import org.apache.maven.settings.io.SettingsReader; import org.apache.maven.settings.io.SettingsWriter; @@ -128,7 +128,8 @@ public class DefaultSettingsBuilder throw new SettingsBuildingException( problems.getProblems() ); } - return new DefaultSettingsBuildingResult( userSettings, problems.getProblems() ); + return new DefaultSettingsBuildingResult( new org.apache.maven.settings.Settings( userSettings ), + problems.getProblems() ); } private boolean hasErrors( List problems ) diff --git a/maven-settings-builder/src/main/java/org/apache/maven/settings/building/DefaultSettingsBuildingResult.java b/maven-settings-builder/src/main/java/org/apache/maven/settings/building/DefaultSettingsBuildingResult.java index 4dc59d7e27..48456e5d65 100644 --- a/maven-settings-builder/src/main/java/org/apache/maven/settings/building/DefaultSettingsBuildingResult.java +++ b/maven-settings-builder/src/main/java/org/apache/maven/settings/building/DefaultSettingsBuildingResult.java @@ -22,7 +22,7 @@ package org.apache.maven.settings.building; import java.util.ArrayList; import java.util.List; -import org.apache.maven.api.settings.Settings; +import org.apache.maven.settings.Settings; /** * Collects the output of the settings builder. diff --git a/maven-settings-builder/src/main/java/org/apache/maven/settings/building/SettingsBuildingResult.java b/maven-settings-builder/src/main/java/org/apache/maven/settings/building/SettingsBuildingResult.java index d2c2c11ebc..43b2359fac 100644 --- a/maven-settings-builder/src/main/java/org/apache/maven/settings/building/SettingsBuildingResult.java +++ b/maven-settings-builder/src/main/java/org/apache/maven/settings/building/SettingsBuildingResult.java @@ -21,7 +21,7 @@ package org.apache.maven.settings.building; import java.util.List; -import org.apache.maven.api.settings.Settings; +import org.apache.maven.settings.Settings; /** * Collects the output of the settings builder. diff --git a/maven-settings-builder/src/main/java/org/apache/maven/settings/crypto/DefaultSettingsDecrypter.java b/maven-settings-builder/src/main/java/org/apache/maven/settings/crypto/DefaultSettingsDecrypter.java index bd0e21b80f..bd4c5fa153 100644 --- a/maven-settings-builder/src/main/java/org/apache/maven/settings/crypto/DefaultSettingsDecrypter.java +++ b/maven-settings-builder/src/main/java/org/apache/maven/settings/crypto/DefaultSettingsDecrypter.java @@ -26,8 +26,8 @@ import javax.inject.Inject; import javax.inject.Named; import javax.inject.Singleton; -import org.apache.maven.api.settings.Proxy; -import org.apache.maven.api.settings.Server; +import org.apache.maven.settings.Proxy; +import org.apache.maven.settings.Server; import org.apache.maven.settings.building.DefaultSettingsProblem; import org.apache.maven.settings.building.SettingsProblem; import org.apache.maven.settings.building.SettingsProblem.Severity; @@ -61,9 +61,11 @@ public class DefaultSettingsDecrypter for ( Server server : request.getServers() ) { + server = server.clone(); + try { - server = server.withPassword( decrypt( server.getPassword() ) ); + server.setPassword( decrypt( server.getPassword() ) ); } catch ( SecDispatcherException e ) { @@ -73,7 +75,7 @@ public class DefaultSettingsDecrypter try { - server = server.withPassphrase( decrypt( server.getPassphrase() ) ); + server.setPassphrase( decrypt( server.getPassphrase() ) ); } catch ( SecDispatcherException e ) { @@ -90,7 +92,7 @@ public class DefaultSettingsDecrypter { try { - proxy = proxy.withPassword( decrypt( proxy.getPassword() ) ); + proxy.setPassword( decrypt( proxy.getPassword() ) ); } catch ( SecDispatcherException e ) { diff --git a/maven-settings-builder/src/main/java/org/apache/maven/settings/crypto/DefaultSettingsDecryptionRequest.java b/maven-settings-builder/src/main/java/org/apache/maven/settings/crypto/DefaultSettingsDecryptionRequest.java index 4281a6c8c8..9cb49ac40d 100644 --- a/maven-settings-builder/src/main/java/org/apache/maven/settings/crypto/DefaultSettingsDecryptionRequest.java +++ b/maven-settings-builder/src/main/java/org/apache/maven/settings/crypto/DefaultSettingsDecryptionRequest.java @@ -23,9 +23,9 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.List; -import org.apache.maven.api.settings.Proxy; -import org.apache.maven.api.settings.Server; -import org.apache.maven.api.settings.Settings; +import org.apache.maven.settings.Proxy; +import org.apache.maven.settings.Server; +import org.apache.maven.settings.Settings; /** * Collects parameters that control the decryption of settings. diff --git a/maven-settings-builder/src/main/java/org/apache/maven/settings/crypto/DefaultSettingsDecryptionResult.java b/maven-settings-builder/src/main/java/org/apache/maven/settings/crypto/DefaultSettingsDecryptionResult.java index d52f126960..ccdad196db 100644 --- a/maven-settings-builder/src/main/java/org/apache/maven/settings/crypto/DefaultSettingsDecryptionResult.java +++ b/maven-settings-builder/src/main/java/org/apache/maven/settings/crypto/DefaultSettingsDecryptionResult.java @@ -22,8 +22,8 @@ package org.apache.maven.settings.crypto; import java.util.ArrayList; import java.util.List; -import org.apache.maven.api.settings.Proxy; -import org.apache.maven.api.settings.Server; +import org.apache.maven.settings.Proxy; +import org.apache.maven.settings.Server; import org.apache.maven.settings.building.SettingsProblem; /** diff --git a/maven-settings-builder/src/main/java/org/apache/maven/settings/crypto/SettingsDecryptionRequest.java b/maven-settings-builder/src/main/java/org/apache/maven/settings/crypto/SettingsDecryptionRequest.java index 33c61a6aef..b344a99ed9 100644 --- a/maven-settings-builder/src/main/java/org/apache/maven/settings/crypto/SettingsDecryptionRequest.java +++ b/maven-settings-builder/src/main/java/org/apache/maven/settings/crypto/SettingsDecryptionRequest.java @@ -21,8 +21,8 @@ package org.apache.maven.settings.crypto; import java.util.List; -import org.apache.maven.api.settings.Proxy; -import org.apache.maven.api.settings.Server; +import org.apache.maven.settings.Proxy; +import org.apache.maven.settings.Server; /** * Collects parameters that control the decryption of settings. diff --git a/maven-settings-builder/src/main/java/org/apache/maven/settings/crypto/SettingsDecryptionResult.java b/maven-settings-builder/src/main/java/org/apache/maven/settings/crypto/SettingsDecryptionResult.java index a8d88b65b9..5b7b1f4b5a 100644 --- a/maven-settings-builder/src/main/java/org/apache/maven/settings/crypto/SettingsDecryptionResult.java +++ b/maven-settings-builder/src/main/java/org/apache/maven/settings/crypto/SettingsDecryptionResult.java @@ -21,8 +21,8 @@ package org.apache.maven.settings.crypto; import java.util.List; -import org.apache.maven.api.settings.Proxy; -import org.apache.maven.api.settings.Server; +import org.apache.maven.settings.Proxy; +import org.apache.maven.settings.Server; import org.apache.maven.settings.building.SettingsProblem; /** diff --git a/maven-toolchain-builder/src/main/java/org/apache/maven/toolchain/building/DefaultToolchainsBuilder.java b/maven-toolchain-builder/src/main/java/org/apache/maven/toolchain/building/DefaultToolchainsBuilder.java index 78d76f6afe..ad82e753db 100644 --- a/maven-toolchain-builder/src/main/java/org/apache/maven/toolchain/building/DefaultToolchainsBuilder.java +++ b/maven-toolchain-builder/src/main/java/org/apache/maven/toolchain/building/DefaultToolchainsBuilder.java @@ -88,8 +88,8 @@ public class DefaultToolchainsBuilder throw new ToolchainsBuildingException( problems.getProblems() ); } - - return new DefaultToolchainsBuildingResult( merged, problems.getProblems() ); + return new DefaultToolchainsBuildingResult( + new org.apache.maven.toolchain.model.PersistedToolchains( merged ), problems.getProblems() ); } private PersistedToolchains interpolate( PersistedToolchains toolchains, ProblemCollector problems ) 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 c13ee8b657..2d07a4a03c 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 @@ -23,7 +23,7 @@ import java.util.ArrayList; import java.util.List; import org.apache.maven.building.Problem; -import org.apache.maven.api.toolchain.PersistedToolchains; +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/ToolchainsBuildingResult.java b/maven-toolchain-builder/src/main/java/org/apache/maven/toolchain/building/ToolchainsBuildingResult.java index 0d91812148..f7c5f71554 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 @@ -22,7 +22,7 @@ package org.apache.maven.toolchain.building; import java.util.List; import org.apache.maven.building.Problem; -import org.apache.maven.api.toolchain.PersistedToolchains; +import org.apache.maven.toolchain.model.PersistedToolchains; /** * Collects the output of the toolchains builder. diff --git a/maven-toolchain-builder/src/test/java/org/apache/maven/toolchain/building/DefaultToolchainsBuilderTest.java b/maven-toolchain-builder/src/test/java/org/apache/maven/toolchain/building/DefaultToolchainsBuilderTest.java index 48a1bb5799..ef70b3420e 100644 --- a/maven-toolchain-builder/src/test/java/org/apache/maven/toolchain/building/DefaultToolchainsBuilderTest.java +++ b/maven-toolchain-builder/src/test/java/org/apache/maven/toolchain/building/DefaultToolchainsBuilderTest.java @@ -39,7 +39,6 @@ import java.io.InputStream; import java.util.Collections; import java.util.HashMap; import java.util.Map; -import java.util.Properties; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertNotNull; @@ -240,7 +239,8 @@ public class DefaultToolchainsBuilderTest ToolchainsBuildingResult result = toolchainBuilder.build( request ); String interpolatedValue = "testValue"; assertEquals(interpolatedValue, result.getEffectiveToolchains().getToolchains().get(0).getProvides().get( "key" ) ); - Xpp3Dom toolchainConfiguration = (Xpp3Dom) result.getEffectiveToolchains().getToolchains().get(0).getConfiguration(); + org.codehaus.plexus.util.xml.Xpp3Dom toolchainConfiguration = + (org.codehaus.plexus.util.xml.Xpp3Dom) result.getEffectiveToolchains().getToolchains().get(0).getConfiguration(); assertEquals(interpolatedValue, toolchainConfiguration.getChild("jdkHome").getValue()); assertNotNull( result.getProblems() ); assertEquals( 0, result.getProblems().size() );