pypowsybl
pypowsybl copied to clipboard
[WIP] Maven wrapper
Please check if the PR fulfills these requirements
- [x] The commit message follows our guidelines
- [x] Tests for the changes have been added (for bug fixes / features)
- [ ] Docs have been added / updated (for bug fixes / features)
Does this PR already have an issue describing the problem?
No
What kind of change does this PR introduce?
Feature
What is the new behavior (if this is a feature change)? We use Maven wrapper to build the Java part, so that we do not require to install a specific Maven version.
Does this PR introduce a breaking change or deprecate an API?
- [ ] The Breaking Change or Deprecated label has been added
- [ ] The migration guide has been updated in the github wiki (What changes might users need to make in their application due to this PR?)
Other information:
have you tested the full ci ?
is there anything to do with proxy configuration ?
have you tested the full ci ?
No, but I'm confident
is there anything to do with proxy configuration ?
@olperr1 I guess you add some doc on core side to how configure the proxy for the maven wrapper?
is there anything to do with proxy configuration ?
@olperr1 I guess you add some doc on core side to how configure the proxy for the maven wrapper?
@geofjamg: I added a section about it in the README.md
of powsybl-core... But we found out with @jonenst that it doesn't work totally. He just found the whole solution:
There are 2 steps:
- the maven wrapper distribution download
- the maven distribution download
For the first step, you should define the proxy in the current terminal via the http_proxy
envvar.
For the second step, you should use one of the following methods:
./mvnw -DproxyHost=XXX -DproxyPort=XXX -Dhttp.proxyUser=XXX -Dhttp.proxyPassword=XXX -Djdk.http.auth.tunneling.disabledSchemes= clean
or
export MVNW_USERNAME=XXX
export MVNW_PASSWORD=XXX
./mvnw -DproxyHost=XXX -DproxyPort=XXX -Djdk.http.auth.tunneling.disabledSchemes= clean
Note that in both cases, the -Djdk.http.auth.tunneling.disabledSchemes=
option should be left empty.
I will add a PR in core to amend the README.md
.
Do we need to add the install.sh like in core ?
@EtienneLt could you try to build with the proxy ?
Do we need to add the install.sh like in core ?
No
./mvnw -DproxyHost=XXX -DproxyPort=XXX -Dhttp.proxyUser=XXX -Dhttp.proxyPassword=XXX -Djdk.http.auth.tunneling.disabledSchemes= clean
This one is problematic for us, because call of mvnw is done automatically from cmake file. It means that we need to automatically define -DproxyHost=XXX -DproxyPort=XXX -Dhttp.proxyUser=XXX -Dhttp.proxyPassword=XXX from env variables int he CmakeList.txt
Or not use the Maven wrapper...
well I make the release if we keep this pr it will be in next release is it alright ?
./mvnw -DproxyHost=XXX -DproxyPort=XXX -Dhttp.proxyUser=XXX -Dhttp.proxyPassword=XXX -Djdk.http.auth.tunneling.disabledSchemes= clean
This one is problematic for us, because call of mvnw is done automatically from cmake file. It means that we need to automatically define -DproxyHost=XXX -DproxyPort=XXX -Dhttp.proxyUser=XXX -Dhttp.proxyPassword=XXX from env variables int he CmakeList.txt
Or not use the Maven wrapper...
There is no need to execute this command every time. It can be called manually once to download the wrapper and Maven distributions. Then mvnw won't try to download anything until the maven or the maven wrapper version changes.
(Note that Maven will download artifacts. So you may have to define a proper maven settings.xml
file... which can contain a proxy definition.)
well I make the release if we keep this pr it will be in next release is it alright ?
yes, let's take time to think about the best solution for this PR