-
Notifications
You must be signed in to change notification settings - Fork 58
How to manage dependencies by myself correctly? #514
Comments
Hi,
Sometime, when I debug it slowly, it will complain about I was able to workaround this issue by adding the bellow snippet to
My second issue is about the |
Hi, We have the same issue here. Is a fix in planning? |
Hi, To manage your own dependencies you first have to realize that the configurations which exist there are there for a reason. The plugin will need different kinds of classpaths when building a Vaadin application depending on what kind of Vaadin application you are building. For example a server-side only Vaadin application only requires the vaadin-server configuration while a Vaadin application with a custom Widgetset will also require the vaadin-client configuration so it can use that to construct the widgetset compiler classpath. The testbench, spring boot etc. configurations are also there for similar reasons. The way the plugin knows which classpath to apply to which scenario is by using different configurations. So if you want to manage the dependencies yourself you will need to populate the different configurations by yourself, you can't just put everything in compile. As @qtdzz points out 4.0 will behave differently than 4.7 as the Gradle guys keep changing how the dependencies are resolved. Currently there are only tests up to 4.5 so there might be some breaking changes even in later versions. The target for 2.0 would be to move toward an dependency API described here https://github.com/devsoap/gradle-vaadin-flow/wiki/Dependency-management. This would allow you to easier select if you want to start from an empty set of dependencies or to autoconfigure them. However, the configurations will need to continue to exist as the classpaths still need to be resolved. |
@johndevs Why you do not provide example of correct configuration when "manageDependencies false" is used? |
@Arvidas1 The reason examples for it doesn't exist is that it is a not preferred way of defining dependencies as you need to know the internals of the plugin to understand how to define them correctly. 90% of the use-cases for the plugin should work without manually defining the dependencies, so I'd rather discuss why you need to manually set them. And if you find a use-case where the plugin fails to configure them correctly then I'd rather fix that then having everyone to manually define all their dependencies. |
One reason could be issue #541 . In my case, I am missing the Vaadin libraries in the exploded war when they are managed by the plugin. |
Hi John, I have a problem while setting
manageDependencies
flag to false and provide dependencies by myself.The problem is actually starting from version 1.2.5. Before that everything was fine.
Here is my example application https://github.com/qtdzz/my-example-application which is broken.
The console looks like this
Is it anyhow releated to this comment #489 (comment)?
I also have an additional question releated to the
--build-cache
. When trying with the plugin version 1.2.4,my-example-application
works quite well with significant improvements but in our real project (where vaadin application is a submodule), theBuild cache key
is different on everytime I runvaadinCompile
. Do you have any idea why it goes wrong?Thank you.
The text was updated successfully, but these errors were encountered: