ci.gradle
ci.gradle copied to clipboard
Unable to deploy a single war from multi-war project
When multiple war files are produced by a single gradle project, you cannot choose just one to bundle with liberty. Using the following configuration to select just one of the war task:
liberty {
server {
deploy {
apps = [libertyWar]
}
}
Results in the following message:
At least one application is not defined in the server configuration but the build file indicates it should be installed in the apps folder. Application configuration is being added to the target server configuration dropins folder by the plug-in.
And an installed_apps_XXXXXXXXXX.xml
config file generated under configDropins/defaults
which interferes with the intended configuration.
What is getting added to the installed_apps_xxx.xml
file? All the war files or just the libertyWar
one specified in the apps attribute? Is the libertyWar
application configured in your server.xml?
In generated install_apps_configuration_xxx.xml
file contains
<?xml version="1.0" encoding="UTF-8"?>
<server>
<webApplication id="foo-app" location="foo-app.war" name="foo-app"/>
<webApplication id="foo-app" location="foo-app.war" name="foo-app"/>
</server>
The source server.xml
contains
<?xml version="1.0" encoding="UTF-8"?>
<server description="foo-server">
<application name="foo" context-root="/" location="foo.war" type="war"/>
</server>
The libertyWar
war task produces foo.war
Can you provide the rest of the build.gradle file? Or a sample test project for us to reproduce?
@cmuchinsky Is this issue still a problem for you? If so, can you provide a sample test project so we can recreate the issue?
I believe this is still a bug, but have since refactored my build to work around it by not having more than one war file produced from a single gradle build.