mvn package is falling over when trying to compress a utf-8 encoded file... what maven snippet do I need to specify the encoding?
Also it's attempting to compress already minified files resulting in them actually getting bigger - how can I disable the compressor altogether?
Voting for this question and the issue Joseph linked to. Does anyone have _any_ work around to at least allow me to host some resource files with my plugin? The syntax warnings I get don't help me track down a cause I can fix.
Does anyone know why AMPS is producing these errors. We have developers with AMPS 4.1.x and they can't run atlas-package because of YUI errors but it works fine on AMPS 3.10-3.11.
Vidar, I answered your question on the AMPS JIRA issue: https://ecosystem.atlassian.net/browse/AMPS-796?focusedCommentId=100003&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-100003
Put maven-jira-plugin version there to show the version known to work.
Also we have <extensions>true</extensions> under <plugin> - not sure if that's relevant
doesn't work either!
with extensions: false I get:
Cannot find lifecycle mapping for packaging: 'atlassian-plugin'.
Hmm... I know for a fact that our plugin's resources don't go through minification during build (we use other minification tools).
I'm editing the answer to add more from our POM
<compressResources>false</compressResources> worked great! Nothing minimized which is what I need now. Thanks. That leaves the question about how to selectively stop it from handling files it shouldn't. It is not clear why the default is to minimize non-js or non-css files in the first place.
Hey alright! This worked for me on confluence!
+1 for the Igor's answer.
The YUICompressor is called by Amps, the Atlassian maven plugin which compiles your jar. AMPS calls it with the current pom as a context, so you can configure it in your pom.xml. It has a <skip> configuration parameter, so this would probably be a good way to go:
<project> ... <build> ... <pluginManagement> <plugins> <plugin> <groupId>net.sf.alchim</groupId> <artifactId>yuicompressor-maven-plugin</artifactId>
<!-- The version is probably not necessary --> <version>0.7.1</version> <configuration> <skip>true</skip> </configuration> </plugin> </plugins> </pluginManagement> ... </build> </project>
You could vote for https://jira.atlassian.com/browse/JRA-24964
Actually that bug mentions a property atlassian.webresource.disable.minification
which you might be able to pass into the Java compile plugin?
atlassian.webresource.disable.minification is a system property of the hosting application that determines whether or not the plugin framework looks for minified files before serving the requested resource.
Unfortunately it does not control whether or not the Plugin SDK actually generates the minified files in the first place.
I think that's the million dollar question!
And eventually, the real answer. Thanks to Igor for finding this, and to Eddie for testing out and confirming: https://ecosystem.atlassian.net/browse/AMPS-796?focusedCommentId=96080&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-96080
From https://www.adaptavist.com/display/~jmort/2011/02/09/Advanced+Atlassian+Plugin+SDK I'd try something like this:
<project> <properties> <atlassian.dev.mode>false</atlassian.dev.mode> <atlassian.webresource.disable.minification>true</atlassian.webresource.disable.minification> </properties>
Hrm thanks, but that didn't work. The linked page leads me to believe that those are system properties passed to jira for when you do atlas-run - ie disable serving the minified files at runtime.
The odd thing is when I do help:effective-pom I'd expect to see where this being called from, but I don't.
Didn't work for me either, but Igor's answer did (extention=true, compress=false)