paketo buildpacks maven: download dependencies behind corporate proxy #318
Closed
NValanos
started this conversation in
Dependencies Team
Replies: 1 comment 3 replies
-
There shouldn't be any specific place you need to put this. When no bindings are set, the path that you set in Only things off the top of my head:
If the file exists, has the permissions for the user running Maven to read the file, and you give Maven the correct path to the file, I don't see any reason why Maven would be unable to read it and use the values there. |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi All,
I have a simple spring boot project which I try to build through gitlab, using .gitlab-ci.yml . I have the limitation that I need to run behind a docker container, so decided to use the
paketobuildpacks/builder-jammy-full
image and run the building process using the command:/cnb/lifecycle/creator
. The process runs smoothly (I have set the proxy in the .docker/config.json) and it downloads any required image, but when the paketobuildpacks/maven pack runs, after it successfully downloads maven from repo, when runningmvn --settings=settings.xml --batch-mode -Dmaven.test.skip=true --no-transfer-progress package
it is unable to download the spring boot parent image from the repository. The error is the following:
The reason is probably due to the fact that maven does not use the http_proxy. The possible solution would be to set the proxy inside the settings.xml file. But even though I set the location of the settings.xml file through the environmental variable
BP_MAVEN_SETTINGS_PATH=setting.xml
(It is the same path as the one set by default for the pom.xml. It is basically the root of the project.) I get an error:I have already checked and the settings.xml exists in the specified folder. Also, I have tried changing the permissions of the file just in case, but with no success.
Could there be any specific folder that I have to copy the settings.xml in order to readable by maven? If you need more information about the settings of the environment, I would be glad to provide. Thank you in advance.
P.S. Some additional information: the spring boot project does not contain any .mvn folder or mvnw files. Also no bindings have been currently set in the pom.xml (might be needed in the future)
Beta Was this translation helpful? Give feedback.
All reactions