private void copyNbmResources() throws MojoExecutionException { try { if ( StringUtils.isEmpty( encoding ) && isFilteringEnabled( nbmResources ) ) { getLog().warn( "File encoding has not been set, using platform encoding " + ReaderFactory.FILE_ENCODING + ", i.e. build is platform dependent!" ); } MavenResourcesExecution mavenResourcesExecution = new MavenResourcesExecution( Arrays.asList( nbmResources ), clusterDir, project, encoding, Collections.EMPTY_LIST, Collections.EMPTY_LIST, session ); mavenResourcesExecution.setEscapeWindowsPaths( true ); mavenResourcesFiltering.filterResources( mavenResourcesExecution ); } catch ( MavenFilteringException ex ) { throw new MojoExecutionException( ex.getMessage(), ex ); } }
private void copyNbmResources() throws MojoExecutionException { try { if ( StringUtils.isEmpty( encoding ) && isFilteringEnabled( nbmResources ) ) { getLog().warn( "File encoding has not been set, using platform encoding " + ReaderFactory.FILE_ENCODING + ", i.e. build is platform dependent!" ); } MavenResourcesExecution mavenResourcesExecution = new MavenResourcesExecution( Arrays.asList( nbmResources ), clusterDir, project, encoding, Collections.EMPTY_LIST, Collections.EMPTY_LIST, session ); mavenResourcesExecution.setEscapeWindowsPaths( true ); mavenResourcesFiltering.filterResources( mavenResourcesExecution ); } catch ( MavenFilteringException ex ) { throw new MojoExecutionException( ex.getMessage(), ex ); } }
/** {@inheritDoc} */ @Nonnull public Reader filter( @Nonnull Reader from, boolean filtering, MavenProject mavenProject, List<String> filters, boolean escapedBackslashesInFilePath, MavenSession mavenSession ) throws MavenFilteringException { MavenResourcesExecution mre = new MavenResourcesExecution(); mre.setMavenProject( mavenProject ); mre.setFileFilters( filters ); mre.setEscapeWindowsPaths( escapedBackslashesInFilePath ); mre.setMavenSession( mavenSession ); mre.setInjectProjectBuildFilters( true ); List<FilterWrapper> filterWrappers = getDefaultFilterWrappers( mre ); return filter( from, filtering, filterWrappers ); }
private void filterResources() throws MojoExecutionException { try { MavenResourcesExecution execution = new MavenResourcesExecution(getResources(), getFilteredAppDirectory(), project, encoding, filters, Collections.EMPTY_LIST, session); execution.setEscapeWindowsPaths(escapeWindowsPaths); execution.setSupportMultiLineFiltering(supportMultiLineFiltering); if (nonFilteredFileExtensions != null) { execution.setNonFilteredFileExtensions(nonFilteredFileExtensions); } resourceFilter.filterResources(execution); } catch (MavenFilteringException e) { throw new MojoExecutionException("Error while filtering Mule config files", e); } }
mavenResourcesExecution.setEscapeWindowsPaths(true); mavenResourcesExecution.setInjectProjectBuildFilters(false); mavenResourcesExecution.setOverwrite(true);
mavenResourcesExecution.setEscapeWindowsPaths(true); mavenResourcesExecution.setInjectProjectBuildFilters(false); mavenResourcesExecution.setOverwrite(true);
/** {@inheritDoc} */ public void copyFile( File from, File to, boolean filtering, MavenProject mavenProject, List<String> filters, boolean escapedBackslashesInFilePath, String encoding, MavenSession mavenSession ) throws MavenFilteringException { MavenResourcesExecution mre = new MavenResourcesExecution(); mre.setMavenProject( mavenProject ); mre.setFileFilters( filters ); mre.setEscapeWindowsPaths( escapedBackslashesInFilePath ); mre.setMavenSession( mavenSession ); mre.setInjectProjectBuildFilters( true ); List<FileUtils.FilterWrapper> filterWrappers = getDefaultFilterWrappers( mre ); copyFile( from, to, filtering, filterWrappers, encoding ); }
Collections.<String>emptyList(), session ); mavenResourcesExecution.setEscapeWindowsPaths( escapeWindowsPaths );