Hi Goran, I like your component, easy to use and works nicely!
I ran into the below issue though which requires a specific user directory on my development box:
[main]
INFO com.vaadin.flow.server.startup.DevModeInitializer - Starting dev-mode updaters in /Users/gatanaso/dev/github-repos/multiselect-combo-box-flow folder.
[WARNING]
java.io.UncheckedIOException: Failed to create directory '/Users/gatanaso/dev/github-repos/multiselect-combo-box-flow/target/frontend'
at com.vaadin.flow.server.startup.DevModeInitializer.initDevModeHandler(DevModeInitializer.java:267)
(..)
When I manually create this directory, everything works fine. But of course, I would rather not be dependent on that.
I’m using Vaaadin Flow 14.0.3 and version 2.1.0 of your component. Running with Java 1.8 on a MacOS Mojave.
EDIT: I published a new snapshot version that excludes the flow-build-info.json from the jar. Could you please try with the 2.1.1-SNAPSHOT version and let me know if this issue still occurs? Thank you
Thanks for your reply and sorry for my late response.
I downloaded your zip for 2.1.1-SNAPSHOT and used maven install to get this into my local maven repo. This build reported SUCCESS:
[INFO]
Scanning for projects...
[INFO]
[INFO]
-----------< org.vaadin.gatanaso:multiselect-combo-box-flow >-----------
[INFO]
Building Multiselect Combo Box 2.1.1-SNAPSHOT
[INFO]
--------------------------------[ jar ]
---------------------------------
[INFO]
[INFO]
--- maven-resources-plugin:2.6:resources (default-resources) @ multiselect-combo-box-flow ---
[INFO]
Using 'UTF-8' encoding to copy filtered resources.
[INFO]
skip non existing resourceDirectory /Users/thomas/git/multiselect-combo-box-flow-2.1.1-SNAPSHOT-sources/META-INF/maven/org.vaadin.gatanaso/multiselect-combo-box-flow/src/main/resources
[INFO]
[INFO]
--- vaadin-maven-plugin:14.0.0:prepare-frontend (default) @ multiselect-combo-box-flow ---
[INFO]
Added "name": "@vaadin/flow-deps" line.
[INFO]
Added "version": "1.0.0" line.
[INFO]
Added "license": "UNLICENSED" line.
[INFO]
Updated npm /Users/thomas/git/multiselect-combo-box-flow-2.1.1-SNAPSHOT-sources/META-INF/maven/org.vaadin.gatanaso/multiselect-combo-box-flow/target/frontend/package.json.
[INFO]
[INFO]
--- maven-compiler-plugin:3.1:compile (default-compile) @ multiselect-combo-box-flow ---
[INFO]
No sources to compile
[INFO]
[INFO]
--- maven-resources-plugin:2.6:testResources (default-testResources) @ multiselect-combo-box-flow ---
[INFO]
Using 'UTF-8' encoding to copy filtered resources.
[INFO]
skip non existing resourceDirectory /Users/thomas/git/multiselect-combo-box-flow-2.1.1-SNAPSHOT-sources/META-INF/maven/org.vaadin.gatanaso/multiselect-combo-box-flow/src/test/resources
[INFO]
[INFO]
--- maven-compiler-plugin:3.1:testCompile (default-testCompile) @ multiselect-combo-box-flow ---
[INFO]
No sources to compile
[INFO]
[INFO]
--- maven-surefire-plugin:2.12.4:test (default-test) @ multiselect-combo-box-flow ---
[INFO]
No tests to run.
[INFO]
[INFO]
--- maven-jar-plugin:3.1.2:jar (default-jar) @ multiselect-combo-box-flow ---
[INFO]
Building jar: /Users/thomas/git/multiselect-combo-box-flow-2.1.1-SNAPSHOT-sources/META-INF/maven/org.vaadin.gatanaso/multiselect-combo-box-flow/target/multiselect-combo-box-flow-2.1.1-SNAPSHOT.jar
[INFO]
[INFO]
--- maven-install-plugin:2.4:install (default-install) @ multiselect-combo-box-flow ---
[INFO]
Installing /Users/thomas/git/multiselect-combo-box-flow-2.1.1-SNAPSHOT-sources/META-INF/maven/org.vaadin.gatanaso/multiselect-combo-box-flow/target/multiselect-combo-box-flow-2.1.1-SNAPSHOT.jar to /Users/thomas/.m2/repository/org/vaadin/gatanaso/multiselect-combo-box-flow/2.1.1-SNAPSHOT/multiselect-combo-box-flow-2.1.1-SNAPSHOT.jar
[INFO]
Installing /Users/thomas/git/multiselect-combo-box-flow-2.1.1-SNAPSHOT-sources/META-INF/maven/org.vaadin.gatanaso/multiselect-combo-box-flow/pom.xml to /Users/thomas/.m2/repository/org/vaadin/gatanaso/multiselect-combo-box-flow/2.1.1-SNAPSHOT/multiselect-combo-box-flow-2.1.1-SNAPSHOT.pom
[INFO]
------------------------------------------------------------------------
[INFO]
BUILD SUCCESS
[INFO]
------------------------------------------------------------------------
[INFO]
Total time: 4.393 s
[INFO]
Finished at: 2019-10-25T13:38:23+02:00
[INFO]
------------------------------------------------------------------------
Unfortunately, when switching my pom to use version 2.1.1-SNAPSHOT, I get an “The import org.vaadin cannot be resolved” everywhere I import org.vaadin.gatanaso.MultiselectComboBox.
Thanks for getting back to me. Are you able to run the project, or it’s failing due to the import resolution issues?
Also, I just published version 2.2.0 which is available through maven. Please if you can, give it a try - you would not need to manually install it, but modify the version value in your pom.xml file.
Unfortunately, I’m not able to run due to the import errors.
I just tried your new version 2.2.0 from Maven which resolves the import error for me.
But for 2.2.0 I run into the following:
(..)
[main]
INFO com.vaadin.flow.server.startup.DevModeInitializer - Starting dev-mode updaters in /Users/thomas/git/abc-j folder.
[main]
INFO dev-updater - Scanning classes to find frontend configurations and dependencies...
[main]
INFO dev-updater - Visited 8842 classes. Took 5654 ms.
[main]
INFO dev-updater - Skipping `npm install`.
[main]
INFO dev-updater - Copying frontend resources from jar files ...
[main]
INFO dev-updater - Visited 10 resources. Took 93 ms.
[main]
WARN dev-updater - Use the './' prefix for files in JAR files: 'flow-component-renderer.js', please update your component.
[main]
INFO dev-updater -
Failed to find the following imports in the `node_modules` tree:
- @vaadin/vaadin-grid/src/vaadin-grid-column.js
- @vaadin/vaadin-grid/src/vaadin-grid.js
- @vaadin/vaadin-grid/src/vaadin-grid-column-group.js
- @vaadin/vaadin-grid/src/vaadin-grid-sorter.js
- multiselect-combo-box/src/multiselect-combo-box.js
If the build fails, check that npm packages are installed.
To fix the build remove `node_modules` directory to reset modules.
In addition you may run `npm install` to fix `node_modules` tree structure.
[main]
INFO dev-updater - Updated /Users/thomas/git/abc-j/target/frontend/generated-flow-imports.js
[main]
ERROR com.vaadin.flow.server.frontend.FrontendToolsLocator - Command '[which, node]
' failed with exit code '1'
[main]
ERROR com.vaadin.flow.server.frontend.FrontendToolsLocator - Command '[which, npm]
' failed with exit code '1'
[main]
ERROR com.vaadin.flow.server.frontend.FrontendToolsLocator - Command '[which, node]
' failed with exit code '1'
(..)
It would appear that the front-end compilation is failing. You can try to fix it as it is suggested in the message:
To fix the build remove `node_modules` directory to reset modules.
In addition you may run `npm install` to fix `node_modules` tree structure.
In addition to removing node_modules, I would also remove package-lock.json and webpack.generated.js, and rebuild the project again (i.e. by running mvn clean install).
I had tried removing the node_modules by doing a mvn clean as this removes the entire target folder where node_modules is located.
Your suggestions of deleting package-lock.json and webpack.generated.js made a difference - everything is fine now and I’m no longer dependent on the existence of the ‘/Users/gatanaso…’ directory.