Skip to content
This repository has been archived by the owner on Oct 12, 2021. It is now read-only.

war package dependencies in bower_components missing #251

Open
ru5t opened this issue May 16, 2019 · 2 comments
Open

war package dependencies in bower_components missing #251

ru5t opened this issue May 16, 2019 · 2 comments

Comments

@ru5t
Copy link

ru5t commented May 16, 2019

Desktop (please complete the following information):

  • OS: Arch Linux
  • JDK version: 11
  • Gradle version: 5.1.1
  • Vaadin Plugin version: 1.1.2

Describe the bug
Using AppLayout addon ("com.github.appreciated:app-layout-addon:2.0.8"). It uses org.webjars.bowergithub.oyeharry:app-menu:2.1.2 (from dependency graph). When war packed and deployed facing unsatisfied resource
404 : http://localhost:8080/frontend-es6/bower_components/app-menu/app-menu-icon-item.html
In war file: frontend-es6/bower_components/ contains only webcomponentsjs folder.
In basic starter projects (Maven-based) resulting war contains much more stuff.
To Reproduce
Steps to reproduce the behavior:

  1. Setup project like in wiki but with additional
plugins{
...
  id 'war'
}
vaadin {
  productionMode = true
}
  1. Run Gradle task vaadinCreateProject
  2. Run Gradle task war
  3. Explore produced war file's frontedn-es6/bower_components dir.

Expected behavior
Mentioned dir contains all necessary dependencies

Additional context
I'm fairly new to this plugin so maybe this task supposed to be done other way.

@stapel
Copy link

stapel commented Jun 6, 2019

For me, the war-plugin does somehow inhibit the invocation of vaadinAssembleClient in productionMode (does not gets called in build anymore either).

I manually added the dependency to war, which works for me.

if (vaadin.productionMode) {
    war.dependsOn(AssembleClientDependenciesTask.NAME)
}

(plugin 1.2.0, with gradle 5.4.1)

@johndevs
Copy link
Member

The WAR task should be made dependent on the assemble task by the WarPluginAction.groovy#L41.

The only reason I can see why this could possibly fail is if you apply the plugin to project without the WAR plugin.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

3 participants