/** * @throws MojoExecutionException */ private void setDefaultWrappers() throws MojoExecutionException { final MavenResourcesExecution mavenResourcesExecution = new MavenResourcesExecution(); mavenResourcesExecution.setEscapeString( escapeString ); try { defaultFilterWrappers = mavenFileFilter.getDefaultFilterWrappers( project, filters, false, this.session, mavenResourcesExecution ); } catch ( MavenFilteringException e ) { getLog().error( "fail to build filering wrappers " + e.getMessage() ); throw new MojoExecutionException( e.getMessage(), e ); } }
/** * @throws MojoExecutionException */ private void setDefaultWrappers() throws MojoExecutionException { final MavenResourcesExecution mavenResourcesExecution = new MavenResourcesExecution(); mavenResourcesExecution.setEscapeString( escapeString ); try { defaultFilterWrappers = mavenFileFilter.getDefaultFilterWrappers( project, filters, false, this.session, mavenResourcesExecution ); } catch ( MavenFilteringException e ) { getLog().error( "fail to build filering wrappers " + e.getMessage() ); throw new MojoExecutionException( e.getMessage(), e ); } }
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 ); } }
protected void filter(File sourceFile, File targetFile) throws MojoExecutionException { try { if (StringUtils.isEmpty(encoding)) { getLog().warn( "File encoding has not been set, using platform encoding " + ReaderFactory.FILE_ENCODING + ", i.e. build is platform dependent!"); } targetFile.getParentFile().mkdirs(); final MavenResourcesExecution mre = new MavenResourcesExecution(); mre.setMavenProject(project); mre.setMavenSession(mavenSession); mre.setFilters(null); mre.setEscapedBackslashesInFilePath(true); final LinkedHashSet<String> delimiters = new LinkedHashSet<>(); delimiters.add("${*}"); mre.setDelimiters(delimiters); @SuppressWarnings("rawtypes") List filters = mavenFileFilter.getDefaultFilterWrappers(mre); mavenFileFilter.copyFile(sourceFile, targetFile, true, filters, encoding, true); } catch (MavenFilteringException e) { throw new MojoExecutionException(e.getMessage(), e); } }
protected void filter(File sourceFile, File targetFile) throws MojoExecutionException { try { if (StringUtils.isEmpty(encoding)) { getLog().warn( "File encoding has not been set, using platform encoding " + ReaderFactory.FILE_ENCODING + ", i.e. build is platform dependent!"); } targetFile.getParentFile().mkdirs(); final MavenResourcesExecution mre = new MavenResourcesExecution(); mre.setMavenProject(project); mre.setMavenSession(mavenSession); mre.setFilters(null); mre.setEscapedBackslashesInFilePath(true); final LinkedHashSet<String> delimiters = new LinkedHashSet<>(); delimiters.add("${*}"); mre.setDelimiters(delimiters); @SuppressWarnings("rawtypes") List filters = mavenFileFilter.getDefaultFilterWrappers(mre); mavenFileFilter.copyFile(sourceFile, targetFile, true, filters, encoding, true); } catch (MavenFilteringException e) { throw new MojoExecutionException(e.getMessage(), e); } }
getLog().error( "error filtering context.xml : " + e.getMessage(), e ); throw new MojoExecutionException( "error filtering context.xml : " + e.getMessage(), e );
getLog().error( "error filtering context.xml : " + e.getMessage(), e ); throw new MojoExecutionException( "error filtering context.xml : " + e.getMessage(), e );
throw new MojoExecutionException( "filtering issue: " + e.getMessage(), e );
throw new MojoExecutionException( "filtering issue: " + e.getMessage(), e );
throw new MojoExecutionException( "filtering issue: " + e.getMessage(), e );
IOException ioe = new IOException( "Error filtering file '" + source + "': " + e.getMessage(), e ); throw ioe;
throw new MojoExecutionException( e.getMessage(), e );
throw new MojoExecutionException("Failure while processing/filtering markdown sources: " + e.getMessage(), e);
throw new MojoExecutionException( e.getMessage(), e );
getLog().error( "fail to build filering wrappers " + e.getMessage() ); throw new MojoExecutionException( e.getMessage(), e );