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

Is this not compatible with automated CI builds due to ENTRYPOINT? #1

Open
romanr opened this issue May 1, 2020 · 6 comments
Open
Assignees

Comments

@romanr
Copy link

romanr commented May 1, 2020

Is this image only for local builds?

When running in Gitlab CI I get this error

[ERROR] The goal you specified requires a project to execute but there is no POM in this directory (/). Please verify you invoked Maven from the correct directory. -> [Help 1]

It can't find the project that was checked out.
Other images work fine.
I think because of ENTRYPOINT the directory is set to / somehow.

@mkjsix mkjsix self-assigned this May 2, 2020
@mkjsix
Copy link
Member

mkjsix commented May 2, 2020

Hi @romanr

The ENTRYPOINT of this image is just the mvn executable, it cannot be a path.

The error message is a maven's error: it just says mvn needs a pom.xml file to build something.

@romanr
Copy link
Author

romanr commented May 3, 2020

But that's exactly my point: when I run CI with official openjdk or maven docker images, it works fine and finds my pom.xml. This docker image can't find the file, meaning it's running in some other path.

@mkjsix
Copy link
Member

mkjsix commented May 4, 2020

This is weird, we are using this image to build several Java projects on Bitbucket without any issue since 3 years. It is just the plain maven:3.6-jdk-11 image plus a couple of installed packages, so I can't see anything which could alter the behavior like that. As you can see, the Dockerfile is very simple. You might want to try to use it to build you project locally, the README explain how. If it works, as it should, then the problem should be in the CI service configuration, I guess.

@tonitingaurav
Copy link

I am also facing the same issue

@tonitingaurav
Copy link

variables:
MAVEN_OPTS: -Dmaven.repo.local=.m2/repository
MAVEN_DEPLOY_OPTS: "-s settings.xml --batch-mode"

image: softinstigate/maven-aws

stages:

  • build
  • deploy
    cache:
    paths:
    • .m2/repository
    • target
      build:
      stage: build
      tags:
    • docker
      script:
    • echo "Maven compile started"
    • echo ls - l
    • ls -l

Even I have not called mvn command then also it is giving error message.

@mkjsix
Copy link
Member

mkjsix commented Mar 7, 2023

Sorry for not getting back to you sooner, but we are not using this repository anymore for internal reasons.

Originally this was the foundation for a docker image used for our CI/CD Bitbucket pipelines, but we have switched to pipes for these purposes.

I'm happy to merge PRs, in case.

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

3 participants