Closed belyaev-andrey closed 4 years ago
Sample project: logstashtest.zip
It was decided to add server
dependency type to modules. If dependency added as server
to core
, web
or portal
modules (modules that have task with type CubaDeployment
) it will be placed to server libs by deploy
, buildWar
and buildUberJar
tasks.
Case 1
server
to the core module in the build.gradle
fileapp.jar
)AR: Server libs were added to the web module. Also, server libs add in the portal module if it was added to the project.
Case 2
Use Local Maven repository
property in the Project propertiesserver
to the core moduleserver
to the web moduleAR: Server libs for the first artifact coordinate and the second artifact coordinates were added to the one folder
Checked:
Environment
Description of the bug or enhancement
Case: I need to add a 3rd-party appender to the logstash. I use the following in my logback configuration file for both uberJar and WAR deploy:
I need to add a dependency to my project:
It works fine if I use WAR deployment scheme, logs are being set to the
logstash
host.But for the UberJar it doesn't work, because logback starts BEFORE the application is started, therefore in UberJar I got an error:
This can be resolved by adding the dependency as
uberJar
, notruntime
.Expected behavior I change the dependency type to uberJar:
and the library is unpacked for uberJar and added as a dependency for WAR.
Actual behavior If I change dependency type to uberJar I got an error:
The problem can be solved if the dependency is declared at top level:
But in this case, the library is not packed to WAR files and I got the error:
If the dependency is declared at both places (top level and global module), it is packed twice to the uberJar.