I have found why it worked before and not in our new version.

In our earlier versions minification was not enabled apparently as it is disabled by default. Later we added a dependency to tapestry-webresources. This library enables minification in its module class. This explains why it didn't cause any problems before.

Also I did not know minification was only used when the application was set in Tapestry production mode. Explaining why it didn't work for some builds and did for others.

Is there a reason tapestry-webresources does enable it by default, or can I temporarily disable it again in my own module class until I find a real solution?


Op 12/03/2018 om 17:56 schreef Cezary Biernacki:
As far as I can tell, it is not directly supported, but you can override
existing minimizer and just disable minimisation for particular files, like

In your *Module class add necessary contribution

public static void overrideJavaScriptMinimizer(final
MappedConfiguration<String, ResourceMinimizer> configuration) {

and define your minimisation class by extending GoogleClosureMinimizer and
overriding "isEnabled()" method with appropriate logic to disable
minimisation for specific files

public class MyGoogleClosureMinimizer extends GoogleClosureMinimizer {

     protected boolean isEnabled(final StreamableResource resource) {
         return super.isEnabled(resource) &&



    - I have not tested this example code, so you might fix some details,
    but I know that something similar should work (I wrote my custom JavaScript
    minimizers for Tapestry 5.4);
    - GoogleClosureMinimizer is part of Tapestry's internals, so be warned
    that it might require extra porting to new Tapestry's versions;
    - alternative approach is to replace global ResourceMinimizer service
    (see org.apache.tapestry5.internal.services.assets.MasterResourceMinimizer
    for default implementation) and your own logic to decide if minimisation
    should be performed.

Best regards,

On Mon, Mar 12, 2018 at 5:30 PM, Nathan Quirynen <
nat...@pensionarchitects.be> wrote:


on our testing server we get the following error:

... JSC_PARSE_ERROR. Parse error. getters are not supported in older
versions of JavaScript. If you are targeting
newer versions of JavaScript, set the appropriate language_in option. at
ed: Mon Mar 12 15:20:19 CET 2018 size: 50791> line 1732 : 0.
at org.apache.tapestry5.internal.webresources.GoogleClosureMini
at org.apache.tapestry5.internal.webresources.AbstractMinimizer
at org.apache.tapestry5.internal.webresources.AbstractMinimizer
at org.apache.tapestry5.ioc.internal.OperationTrackerImpl.perfo
at org.apache.tapestry5.ioc.internal.PerThreadOperationTracker.
... It does not occur when running the same application on my local machine
in a Tomcat (same as on server).

Any idea what could be the problem here?
If no fix can be found, is there a way to tell Tapestry to not minimize
this specific file to maybe get it working that way?


To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org

Reply via email to