Hi!
Thank you for this interesting project.
I'm considering building an application with React4J, but at first I tried to run at least one example to see whether it works fine with my environment.
Environment:
Mint Linux 18.3
Relevant code or config:
What happened:
Problem description:
Reproduction repository:
I tried to follow instructions and run examples from here.
I'm interested in Maven, Gradle or Bazel.
Until the last one is ready, I try with the Maven example.
It compiles fine, but when I try to run the application, something is wrong.
(I have no issues with running GWT stuff from different sources).
What you did:
I take Dagger Maven example.
When I compile with mvn clean compile
, it is fine.
When I try to run: mvn gwt:devmode
I get BUILD FAILURE
unfortunately.
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building react4j-todomvc 1.0.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] >>> gwt-maven-plugin:1.0-rc-9:devmode (default-cli) > process-classes @ react4j-todomvc >>>
[INFO]
[INFO] --- gwt-maven-plugin:1.0-rc-9:enforce-encoding (default-enforce-encoding) @ react4j-todomvc ---
[INFO]
[INFO] --- gwt-maven-plugin:1.0-rc-9:add-super-sources (default-add-super-sources) @ react4j-todomvc ---
[INFO]
[INFO] --- gwt-maven-plugin:1.0-rc-9:add-test-super-sources (default-add-test-super-sources) @ react4j-todomvc ---
[INFO]
[INFO] --- gwt-maven-plugin:1.0-rc-9:generate-module (default-generate-module) @ react4j-todomvc ---
[INFO]
[INFO] --- maven-resources-plugin:3.1.0:resources (default-resources) @ react4j-todomvc ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 7 resources
[INFO] skip non existing resourceDirectory /home/msx/workspace/java/gwt/react4j-todomvc/src/main/super
[INFO]
[INFO] --- maven-compiler-plugin:3.5.1:compile (default-compile) @ react4j-todomvc ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] <<< gwt-maven-plugin:1.0-rc-9:devmode (default-cli) < process-classes @ react4j-todomvc <<<
[INFO]
[INFO] --- gwt-maven-plugin:1.0-rc-9:devmode (default-cli) @ react4j-todomvc ---
[WARNING] Error: Could not find or load main class com.google.gwt.dev.DevMode
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.906 s
[INFO] Finished at: 2019-10-27T17:51:08+01:00
[INFO] Final Memory: 15M/392M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal net.ltgt.gwt.maven:gwt-maven-plugin:1.0-rc-9:devmode (default-cli) on project react4j-todomvc: GWT exited with status 1 -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
Then I see that recent commits are Bazel related. So I tried with bazel. I switched to the related branch. Again no steps in documentation. So I tried to guess.
When I compile, it's fine.
I do: bazel build //:react4j_todomvc_dev
and the result is OK
.
Further I do bazel run //:react4j_todomvc_dev
(is this the right command?). I get an error as following:
ERROR: Cannot run target //:react4j_todomvc_dev: Not executable
INFO: Elapsed time: 0.162s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (0 packages loaded)
FAILED: Build did NOT complete successfully (0 packages loaded)
Maybe I do something wrong? There are no steps what to do in README, so I tried to run it as usual.
Would you please clarify?
Did I test my environment?
Yes!
For instance, I take vue-gwt-demo .
I do mvn clean compile
and I get [INFO] BUILD SUCCESS
.
Further I do mvn gwt:devmode
and I get
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Vue GWT demo project 1.0-beta-9
[INFO] ------------------------------------------------------------------------
...
[INFO] Super Dev Mode starting up
...
[INFO] Loading Java files in com.axellience.vuegwtdemo.VueGwtDemo.
[INFO] Module setup completed in 5499 ms
[INFO]
[INFO] The code server is ready at http://127.0.1.1:9876/
I see this GWT Developement Mode window and further I go to http://127.0.1.1:8888/VueGwtDemo/
and I see the example application.
All is fine.
Suggested solution:
I tried to bump gwt-maven-plugin
to the latest final and stable 1.0.0 version, but it didn't help.
Would you please suggest me where to find any simple working example for react4j?