From 4f05b59de9ff8582ccd3bc4067a7ba72aad7b8cd Mon Sep 17 00:00:00 2001 From: Robert Scholte Date: Sat, 17 Jan 2015 16:27:55 +0100 Subject: [PATCH] [MNG-5754] Toolchains should be read during initialization No need to wrap ToolchainsBuildingException with MisconfiguredToolchainException. The latter was required when using ToolchainManagerPrivate --- .../src/main/java/org/apache/maven/cli/MavenCli.java | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) 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 13108f29cf..5b7bd7fab3 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 @@ -68,10 +68,8 @@ import org.apache.maven.settings.building.SettingsBuilder; import org.apache.maven.settings.building.SettingsBuildingRequest; import org.apache.maven.settings.building.SettingsBuildingResult; import org.apache.maven.settings.building.SettingsProblem; -import org.apache.maven.toolchain.MisconfiguredToolchainException; import org.apache.maven.toolchain.building.DefaultToolchainsBuildingRequest; import org.apache.maven.toolchain.building.ToolchainsBuilder; -import org.apache.maven.toolchain.building.ToolchainsBuildingException; import org.apache.maven.toolchain.building.ToolchainsBuildingResult; import org.codehaus.plexus.ContainerConfiguration; import org.codehaus.plexus.DefaultContainerConfiguration; @@ -863,15 +861,7 @@ public class MavenCli slf4jLogger.debug( "Reading user toolchains from " + getLocation( toolchainsRequest.getUserToolchainsSource(), userToolchainsFile ) ); - ToolchainsBuildingResult toolchainsResult; - try - { - toolchainsResult = toolchainsBuilder.build( toolchainsRequest ); - } - catch ( ToolchainsBuildingException e ) - { - throw new MisconfiguredToolchainException( e.getMessage(), e ); - } + ToolchainsBuildingResult toolchainsResult = toolchainsBuilder.build( toolchainsRequest ); eventSpyDispatcher.onEvent( toolchainsRequest );