Hello all!
I'm trying to get a Java app deployed in an OpenShift container and I'm
experiencing a strange behaviour.
At build time (firs build), maven is creating a ? directory inside the
context from which it's called (so in my project's root folder) to
create the repository directory and download the build time
dependencies. I'd really want to know why it does that, and make it use
the .m2 location from the home folder. I have a feeling it has to do
with some sort of fishy user permission, but I'm not sure if it's
actually the case or where am I doing wrong.
That's the short description of the problem. My working system is like this:
- on a OpenShift/docker virtual machine running centos 7
- I've installed maven version 3.3.9 from
https://www.apache.org/dist/maven/maven-3/3.3.9/binaries/apache-maven-3.3.9-bin.tar.gz
- I've setup a $HOME directory which contains a .m2 directory that
contains my settings.xml to make maven use a local/cached repository
- this was done under root, but I've recursively changed ownership and
permission to the common user 1001 for what's related to maven
- my sources come on this system with a bit if an awkward set of
permissions so that the owner is user (1001), but the group is root
When I run maven with just the targets used for the project, it doesn't
read from the settings.xml, but instead tries to connect to the global
repository.
When running maven with the "-s $HOME/.m2/settings.xml" option, it does
take it into consideration and the build works fine, but it is
downloadying all the repository artifacts into ?/repository folder under
the local dir (app folder, the one which holds the pom.xml file).
Any idea what would be the reason for this behaviour?
Thank you in advance!