Closed ops4j-issues closed 13 years ago
Stuart McCulloch commented
Hi Alin, IIRC we agreed the params were meant to come first on the command-line passed to Pax-Runner, that way users can override defaults.
I'd much rather prefer to add support for the "+" prefix in Pax-Construct (ie. merge with the calculated repository settings) than ban users from overriding the repositories as this would make it impossible for them to use any workarounds in case of problems in the future.
Alin Dreghiciu commented
Sorry, I have a short memory :smile:. Might be.
If you see an viable solution, I agree: add support for +
Stuart McCulloch commented
Fixed in r17102.
Alin Dreghiciu created PAXCONSTRUCT-109
Pax plugin allows a user to use the --repositories as a pax runner option via <provision><param> as in
<provision>
<param>--repositories=+http://scm.ops4j.org/repos/ops4j/projects/pax/runner-repository/</param>
</provision>
In this case the actual options that are sent to Pax Runner will include the --repository options twice: once from the param (as above) and once from the calculated list of repositories (project, settings,...). Take for example the maven debug output:
DEBUG Starting Pax-Runner 0.19.0 with: [--platform=felix, --profiles=minimal, --repositories=+http://scm.ops4j.org/repos/ops4j/, /Users/alindreghiciu/Downloads/pax-construct-1.4/work/text/runner/deploy-pom.xml, --localRepository=/Users/alindreghiciu/.m2/repository, --repositories=http://repo1.maven.org/maven2,http://repository.ops4j.org/maven2/, --overwriteUserBundles]
Due to the fact that the <param> is before the ones calculated the actual values that will be used by Pax Runner will be the first one = the param not the calculated one.
This behavior is confusing and not intended, so I would say that we either not allow setting the --repository (and also the org.ops4j.pax.url.mvn.repositories and repos) or we handle them by adding the calculated list to the provided param.
I would suggest to use not allow this params as being the easiest and safest solution.
Affects: 1.4 Fixed in: 1.5 Votes: 0, Watches: 0