@Override
    public final void setup() {

        // Setup mandatory environment facets
        try {

            if (log.isDebugEnabled()) {
                log.debug("ToolExecutionEnvironment setup -- Starting.");
            }

            // Build the ClassLoader as required for the JAXB tools
            holder = builder.buildAndSet();

            // Redirect the JUL logging handler used by the tools to the Maven log.
            loggingHandlerEnvironmentFacet.setup();

            // If requested, switch the locale
            if (localeFacet != null) {
                localeFacet.setup();
            }

            // Setup optional/extra environment facets
            for (EnvironmentFacet current : extraFacets) {
                try {
                    current.setup();
                } catch (Exception e) {
                    throw new IllegalStateException("Could not setup() EnvironmentFacet of type ["
                            + current.getClass().getName() + "]", e);
                }
            }

            if (log.isDebugEnabled()) {
                log.debug("ToolExecutionEnvironment setup -- Done.");
            }

        } catch (IllegalStateException e) {
            throw e;
        } catch (Exception e) {
            throw new IllegalStateException("Could not setup mandatory ToolExecutionEnvironment.", e);
        }
    }
@ Override public final void setup ( ) { try { if ( log . isDebugEnabled ( ) ) { log . debug ( "ToolExecutionEnvironment setup -- Starting." ) ; } holder = builder . buildAndSet ( ) ; loggingHandlerEnvironmentFacet . setup ( ) ; if ( localeFacet != null ) { localeFacet . setup ( ) ; } for ( EnvironmentFacet current : extraFacets ) { try { current . setup ( ) ; } catch ( Exception e ) { throw new IllegalStateException ( "Could not setup() EnvironmentFacet of type [" + current . getClass ( ) . getName ( ) + "]" , e ) ; } } if ( log . isDebugEnabled ( ) ) { log . debug ( "ToolExecutionEnvironment setup -- Done." ) ; } } catch ( IllegalStateException e ) { throw e ; } catch ( Exception e ) { throw new IllegalStateException ( "Could not setup mandatory ToolExecutionEnvironment." , e ) ; } }
{@inheritDoc}