//TODO how to point to the local path?
File tch = new File( System.getProperty( "user.home" ),
".m2/toolchains.xml" );
if ( tch.exists() )
{
MavenToolchainsXpp3Reader reader = new MavenToolchainsXpp3Reader();
InputStreamReader in = null;
try
{
in = new InputStreamReader( new BufferedInputStream( new FileInputStream( tch ) ) );
return reader.read( in );
}
catch ( Exception ex )
{
throw new MisconfiguredToolchainException( "Cannot read toolchains file at " + tch.getAbsolutePath( ),
ex );