openshift-roadshow / nationalparks

Backend component to display nationalparks
Apache License 2.0
44 stars 885 forks source link

Trouble building with OpenShift #36

Open tl87 opened 2 years ago

tl87 commented 2 years ago

Hello.

I am having trouble with building from the git repo and I get the errors:

[ERROR]     'dependencies.dependency.version' for org.springframework.cloud:spring-cloud-context:jar is missing. @ line 69, column 21
[ERROR] 
[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/ProjectBuildingException
[ERROR] [Help 2] http://cwiki.apache.org/confluence/display/MAVEN/ModelParseException
error: build error: error building at STEP "RUN /usr/local/s2i/assemble": error while running runtime: exit status 1

It seems like the build fails becuase of the step with RUN /usr/local/s2i/assemble failing.

Any thoughts on how to fix this?

jimbarlow commented 2 years ago

I'm running into the very same problem. Looks like a missing dependency

at java.lang.reflect.Method.invoke (Method.java:566)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)

[ERROR] 'dependencies.dependency.version' for org.springframework.cloud:spring-cloud-context:jar is missing. @ line 69, column 21 [ERROR] [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/ProjectBuildingException [ERROR] [Help 2] http://cwiki.apache.org/confluence/display/MAVEN/ModelParseException error: build error: error building at STEP "RUN /usr/local/s2i/assemble": error while running runtime: exit status 1

jimbarlow commented 2 years ago

This is now fixed for me with Alex Groom's pull request #37

tl87 commented 2 years ago

Works for me now. Thank you :)

chungngh commented 1 year ago

hi all,

the build failed with the following log: " Cloning "https://github.com/openshift-roadshow/nationalparks.git" ... Commit: 9e47b633d11abcef9b9e61140f347a670cde806a (Restore single stage Dockerfile for Pipelines and add new for multi stage) Author: Natale Vinto nvinto@redhat.com Date: Mon Jun 27 15:57:16 2022 +0200 time="2023-04-13T02:34:10Z" level=info msg="Not using native diff for overlay, this may cause degraded performance for building images: kernel has CONFIG_OVERLAY_FS_REDIRECT_DIR enabled" I0413 02:34:10.392440 1 defaults.go:102] Defaulting to storage driver "overlay" with options [mountopt=metacopy=on]. Caching blobs under "/var/cache/blobs". Pulling image registry.access.redhat.com/ubi8/openjdk-11:latest ... Trying to pull registry.access.redhat.com/ubi8/openjdk-11:latest... Getting image source signatures Copying blob sha256:430056962e3b4c3940e68f92a21ac6e55bdb10f92f613abef0bd9d8c3ebaa463 Copying blob sha256:06f86e50a0b74ff9eb161a7d781228877c90e8ff57e9689e8cb8b0f092a2a9f9 Copying config sha256:27dd5e678c5017a0baed0b2efbbca1c2a517e9a250c31a0bf4873bfd959fee87 Writing manifest to image destination Storing signatures Adding transient rw bind mount for /run/secrets/rhsm STEP 1/5: FROM registry.access.redhat.com/ubi8/openjdk-11:latest STEP 2/5: COPY target/nationalparks.jar /opt error: build error: error building at STEP "COPY target/nationalparks.jar /opt": checking on sources under "/tmp/build/inputs": copier: stat: "/target/nationalparks.jar": no such file or directory " any advice will be much appreciated !! Thanks in advance

stuckthread commented 1 year ago

I get exactly the same error as @chungngh .

STEP 1/5: FROM registry.access.redhat.com/ubi8/openjdk-11:latest STEP 2/5: COPY target/nationalparks.jar /opt error: build error: error building at STEP "COPY target/nationalparks.jar /opt": checking on sources under "/tmp/build/inputs": copier: stat: "/target/nationalparks.jar": no such file or directory