Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Task copying frontend resources does not visit the full classpath (dev-mode 2.0.3) #6074

Closed
manolo opened this issue Jul 15, 2019 · 2 comments · Fixed by #6075 or #6083
Closed

Task copying frontend resources does not visit the full classpath (dev-mode 2.0.3) #6074

manolo opened this issue Jul 15, 2019 · 2 comments · Fixed by #6075 or #6083

Comments

@manolo
Copy link
Member

manolo commented Jul 15, 2019

Issue

  • clone bookstore-starter-flow project
  • update platform version to 14.0.0.rc5
  • when in the root folder run mvn install -DskipTests
  • move to the bookstore-starter-flow-ui and run mvn jetty:run
  • you can see that web-pack-dev-server fails because it does not find connectors in node_modules/@vaadin/flow-frontend

Cause

TaskUpdatePackages cleans the node_modules folder because platform version changed, but TaskCopyFrontendFiles does not copies all the files since apparently the system property java.class.path does not include all the jars in the application classpath.

In my local only one jar was passed /usr/local/Cellar/maven/3.6.0/libexec/boot/plexus-classworlds-2.5.2.jar which obviously is not the classpath of the application. The servlet container does not set the system property appropriately, and we need to figure out the jars used in the app from the class loader

Workaround

run mvn prepare-package before running mvn jetty:run the first time. It needs to be run again after cleaning or changing dependencies

@manolo manolo changed the title The task for copying frontend resources does not visit the full classpath (dev-mode 2.0. Task copying frontend resources does not visit the full classpath (dev-mode 2.0.3) Jul 15, 2019
@caalador
Copy link
Contributor

The question is why would you use maven without using the maven plugin?
The runtime copying is only for when the application is started from an ide that actually adds the dependencies to the property (maven doesn't do this).

I expect the problem is that the copyResources step is in BuildFrontend and not in PrepareFrontend

@Legioth
Copy link
Member

Legioth commented Jul 17, 2019

#6083 will also be needed before this issue can be properly closed.

caalador added a commit that referenced this issue Jul 17, 2019
In some cases it seems that the system
class loader doesn't actually find any resources.

Fixes #6074
@mehdi-vaadin mehdi-vaadin added this to the 2.0.4 milestone Jul 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants