Andrea Crawford
Andrea Crawford

Reputation: 11

bx dev build --debug successfully completes, but can't run bx dev run

I can successfully run bx dev build and successfully run my container locally with bx dev run.

When I execute bx dev build --debug --trace, I get successful completion, and my unit test passed. However, immediately after when I execute bx dev run I get:

FAILED A successful build of the project is required before running bx dev run. Verify that bx dev build completes successfully before attempting bx dev run

There seems to be something in the debug build that is holding me up, but it finishes successful. Any thoughts? The tail end of my debug trace below (full trace blows the char limit):

Results :


Tests run: 1, Failures: 0, Errors: 0, Skipped: 0

[INFO] 

[INFO] --- maven-jar-plugin:2.6:jar (default-jar) @ gapstrainingbff ---
[INFO] Building jar: /project/target/gapstrainingbff-1.0-SNAPSHOT.jar
[INFO] 

[INFO] --- spring-boot-maven-plugin:1.5.4.RELEASE:repackage (default) @ gapstrainingbff ---

[INFO] 

[INFO] --- maven-install-plugin:2.5.2:install (default-install) @ gapstrainingbff ---

[INFO] Installing /project/target/gapstrainingbff-1.0-SNAPSHOT.jar to /project/.m2/repository/projects/gapstrainingbff/1.0-SNAPSHOT/gapstrainingbff-1.0-SNAPSHOT.jar
[INFO] Installing /project/pom.xml to /project/.m2/repository/projects/gapstrainingbff/1.0-SNAPSHOT/gapstrainingbff-1.0-SNAPSHOT.pom

[INFO] ------------------------------------------------------------------------

[INFO] BUILD SUCCESS

[INFO] ------------------------------------------------------------------------

[INFO] Total time: 54.659 s

[INFO] Finished at: 2018-02-22T21:39:29+00:00

[INFO] Final Memory: 19M/31M
[INFO] ------------------------------------------------------------------------

OK
Process time: 57.911463s
Stopping the 'bx-dev-gapstrainingbff-tools' container...
OK
acmartinez@Andreas-MacBook-Air gaps-training-bff $ idt run
FAILED
A successful build of the project is required before running bx dev run. Verify that bx dev build completes successfully before attempting bx dev run

acmartinez@Andreas-MacBook-Air gaps-training-bff $ 

Upvotes: 1

Views: 281

Answers (1)

Brian Clarke
Brian Clarke

Reputation: 31

When you run bx dev build --debug, the IDT CLI builds the application for debugging so that you can execute bx dev debug. In order to build your application for release and execute bx dev run, you must first execute bx dev build without the --debug flag. The order of commands matters in this case. See https://console.bluemix.net/docs/cloudnative/idt/commands.html#run

Upvotes: 3

Related Questions