Closed haulmont-git closed 4 years ago
Workaround - exclude unnecessary JARs from GWT compilation:
configure(webToolkitModule) {
configurations.compile {
exclude group: 'org.springframework'
exclude group: 'org.eclipse.persistence'
exclude group: 'org.codehaus.groovy'
exclude group: 'org.apache.ant'
}
Test case:
appComponent("com.haulmont.cuba:cuba-global:$cubaVersion")
appComponent("com.haulmont.reports:reports-global:$cubaVersion")
appComponent("com.haulmont.charts:charts-global:$cubaVersion")
appComponent('de.diedavids.cuba.instantlauncher:instantlauncher-global:0.5.0')
appComponent('com.haulmont.addon.admintools:cuba-at-global:1.5.1')
appComponent('com.haulmont.addon.emailtemplates:yet-global:1.4.2')
appComponent('com.haulmont.addon.restapi:restapi-global:7.2.2')
Actual: building project fails, because of the "Error 206 path too long" problem. This is really a blocker for Windows users.
Resolution:
Add parameter shortClassPath=true
to BuildWidgetSet
task for correct building on Windows:
task buildWidgetSet(type: CubaWidgetSetBuilding) {
widgetSetClass = 'com.company.testbuild.web.toolkit.ui.AppWidgetSet'
shortClassPath = true
}
This is due command line call to java.exe via javaexec being too long for Windows to handle
First noticed the issue with CubaEnhancingTask, but CubaWidgetSetBuilding and CubaWidgetSetDebug seem to be affected as well as they also use javaexec.
The common way if fixing that is replacing classpath command line argument by process environment variable for Windows OS. In Cuba, however, the developer is forced to extend Cuba task and replace the whole @TaskAction method (because javaexec call is in there) or to shorten the path to .gradle directory.
Generally, if Cuba tasks had @TaskAction variables stored as task class attributes (JavaExecSpec for javaexec, for instance, or individual javaexec parameters) developer would have more tools to amend task execution without extending the task class - just do some amendments in doFirst {} for instance.
Original issue: https://youtrack.haulmont.com/issue/PL-8895