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

Java component build execution requires pom.xml #3943

Closed
prietyc123 opened this issue Sep 12, 2020 · 3 comments · Fixed by #3946
Closed

Java component build execution requires pom.xml #3943

prietyc123 opened this issue Sep 12, 2020 · 3 comments · Fixed by #3946
Assignees
Labels
kind/bug Categorizes issue or PR as related to a bug. priority/Critical We need to stop doing everything and fix this ASAP. It is making the project unusable.

Comments

@prietyc123
Copy link
Contributor

/kind bug

What versions of software are you using?

Operating System:
All supported

Output of odo version:
master

How did you run odo exactly?

$ odo project create wfrvjjcolc
 ✓  Project 'wfrvjjcolc' is ready for use
 ✓  New project created and now using project: wfrvjjcolc

$ odo create java-springboot --project wfrvjjcolc mkkivo
Validation
 ✓  Checking devfile existence [124215ns]
 ✓  Checking devfile compatibility [196698ns]
 ✓  Creating a devfile component from registry: DefaultDevfileRegistry [215428ns]
 ✓  Validating devfile component [301186ns]

Please use `odo push` command to create the component with source deployed

$ odo push --namespace wfrvjjcolc

Validation
 ✓  Validating the devfile [114069ns]

Creating Kubernetes resources for component mkkivo
 ✓  Waiting for component to start [1m]

Applying URL changes
 ✓  URL 8080-tcp: http://8080-tcp-mkkivo-wfrvjjcolc.apps.priti03.devcluster.openshift.com/ created

Syncing to component mkkivo
 ✓  Checking files for pushing [8ms]
 ✓  Syncing files to the component [3s]

Executing devfile commands for component mkkivo
 ✗  Executing build command "mvn clean -Dmaven.repo.local=/home/user/.m2/repository package -Dmaven.test.skip=true" [4s]
 ✗  Failed to start component with name mkkivo. Error: Failed to create the component: command execution failed: unable to execute the run command: unable to exec command [/bin/sh -c mvn clean -Dmaven.repo.local=/home/user/.m2/repository package -Dmaven.test.skip=true]: 
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  0.106 s
[INFO] Finished at: 2020-09-12T09:52:22Z
[INFO] ------------------------------------------------------------------------
[ERROR] The goal you specified requires a project to execute but there is no POM in this directory (/projects). Please verify you invoked Maven from the correct directory. -> [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/MissingProjectException
: error while streaming command: command terminated with exit code 1

devfile.yaml

schemaVersion: 2.0.0
metadata:
  name: java-springboot
  version: 1.1.0
starterProjects:
  - name: springbootproject
    git:
      remotes:
        origin: "https://github.com/odo-devfiles/springboot-ex.git"
components:
  - name: tools
    container:
      image: quay.io/eclipse/che-java11-maven:nightly
      memoryLimit: 768Mi
      mountSources: true
      endpoints:
      - name: '8080-tcp'
        targetPort: 8080
      volumeMounts:
        - name: m2
          path: /home/user/.m2
  - name: m2
    volume:
      size: 3Gi
commands:
  - id: build
    exec:
      component: tools
      commandLine: "mvn clean -Dmaven.repo.local=/home/user/.m2/repository package -Dmaven.test.skip=true"
      group:
        kind: build
        isDefault: true
  - id: run
    exec:
      component: tools
      commandLine: "mvn -Dmaven.repo.local=/home/user/.m2/repository spring-boot:run"
      group:
        kind: run
        isDefault: true
  - id: debug
    exec:
      component: tools
      commandLine: "java -Xdebug -Xrunjdwp:server=y,transport=dt_socket,address=${DEBUG_PORT},suspend=n -jar target/*.jar"
      group:
        kind: debug
        isDefault: true

Actual behavior

Expected behavior

Component should get created but here it seems pom.xml file does not exists in the current path.

Any logs, error output, etc?

Manually executed on odo version

$ odo version
odo v2.0.0 (3fcd3670e)

Server: https://api.priti03.devcluster.openshift.com:6443
Kubernetes: v1.14.6+d7721aa

Even CI jobs are also failing on master https://prow.ci.openshift.org/view/gs/origin-ci-test/pr-logs/pull/openshift_odo/3939/pull-ci-openshift-odo-master-v4.5-integration-e2e/1304656967607783424#1:build-log.txt%3A2653

@openshift-ci-robot openshift-ci-robot added the kind/bug Categorizes issue or PR as related to a bug. label Sep 12, 2020
@prietyc123 prietyc123 added the priority/Critical We need to stop doing everything and fix this ASAP. It is making the project unusable. label Sep 12, 2020
@amitkrout
Copy link
Contributor

ping @girishramnani @kadel

@amitkrout
Copy link
Contributor

Failing on both PR and Periodic job

@kadel
Copy link
Member

kadel commented Sep 14, 2020

Do we know why is this failing?
I'm not able to reproduce it :-/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug. priority/Critical We need to stop doing everything and fix this ASAP. It is making the project unusable.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants