Hello,
When I build the war with gradle, the polymer-client module is always introduced. How could I exclude it?
Thanks
Hello,
When I build the war with gradle, the polymer-client module is always introduced. How could I exclude it?
Thanks
Hi, in configure(polymerClientModule) {
block remove the following:
apply(plugin: 'war')
war {
from file(mainBuildDir)
}
Hi,
I have done exactly that but it still includes the polymer in the war
Are you building single war?
I tried with sigleWar too but it keeps appearing the polymer module
task buildWarLocalhost(type: CubaWarBuilding) {
webXmlPath = ‘modules/web/web/WEB-INF/single-war-web.xml’
logbackConfigurationFile = ‘etc/war-logback.xml’
coreContextXmlPath = ‘modules/core/web/META-INF/war-context-localhost.xml’
appProperties = [‘cuba.automaticDatabaseUpdate’ : false]
includeContextXml = true
includeJdbcDriver = true
appHome = ‘${catalina.base}/__app_home’
singleWar = true
}
configure(polymerClientModule) {
apply(plugin: ‘cuba’)
apply(plugin: ‘idea’)
apply(plugin: 'maven')
def frontAppDir = "${modulePrefix}-front"
task installGenerators(type: NpmTask) {
workingDir = file('generation')
args = ['install']
inputs.file 'generation/package.json'
outputs.dir 'generation/node_modules'
}
task listGenerators(type: NodeTask, dependsOn: installGenerators) {
script = file("generation/node_modules/@cuba-platform/front-generator/bin/gen-cuba-front")
args = ['list', '-s', 'generation/generators.json']
outputs.file 'generation/generators.json'
}
def mainBuildDir = 'build/es6-unbundled'
task installBowerPackages(type: NodeTask, dependsOn: npmInstall) {
script = file("node_modules/bower/bin/bower")
args = ['install','-F']
inputs.file "bower.json"
outputs.dir "bower_components"
}
task buildPolymer(type: NpmTask, dependsOn: installBowerPackages) {
args = ['run','build']
inputs.files fileTree('./') {
exclude 'build'
}
outputs.dir "build"
}
assemble.dependsOn buildPolymer
task deployUnbundled(type: Copy) {
from file('./')
include 'bower_components/**'
include 'src/**'
into "$cuba.tomcat.dir/webapps/$frontAppDir"
}
task deploy(type: Copy, dependsOn: [assemble, deployUnbundled]) {
from file(mainBuildDir)
into "$cuba.tomcat.dir/webapps/$frontAppDir"
}
}
Unfortunately it’s not possible to exclude some module from war building at the moment (I’ve created issue for that). If you don’t need singleWar then you can just ignore created war for polymer.