Could not group and minify JS and CSS - war export

Forum to discuss the new web client version of Servoy.

Could not group and minify JS and CSS - war export

Postby robrecht » Thu Jun 15, 2017 4:54 pm

Hi,

I want to export my demo solution in NG client to a war file.
At the last step I get an error saying "Could not group and minify JS and CSS resources"
This must have to do something with my custom web components since other solutions not referring to this component package export fine.

Any suggestions?

Thanks
robrecht
 
Posts: 99
Joined: Wed Aug 01, 2012 4:30 pm

Re: Could not group and minify JS and CSS - war export

Postby paronne » Thu Jun 15, 2017 5:37 pm

Hi Rob,

please create a case in our support system for the issue.
In the meantime if you identify which package is preventing you from grouping you can explicitly tell Servoy not to group it's library dependency by adding "group":false in the .spec

example
Code: Select all
"libraries": [{"name":"font-awesome.css", "version":"4.6.3", "url":"servoyextra/fontawesome/lib/font-awesome.min.css", "mimetype":"text/css", "group":false}],
paronne
 
Posts: 202
Joined: Fri Nov 02, 2012 3:21 pm

Re: Could not group and minify JS and CSS - war export

Postby jay.rao » Fri Jun 16, 2017 12:20 pm

Fixed,

In case you have more than one component you can always create a lib folder(at component's folder for e.g check bootstrapextracomponents) and add reference to files in Manifest.mf to avoid this issue.Also this issue may occur if you have added js files into component itself i.e with spec and html files ,so to avoid you always add group:false in the spec file or move those files to manifest.mf
jay.rao
 
Posts: 59
Joined: Mon Apr 10, 2017 1:32 pm

Re: Could not group and minify JS and CSS - war export

Postby robrecht » Fri Jun 16, 2017 12:36 pm

Thanks a lot Paolo and Jay
robrecht
 
Posts: 99
Joined: Wed Aug 01, 2012 4:30 pm

Re: Could not group and minify JS and CSS - war export

Postby paronne » Fri Jun 16, 2017 12:49 pm

Very good point Jay.
Adding the library reference into the Manifest instead of the .spec file is anyhow a good strategy when many components depends on the same libraries. For example our bootstrapcomponents reference their dependencies in the MANIFEST.MF instead of repeating the same library dependency in each single .spec file


Code: Select all
Manifest-Version: 1.0
Ant-Version: Apache Ant 1.8.4
Created-By: 1.7.0_05-b06 (Oracle Corporation)
CSS-ClientLibs: css/bootstrap/css/bootstrap.css;name=bootstrap;version=3.3.1
JS-ClientLibs: bootstrapcomponents/lib/js/bscomponents-common.js;name=bscomponents-common.js;version=1.0.0,
Bundle-Name: Bootstrap Components
Bundle-SymbolicName: bootstrapcomponents
Bundle-Version: 1.2.1
Package-Type: Web-Component

Name: button/button.spec
Web-Component: True
.....
paronne
 
Posts: 202
Joined: Fri Nov 02, 2012 3:21 pm


Return to Servoy NGClient

Who is online

Users browsing this forum: No registered users and 6 guests