Skip to content
This repository was archived by the owner on Apr 2, 2021. It is now read-only.

Dependencies are not being exported to WAR when managed by plugin #541

@LukasDoubleU

Description

@LukasDoubleU

Hello, I think I found a bug in the plugin and wanted to let you know about it.

I am using Eclipse 4.12, Buildship 3.1.1, Gradle 5.5.1 and the 2.beta1 version of this plugin.

I witnessed the following behaviour:
When the flag "manageDependencies", which is supposed to tell the Plugin that it should handle the Vaadin dependencies for me, is set to true, then my own dependencies are not being included inside WEB-INF/lib when exporting my project as war.

Usually that can be fixed by adding the following snippet:
war { classpath configurations.default }

Unfortunately in this case it had no effect.
I did some digging inside the plugin and found the following:
The plugin is overriding the war.classpath to add the vaadin dependencies to it, which is nice. Unfortunately it does so, by 'setting' the classpath instead of 'adding' to it. It tries to make up for it by then manually adding the compileClasspath to the war.classpath. In Gradle 5 dependencies are being declared with 'implementation' and are therefore not on the compileClasspath.

What I think the plugin should do:
Either not override war.classpath or include all dependencies.

Workaround:
Declare dependencies with 'compile'.
Since that was not an option for me in the build environment I used the following code to 'redeclare' all dependencies:
dependencies { configurations.default.incoming.dependencies.each { compile it } }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions