@ Override protected void setup ( ) throws MojoExecutionException { if ( verbose ) { getLog ( ) . info ( "Rox configuration is generated" ) ; } // Check if the ROX configuration is available if ( roxActive && roxConfig != null ) { // Check the ROX configuration file if ( ! roxConfig . exists ( ) || ! roxConfig . isFile ( ) || ! roxConfig . getAbsolutePath ( ) . endsWith ( ".yml" ) ) { getLog ( ) . warn ( "The " + ROX_PROPERTIES_FILENAME + " configuration seems not to be a valid file or path is incorrect. Rox will be disabled." ) ; roxActive = false ; } else { try { // Prepare the resource to copy Resource r = new Resource ( ) ; r . setFiltering ( true ) ; r . setDirectory ( roxConfig . getParent ( ) ) ; r . setIncludes ( Arrays . asList ( new String [ ] { roxConfig . getName ( ) } ) ) ; // Configure the resource filtering MavenResourcesExecution mre = new MavenResourcesExecution ( Arrays . asList ( new Resource [ ] { r } ) , getWorkingDirectory ( ) , project , encoding , null , null , session ) ; // Filter the resources mavenResourcesFiltering . filterResources ( mre ) ; } catch ( MavenFilteringException mfe ) { getLog ( ) . warn ( "Unable to filter the " + ROX_PROPERTIES_FILENAME + " file. Rox will be disabled." , mfe ) ; roxActive = false ; } } } else { getLog ( ) . info ( "No rox configuration to use" ) ; roxActive = false ; } }
Apply the internal setup for the plugin