[MNG-5754] Toolchains should be read during initialization

No need to wrap ToolchainsBuildingException with MisconfiguredToolchainException.
The latter was required when using ToolchainManagerPrivate
This commit is contained in:
Robert Scholte 2015-01-17 16:27:55 +01:00
parent f75008743b
commit 4f05b59de9
1 changed files with 1 additions and 11 deletions

View File

@ -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 );