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

Ch04 Image-of-the-Day build #8

Open
sqlgeekster opened this issue Feb 9, 2020 · 7 comments
Open

Ch04 Image-of-the-Day build #8

sqlgeekster opened this issue Feb 9, 2020 · 7 comments

Comments

@sqlgeekster
Copy link

I got the following errors when I was building the Image-of-the-Day image. Running on Windows. Any ideas?

Thanks,
Jeff Jones

d:\GITRepo\diamol\ch04\exercises\image-of-the-day>docker image build -t image-of-the-day .
Sending build context to Docker daemon 23.04kB
Step 1/11 : FROM diamol/maven AS builder
---> 82e47db98ff5
Step 2/11 : WORKDIR /usr/src/iotd
---> Using cache
---> f495b0443b3c
Step 3/11 : COPY pom.xml .
---> Using cache
---> 8ae3e1a87c47
Step 4/11 : RUN mvn -B dependency:go-offline
---> Running in 416f5bffb0a7
[INFO] Scanning for projects...
[INFO] Downloading from central: https://repo.maven.apache.org/maven2/org/springframework/boot/spring-boot-starter-parent/2.1.3.RELEASE/spring-boot-starter-parent-2.1.3.RELEASE.pom
[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[FATAL] Non-resolvable parent POM for com.sixeyed.diamol:iotd-service:0.1.0: Could not transfer artifact org.springframework.boot:spring-boot-starter-parent:pom:2.1.3.RELEASE from/to central (https://repo.maven.apache.org/maven2): Transfer failed for https://repo.maven.apache.org/maven2/org/springframework/boot/spring-boot-starter-parent/2.1.3.RELEASE/spring-boot-starter-parent-2.1.3.RELEASE.pom and 'parent.relativePath' points
at wrong local POM @ line 10, column 13
@
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]
[ERROR] The project com.sixeyed.diamol:iotd-service:0.1.0 (C:\usr\src\iotd\pom.xml) has 1 error
[ERROR] Non-resolvable parent POM for com.sixeyed.diamol:iotd-service:0.1.0: Could not transfer artifact org.springframework.boot:spring-boot-starter-parent:pom:2.1.3.RELEASE from/to central (https://repo.maven.apache.org/maven2): Transfer failed for https://repo.maven.apache.org/maven2/org/springframework/boot/spring-boot-starter-parent/2.1.3.RELEASE/spring-boot-starter-parent-2.1.3.RELEASE.pom and 'parent.relativePath' points at wrong local POM @ line 10, column 13: Unknown host This is usually a temporary error during hostname
resolution and means that the local server did not receive a response from an authoritative server (repo.maven.apache.org) -> [Help 2]
[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/ProjectBuildingException
[ERROR] [Help 2] http://cwiki.apache.org/confluence/display/MAVEN/UnresolvableModelException
The command 'powershell -Command $ErrorActionPreference = 'Stop'; mvn -B dependency:go-offline' returned a
non-zero code: 1

@gnarlygeek
Copy link

sqlgeekster, I have the same issue. Did you get any response from Elton or others on how to modify the xml file to the correct version(s)? I'm assuming the explicit version reference in the xml is the cause. Obviously, "spring" has moved on? :)

@sqlgeekster
Copy link
Author

@gnarlygeek Never got a response.

@gnarlygeek
Copy link

Ok, just on a lark, I switched to my Windows PC with Ubuntu running under WSL2, and there are no issues. My Linux box is running CentOS 8. I've tried disabling the firewall process but that had no impact. It appears there is something in my CentOS 8 configuration that's preventing Maven from resolving the dependencies. If i figure it out, I'll post it here. Are you also trying to run this on a Linux system, and if so, what distribution and version?

@zhoukaidev
Copy link

Encounter the same issue on Linux.
Have you figured it out?
Thanks 😄

My Linux version is:

Linux 5.4.0-53-generic
#59~18.04.1-Ubuntu

@gnarlygeek
Copy link

gnarlygeek commented Dec 2, 2020 via email

@JustJordanT
Copy link

JustJordanT commented Dec 2, 2020

Having the same issue on CentOS 4.18.0-193.28.1.el8_2.x86_64.

[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[FATAL] Non-resolvable parent POM for com.sixeyed.diamol:iotd-service:0.1.0: Could not transfer artifact org.springframework.boot:spring-boot-starter-parent:pom:2.1.3.RELEASE from/to central (https://repo.maven.apache.org/maven2): Transfer failed for https://repo.maven.apache.org/maven2/org/springframework/boot/spring-boot-starter-parent/2.1.3.RELEASE/spring-boot-starter-parent-2.1.3.RELEASE.pom and 'parent.relativePath' points at wrong local POM @ line 10, column 13
 @
[ERROR] The build could not read 1 project -> [Help 1]
org.apache.maven.project.ProjectBuildingException: Some problems were encountered while processing the POMs:
[FATAL] Non-resolvable parent POM for com.sixeyed.diamol:iotd-service:0.1.0: Could not transfer artifact org.springframework.boot:spring-boot-starter-parent:pom:2.1.3.RELEASE from/to central (https://repo.maven.apache.org/maven2): Transfer failed for https://repo.maven.apache.org/maven2/org/springframework/boot/spring-boot-starter-parent/2.1.3.RELEASE/spring-boot-starter-parent-2.1.3.RELEASE.pom and 'parent.relativePath' points at wrong local POM @ line 10, column 13

    at org.apache.maven.project.DefaultProjectBuilder.build (DefaultProjectBuilder.java:397)
    at org.apache.maven.graph.DefaultGraphBuilder.collectProjects (DefaultGraphBuilder.java:414)
    at org.apache.maven.graph.DefaultGraphBuilder.getProjectsForMavenReactor (DefaultGraphBuilder.java:405)
    at org.apache.maven.graph.DefaultGraphBuilder.build (DefaultGraphBuilder.java:82)
    at org.apache.maven.DefaultMaven.buildGraph (DefaultMaven.java:507)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:219)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:957)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:289)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:193)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
    at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    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)

Thanks,

@jjlind000
Copy link

Hi guys
This can happen perhaps for a number of reasons but one of those reasons is being on a VPN. If you are on one, disconnect and try again. It worked for me.

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

5 participants