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

Maven app serve fails when executed with default project settings #46

Closed
cladera opened this issue Jun 14, 2022 · 1 comment · Fixed by #47
Closed

Maven app serve fails when executed with default project settings #46

cladera opened this issue Jun 14, 2022 · 1 comment · Fixed by #47

Comments

@cladera
Copy link
Contributor

cladera commented Jun 14, 2022

Reproduce steps

  1. Create a new workspace
  2. Enable @jnxplus/nx-boot-maven plugin
  3. Generate a new application
  4. Try to serve the application nx serve my-app

Result

❯ nx serve my-app

 >  NX   Running target serve for project my-app and 1 task(s) it depends on

 ——————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————

> nx run my-app:build  [local cache]

Executor ran for Build: {}

> nx run my-app:serve

Executor ran for serve: {}
run spring-boot:run
run spring-boot:run ./mvnw spring-boot:run -pl :my-app undefined
[INFO] Scanning for projects...
[INFO]
[INFO] --------------------< com.foo:my-app>--------------------
[INFO] Building my-app 0.0.1-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  0.374 s
[INFO] Finished at: 2022-06-14T18:29:14+02:00
[INFO] ------------------------------------------------------------------------
[ERROR] Unknown lifecycle phase "undefined". You must specify a valid lifecycle phase or a goal in the format <plugin-prefix>:<goal> or <plugin-group-id>:<plugin-artifact-id>[:<plugin-version>]:<goal>. 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

 ——————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————

 >  NX   Running target "my-app:serve" failed

   Failed tasks:

   - my-app:serve

   Hint: run the command with --verbose for more details.
cladera pushed a commit to cladera/jnxplus that referenced this issue Jun 14, 2022
Fix serve executor when serving applicatios that have no extra
`args` in its projects settings.

Fixes khalilou88#46
khalilou88 pushed a commit that referenced this issue Jun 14, 2022
Fix serve executor when serving applicatios that have no extra
`args` in its projects settings.

Fixes #46
@khalilou88 khalilou88 reopened this Jun 14, 2022
@khalilou88
Copy link
Owner

@cladera Thanks for finding this bug and the fix. I published the version 2.2.1 with your fix.

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

Successfully merging a pull request may close this issue.

2 participants