lightbend / reactive-app-maven-plugin

https://developer.lightbend.com/docs/lightbend-orchestration/current/
2 stars 3 forks source link

Got Error following the instruction #39

Open lwu08 opened 5 years ago

lwu08 commented 5 years ago
  1. Download official hello java maven code
  2. Modify POM by adding
com.lightbend.rp reactive-app-maven-plugin 0.3.0 com.lightbend.rp.test.akkacluster.SimpleClusterApp build-docker build com.lightbend.rp reactive-lib-service-discovery-lagom14-java_2.12 0.8.1 com.lightbend.rp reactive-lib-akka-cluster-bootstrap_2.12 0.8.1
  1. Run mvn install got following error:

    [INFO] DOCKER> Pulling from fabric8/java-alpine-openjdk8-jre ff3a5c916c92: Pull complete 83b261a0fc6a: Pull complete e4485b9ece8d: Pull complete 935d0c3a813c: Pull complete e834103b424b: Pull complete 6951bfa8c854: Pull complete c951faf284e0: Pull complete c1074e6da5bd: Pull complete

[INFO] DOCKER> Digest: sha256:064350cf0426b7e74e94cfdb1068f8e4fa2b1b8e88dc154588d7fefe22ffd1a1 [INFO] DOCKER> Status: Downloaded newer image for fabric8/java-alpine-openjdk8-jre:latest [INFO] DOCKER> Pulled fabric8/java-alpine-openjdk8-jre:latest in 7 seconds [WARNING] Cannot include project artifact: test.docker:hello:pom:1.0-SNAPSHOT; it doesn't have an associated file or directory. [WARNING] The following patterns were never triggered in this artifact inclusion filter: o 'test.docker:hello'

[ERROR] DOCKER> Failed to create assembly for docker image (with mode 'dir'): Error creating assembly archive docker: You must set at least one file.. If you include the build artifact please ensure that you have built the artifact before with 'mvn package' (should be available in the target/ dir). Please see the documentation (section "Assembly") for more information. [Error creating assembly archive docker: You must set at least one file.] [INFO] ------------------------------------------------------------------------ [INFO] Reactor Summary: [INFO] [INFO] hello 1.0-SNAPSHOT ................................. FAILURE [ 16.269 s] [INFO] hello-api .......................................... SKIPPED [INFO] hello-impl ......................................... SKIPPED [INFO] stream-api ......................................... SKIPPED [INFO] stream-impl 1.0-SNAPSHOT ........................... SKIPPED [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 16.582 s [INFO] Finished at: 2018-07-25T17:53:21-04:00 [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal com.lightbend.rp:reactive-app-maven-plugin:0.3.0:build (build-docker) on project hello: Unable to execute mojo: Failed to create assembly for docker image (with mode 'dir'): Error creating assembly archive docker: You must set at least one file.. If you include the build artifact please ensure that you have built the artifact before with 'mvn package' (should be available in the target/ dir). Please see the documentation (section "Assembly") for more information. -> [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

TimMoore commented 5 years ago

I think the problem is that this configuration needs to be added to the hello-impl and stream-impl sub-modules, rather than to the top-level pom.xml.

In addition, the mainClass configuration in the README doesn't apply to Lagom (or Play) applications.

We should update the README (or the documentation at https://developer.lightbend.com/docs/lightbend-orchestration/current/) to have more specific details about how to apply this to Lagom, Play, and Akka applications.