public void execute() throws MojoExecutionException,
            MojoFailureException {
        ArrayList<String> params = new ArrayList<String>();
        params.add(AerialParamKeys.INPUT_TYPE.toString());
        params.add(inputType.toString());
        params.add(AerialParamKeys.SOURCE.toString());
        params.add(source);
        params.add(AerialParamKeys.OUTPUT_TYPE.toString());
        params.add(outputType.toString());
        params.add(AerialParamKeys.DESTINATION.toString());
        params.add(destination);
        if (configurationFile != null) {
            params.add(AerialParamKeys.CONFIGURATION.toString());
            params.add(configurationFile);
        }
        if (namedParams != null) {
            for (Entry<String, String> entry : namedParams.entrySet()) {
                params.add(entry.getKey() + "=" + entry.getValue());
            }
        }
        if (valueParams != null) {
            for (String param : valueParams) {
                param = param.replaceAll("=", "\\=");
                params.add(param);
            }
        }
        String[] paramsArray = new String[params.size()];
        paramsArray = params.toArray(paramsArray);
        try {
            AerialMain.main(paramsArray);
        } catch (Exception e) {
            e.printStackTrace();
            throw new MojoFailureException("Failed to execute generation");
        }
    }
public void execute ( ) throws MojoExecutionException , MojoFailureException { ArrayList < String > params = new ArrayList < String > ( ) ; params . add ( AerialParamKeys . INPUT_TYPE . toString ( ) ) ; params . add ( inputType . toString ( ) ) ; params . add ( AerialParamKeys . SOURCE . toString ( ) ) ; params . add ( source ) ; params . add ( AerialParamKeys . OUTPUT_TYPE . toString ( ) ) ; params . add ( outputType . toString ( ) ) ; params . add ( AerialParamKeys . DESTINATION . toString ( ) ) ; params . add ( destination ) ; if ( configurationFile != null ) { params . add ( AerialParamKeys . CONFIGURATION . toString ( ) ) ; params . add ( configurationFile ) ; } if ( namedParams != null ) { for ( Entry < String , String > entry : namedParams . entrySet ( ) ) { params . add ( entry . getKey ( ) + "=" + entry . getValue ( ) ) ; } } if ( valueParams != null ) { for ( String param : valueParams ) { param = param . replaceAll ( "=" , "\\=" ) ; params . add ( param ) ; } } String [ ] paramsArray = new String [ params . size ( ) ] ; paramsArray = params . toArray ( paramsArray ) ; try { AerialMain . main ( paramsArray ) ; } catch ( Exception e ) { e . printStackTrace ( ) ; throw new MojoFailureException ( "Failed to execute generation" ) ; } }
.