Developer
Get Support
Sign in
Get Support
Sign in
DOCUMENTATION
Cloud
Data Center
Resources
Sign in
Sign in
DOCUMENTATION
Cloud
Data Center
Resources
Sign in
Last updated Mar 29, 2018

How to switch to non-minified JavaScript for debugging

Although you should always serve minified JavaScript, temporarily running Confluence with non-minified JavaScript can be useful for debugging.

There are a few parameters that can be passed to AMPS plugin's configuration:

  • compressResources – this parameter enables minification of all resources if set to true, default value is true.
  • compressJs – this parameter enables minification of only JS files if set to true, default value is true.
  • compressCss – this parameter enables minification of only CSS files if set to true, default value is true.

In your pom.xml file, you can create a compressJs property that defaults to true and then override it with command line. For example:

1
2
<build>
    <plugins>
        <plugin>
            <groupId>com.atlassian.maven.plugins</groupId>
            <artifactId>maven-confluence-plugin</artifactId>
            <version>${amps.version}</version>
            <extensions>true</extensions>
            <configuration>
                <compressJs>${compressJs}</compressJs>
            </configuration>
        ...
        </plugin>
    </plugins>
</build>
<properties>
    <compressJs>true</compressJs>
</properties>             
1
2
atlas-package -DcompressJs=false

When you finish debugging, you can simply omit compressJs parameter.

Rate this page: