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

Tutorial needs instructions for launching from command line #18

Closed
JetForMe opened this issue Oct 25, 2016 · 6 comments
Closed

Tutorial needs instructions for launching from command line #18

JetForMe opened this issue Oct 25, 2016 · 6 comments

Comments

@JetForMe
Copy link

JetForMe commented Oct 25, 2016

I don't actually know how to build or execute this application (using maven from the command line). In my derived example I'm using gradle bootRun, but the mvn spring-boot:run fails:

$ mvn spring-boot:run
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO] 
[INFO] bookmarks
[INFO] model
[INFO] rest
[INFO] security
[INFO] hateoas
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building bookmarks 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] >>> spring-boot-maven-plugin:1.3.5.RELEASE:run (default-cli) > test-compile @ bookmarks >>>
[INFO] 
[INFO] <<< spring-boot-maven-plugin:1.3.5.RELEASE:run (default-cli) < test-compile @ bookmarks <<<
[INFO] 
[INFO] --- spring-boot-maven-plugin:1.3.5.RELEASE:run (default-cli) @ bookmarks ---
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO] 
[INFO] bookmarks .......................................... FAILURE [  0.732 s]
[INFO] model .............................................. SKIPPED
[INFO] rest ............................................... SKIPPED
[INFO] security ........................................... SKIPPED
[INFO] hateoas ............................................ SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.247 s
[INFO] Finished at: 2016-10-25T13:06:06-07:00
[INFO] Final Memory: 18M/309M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.springframework.boot:spring-boot-maven-plugin:1.3.5.RELEASE:run (default-cli) on project bookmarks: Unable to find a suitable main class, please add a 'mainClass' property -> [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
@khorlo
Copy link

khorlo commented Nov 4, 2016

I'm facing the same problem. Meanwhile I'm running the project through STS (Run As -> Spring Boot App).

While I can't figure out how to run it directly from the command line, I'm considering changing the project so that it generates a war file.

There must be an easy way run this sample project outside STS...

@gregturn
Copy link
Contributor

gregturn commented Nov 4, 2016

This tutorial actually has multiple stages, meaning there isn't just one thing to build and run. The tutorial could definitely use some love to clean it up and make these points much clearer (sorry!)

Also, it might have suffered Upgrade Dilemna. It was written against Spring Boot 1.2, and clearly some of the changes in the Spring Boot Maven Plugin have made it unrunnable. I'll try to find some time and clean it up.

@gregturn
Copy link
Contributor

gregturn commented Nov 4, 2016

Resolved via 115b6d3

@gregturn gregturn closed this as completed Nov 4, 2016
@khorlo
Copy link

khorlo commented Nov 4, 2016

Wow! Thanks a lot, Greg! I'll give it a go right now!

@gregturn
Copy link
Contributor

gregturn commented Nov 4, 2016

I'm still making more edits so you want to wait for the dust to settle.

@khorlo
Copy link

khorlo commented Nov 7, 2016

Tks for the heads up greg!

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

No branches or pull requests

3 participants