Error on running PingPong Example

when i try to run PingPong Example, im getting following error:

Unknown lifecycle phase ".mainClass=examples.pingpong.reactive.PingPongReactiveMain". You must specify a valid lifecycle phase or a goal in the format : or :[:]:. Available lifecycle phases are: validate, initialize, generate-sources, process-sources, generate-resources, process-resources, compile, process-classes, generate-test-sources, process-test-sources,
generate-test-resources, process-test-resources, test-compile, process-test-classes, test, prepare-package, package, pre-integration-test, integration-test, post-integration-test, verify, install, deploy, pre-clean, clean, post-clean, pre-site, site, post-site, site-deploy. -> [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/LifecyclePhaseNotFoundException
1 Like

Hi @lubnav, could you share the command you ran? I just tried following the instructions in the repository and it seems to work for me.

mvn compile
daml start --sandbox-port 7600 # in a separate terminal
mvn exec:java -Dexec.mainClass=examples.pingpong.reactive.PingPongReactiveMain -Dexec.args="localhost 7600"

same commands i tried. getting same error

1 Like

I can reproduce your error if I add an incorrect space before .mainClass so -Dexec .mainClass=…. Try quoting it, it might be your shell splitting it up:

mvn exec:java '-Dexec.mainClass=examples.pingpong.reactive.PingPongReactiveMain' '-Dexec.args="localhost 7600"'
2 Likes

It worked. Thanks

1 Like