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

Build faillure #11

Open
legolass73 opened this issue Jun 4, 2020 · 10 comments · Fixed by #19
Open

Build faillure #11

legolass73 opened this issue Jun 4, 2020 · 10 comments · Fixed by #19

Comments

@legolass73
Copy link

legolass73 commented Jun 4, 2020

[INFO] -----------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 14.364 s
[INFO] Finished at: 2020-06-04T18:19:04Z
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.eclipse.jetty:jetty-maven-plugin:9.3.0.v20150612:run (default-cli) on project pyx: Execution default-cli of goal org.eclipse.jetty:jetty-maven-plugin:9.3.0.v20150612:run failed: Plugin org.eclipse.jetty:jetty-maven-plugin:9.3.0.v20150612 or one of its dependencies could not be resolved: Failed to collect dependencies at org.eclipse.jetty:jetty-maven-plugin:jar:9.3.0.v20150612 -> org.apache.maven:maven-plugin-api:jar:3.0.3: Failed to read artifact descriptor for org.apache.maven:maven-plugin-api:jar:3.0.3: Could not transfer artifact org.apache.maven:maven-plugin-api:pom:3.0.3 from/to central (https://repo.maven.apache.org/maven2): repo.maven.apache.org: unknown error: Unknown host repo.maven.apache.org: unknown error -> [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/PluginResolutionException

@emcniece
Copy link
Owner

emcniece commented Jun 4, 2020

Hey, thanks for the report. What command did you run to build this, and what OS are you on?

Kind of looks like some repo URLs might need to be updated.

@legolass73
Copy link
Author

Hello, i use « docker-compose up de —build » and also « docker build » for build but if I use « make image » and « make run », the container run correctly but view on error which, unfortunately, I have not recovered.

I run on Debian 10

@VictorElHajj
Copy link

VictorElHajj commented Feb 23, 2021

Having the same issue, no previous Maven experience, using the provided docker compose (with minor changes to use another reverse proxy)

EDIT: Slightly different error actually

pyx_1  | [INFO] Scanning for projects...
pyx_1  | [INFO]
pyx_1  | [INFO] ------------------------< net.socialgamer:pyx >-------------------------
pyx_1  | [INFO] Building pyx 0.7.0-SNAPSHOT
pyx_1  | [INFO] --------------------------------[ jar ]---------------------------------
pyx_1  | [INFO]
pyx_1  | [INFO] >>> jetty-maven-plugin:9.3.0.v20150612:run (default-cli) > test-compile @ pyx >>>
pyx_1  | [INFO]
pyx_1  | [INFO] --- maven-enforcer-plugin:1.3.1:enforce (enforce-files-exist) @ pyx ---
pyx_1  | [WARNING] Rule 0: org.apache.maven.plugins.enforcer.RequireFilesExist failed with message:
pyx_1  | Some required files are missing:
pyx_1  | /project/build.properties
pyx_1  |
pyx_1  | [INFO] ------------------------------------------------------------------------
pyx_1  | [INFO] BUILD FAILURE
pyx_1  | [INFO] ------------------------------------------------------------------------
pyx_1  | [INFO] Total time: 1.104 s
pyx_1  | [INFO] Finished at: 2021-02-23T19:19:03Z
pyx_1  | [INFO] ------------------------------------------------------------------------
pyx_1  | [ERROR] Failed to execute goal org.apache.maven.plugins:maven-enforcer-plugin:1.3.1:enforce (enforce-files-exist) on project pyx: Some Enforcer rules have failed. Look above for specific messages explaining why the rule failed. -> [Help 1]
pyx_1  | [ERROR]
pyx_1  | [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
pyx_1  | [ERROR] Re-run Maven using the -X switch to enable full debug logging.
pyx_1  | [ERROR]
pyx_1  | [ERROR] For more information about the errors and possible solutions, please read the following articles:
pyx_1  | [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

@emcniece
Copy link
Owner

emcniece commented Feb 24, 2021

@VictorElHajj your logs seem to indicate that there's a problem with /project/build.properties being missing, which I think might be due to #17. It's confusing that this is labelled as a warning and not an error, but maybe that's just how Gradle rolls 🤷

@Cyb3r-Jak3 I think we have a regression. Maybe we can restore this file or adjust the build process to not fail because of it.

@Cyb3r-Jak3
Copy link
Contributor

Hi @VictorElHajj
It looks like the overrides file is not being copied correctly. I believe I know where the issue lies. In your directory where the docker-compose.yml is could you make another folder called overrides and copy this file to it. You can run curl https://raw.githubusercontent.com/emcniece/DockerYourXyzzy/master/overrides/build.properties -o build.properties in the override folder.

@emcniece if the above resolves the issue then I believe the best fix is going to be adding a check for the build.properties file.

@VictorElHajj
Copy link

The overrides folder is there and the file exists but not sure why it doesnt copy over. I tried changing the CMD in the dockerfile from default.sh to overrides.sh and it did run then, but when visiting the site I only get "Bad Gateway", with nothing being logged in the container apart from completing the build.

@Cyb3r-Jak3
Copy link
Contributor

Can you post your full docker-compose.yml so I can see if I can recreate.

@VictorElHajj
Copy link

Here it is, apologies for not sending it right away:

version: "3.7"

services:
  pyx:
    image: emcniece/dockeryourxyzzy:latest
    build: ./
    volumes:
      - ./overrides:/overrides
      - ./overrides/build.properties:/project/build.properties
    ports:
      - "8083:8080"
    networks:
      - pyx-net
      - traefik-net
    environment:
      - TOMCAT_USER=tomcat_user
      - TOMCAT_PASSWORD=tomcat_password
      - DB_NAME=pyx
      - DB_USER=pyx
      - DB_PASSWORD=CorrectHorseBatteryStaple
    labels:
      - 'traefik.enable=true'
      - 'traefik.http.routers.pyx.rule=Host(`pyx.mywebstie.com`)'
      - 'traefik.http.routers.pyx.entrypoints=websecure'
      - 'traefik.http.routers.pyx.tls=true'
      - 'traefik.http.routers.pyx.tls.certresolver=le'
      - 'traefik.http.services.pyx.loadbalancer.server.port=8083'
  postgres:
    image: "postgres:alpine"
    volumes:
      - .pgdata:/var/lib/postgresql/data
      - ./init-db.d:/docker-entrypoint-initdb.d
    networks:
      - pyx-net
    environment:
      - POSTGRES_DB=pyx
      - POSTGRES_USER=pyx
      - POSTGRES_PASSWORD=CorrectHorseBatteryStaple
    labels:
      - 'traefik.enable=false'
networks:
  pyx-net:
  traefik-net:
    external: true

Looking into the logs it seems like the Bad Gateway is only while its building, I now get

pyx_1       | [INFO] Logging initialized @232718ms
pyx_1       | [INFO] ------------------------------------------------------------------------
pyx_1       | [INFO] BUILD FAILURE
pyx_1       | [INFO] ------------------------------------------------------------------------
pyx_1       | [INFO] Total time: 03:51 min
pyx_1       | [INFO] Finished at: 2021-02-24T18:52:40Z
pyx_1       | [INFO] ------------------------------------------------------------------------
pyx_1       | [ERROR] Failed to execute goal org.eclipse.jetty:jetty-maven-plugin:9.3.0.v20150612:run (default-cli) on project pyx: Unable to parse configuration of mojo org.eclipse.jetty:jetty-maven-plugin:9.3.0.v20150612:run for parameter resourceBases: Cannot set 'resourceBases' in class org.eclipse.jetty.maven.plugin.JettyWebAppContext: InvocationTargetException: file:///project/target/ZY is not an existing directory. -> [Help 1]
pyx_1       | [ERROR]
pyx_1       | [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
pyx_1       | [ERROR] Re-run Maven using the -X switch to enable full debug logging.
pyx_1       | [ERROR]
pyx_1       | [ERROR] For more information about the errors and possible solutions, please read the following articles:
pyx_1       | [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginConfigurationException
dockeryourxyzzy_pyx_1 exited with code 1

@Cyb3r-Jak3
Copy link
Contributor

Was able to recreate and I believe to have fixed the issue. Opened #19 to merge.

@emcniece
Copy link
Owner

emcniece commented Feb 25, 2021

Reopening this issue until the original report can be confirmed as resolved.

#19 courtesy of @Cyb3r-Jak3 should solve #11 (comment) but this appears to be a separate issue than the original.

@emcniece emcniece reopened this Feb 25, 2021
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

Successfully merging a pull request may close this issue.

4 participants