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

Dev mode cannot be started if there is a compilation error #627

Closed
gkwan-ibm opened this issue Sep 27, 2019 · 3 comments
Closed

Dev mode cannot be started if there is a compilation error #627

gkwan-ibm opened this issue Sep 27, 2019 · 3 comments

Comments

@gkwan-ibm
Copy link
Member

[ERROR] Failed to execute goal io.openliberty.tools:liberty-maven-plugin:3.0.2-SNAPSHOT:dev (default-cli) on project guide-microprofile-rest-client: Unable to execute mojo: Compilation failure
[ERROR] /Users/gkwan/tasks/CNAI/guides/testsite/guide-microprofile-rest-client/start/src/main/java/io/openliberty/guides/inventory/InventoryResource.java:[34,3] cannot find symbol
[ERROR]   symbol:   class InventoryManager
[ERROR]   location: class io.openliberty.guides.inventory.InventoryResource
[ERROR] -> [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
gilberts-mbp:start gkwan$ 

Use case:
As a developer, I was developing an application by dev mode. I coded incorrectly and knew there is a compilation error. Because of the end of the day, I stopped the dev mode. In next day, I tried to restart the dev mode but it could not. (See the above error.)

Expectation
The Liberty server and dev mode should be started, so that I can continue to develop my application. Otherwise, I have to resolve all errors first before restart dev mode.

@ericglau ericglau added devMode medium priority vNext Targeted for next release labels Sep 27, 2019
@ericglau
Copy link
Contributor

ericglau commented Oct 1, 2019

I tried changing the initial compile to use failOnError=false (see this branch https://github.com/ericglau/ci.maven/tree/627), but that turns the error into a warning and it's hard to notice during dev mode startup. That will also cause the remaining classes to not get compiled.

We may need to remove the initial compile and just let dev mode start up first, then allow dev mode to do the compile.

@ericglau
Copy link
Contributor

We should remove the initial compile and just let dev mode start up first, then allow dev mode to do the compile (either by calling Maven compile after dev mode starts up, or trigger a recompile in the watch loop and pass in all of the source and test files).

@kathrynkodama
Copy link
Contributor

Fixed with #696 and OpenLiberty/ci.common#111

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

No branches or pull requests

3 participants