I am trying to solve the same issue and I came to believe this is not possible. (It's 2016, people. This is not rocket science.)
The error I am getting is:
[INFO] --- maven-confluence-plugin:6.2.4:compress-resources (default-compress-resources) @ confluence-tagging ---
[INFO] Compiling javascript using YUI
[ERROR] illegal character
And then errors in some file deep in node_modules
that should definitely not be included in the plugin build.
I tried to list all available options for the compressor plugin using this command:
atlas-mvn help:describe -Dplugin=com.atlassian.maven.plugins:maven-confluence-plugin -Dgoal=compress-resources -Ddetail=true
The list says that there is no such option. I tried to configure it to use Closure Compiler instead, but it did not help much. The configuration is this:
<plugin>
<groupId>com.atlassian.maven.plugins</groupId>
<artifactId>maven-confluence-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>compress-resources</goal>
</goals>
</execution>
</executions>
<configuration>
<closureJsCompiler>true</closureJsCompiler>
</configuration>
</plugin>
Which just gives me even longer list of errors.
At this point, I am giving up.
Here are some relevant links:
https://developer.atlassian.com/docs/advanced-topics/supporting-minification-of-javascript-and-css-resources - desperately outdated
https://answers.atlassian.com/questions/221949/how-to-select-which-resources-are-compressed