How to Compress ES6 files with maven for an Jira Plugin

Hi,

I have an ES6 compliant JS file, which I am trying to include in my Jira Plugin. unfortunately, when i run atlas-package the following error occurs.

 

[INFO] --- maven-amps-plugin:6.3.1:compress-resources (default-compress-resources) @ risk-management ---
[INFO] Compiling javascript using YUI
[ERROR] syntax error
AJS.toInit($ => {

[ERROR] Compilation produced 1 syntax errors.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 7.311 s
[INFO] Finished at: 2017-06-08T14:44:42+01:00
[INFO] Final Memory: 39M/300M
[INFO] ------------------------------------------------------------------------

 

I tried to insert this Code snippet in the Chrome console and it just works like a charm. Is there a way to use ES6 or do i have to use the old ways of JS?

1 answer

After some search I came to conclusion that using

<compressResources>false</compressResources>

option in maven-amps-plugin configuration is the only way right now. 

amps plugin comes with yuicompressor v2.4.7 from ancient 2012's

for JS compression you can use any other plugin or just don't use compression.

Suggest an answer

Log in or Join to answer
Community showcase
Sarah Schuster
Posted Jan 29, 2018 in Jira

What are common themes you've seen across successful & failed Jira Software implementations?

Hey everyone! My name is Sarah Schuster, and I'm a Customer Success Manager in Atlassian specializing in Jira Software Cloud. Over the next few weeks I will be posting discussion topics (8 total) to ...

3,304 views 14 20
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot