SoftInstigate / maven-aws-docker

A docker image for Maven with AWS and ECS CLI tools
Apache License 2.0
5 stars 6 forks source link

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

Open romanr opened 4 years ago

romanr commented 4 years ago

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 commented 4 years ago

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 commented 4 years ago

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 commented 4 years ago

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 commented 1 year ago

I am also facing the same issue

tonitingaurav commented 1 year ago

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

image: softinstigate/maven-aws

stages:

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

mkjsix commented 1 year ago

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.