Skip to content

Commit

Permalink
Specifies a charset to use when writing files to disk.
Browse files Browse the repository at this point in the history
  • Loading branch information
gdrouet committed Jun 25, 2015
1 parent d332868 commit e631fd7
Showing 1 changed file with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,12 @@ public class StaticHelperMojo extends AbstractMojo {
@Parameter(defaultValue = "${project.build.outputDirectory}")
private String output;

/**
* Charset to use when writing to the disk.
*/
@Parameter(defaultValue = "UTF-8")
private String charset;

/**
* Base path where every processed statics referenced by HTML will be served.
*/
Expand Down Expand Up @@ -174,10 +180,10 @@ public void execute() throws MojoExecutionException {
temp.getAbsolutePath()));
}

final List<String> relocated = new WuicTask(xml, temp.toString(), o, contextPath, properties).executeTask();
final List<String> relocated = new WuicTask(xml, temp.toString(), o, contextPath, properties, charset).executeTask();
projectHelper.addResource(project, temp.toString(), relocated, null);
} else {
new WuicTask(xml, null, o, contextPath, properties).execute();
new WuicTask(xml, null, o, contextPath, properties, charset).execute();
}
} catch (WuicException we) {
throw new MojoExecutionException(FAIL_MESSAGE, we);
Expand Down

0 comments on commit e631fd7

Please sign in to comment.