probably because we have never tested with -Dmaven.repo.local=...
Personally I use to *mvn install -P run-its -s /path/to/settings.xml* which
IntelliJ IDEA does natively.

On Sun, Feb 26, 2017 at 10:02 PM, Guillaume Boué-2 [via Maven] <
ml-node+s40175n5900361...@n5.nabble.com> wrote:

> Hi,
>
> When a system property is passed on the CLI by the user, with
> -Dprop=value, it seems that it is always preferred in the ITs of the
> Failsafe Plugin, even when setting it to a different value in the
> <systemPropertyVariables> configuration. I think this is due to
> SUREFIRE-121, but is there a good way around that? I would like the
> system property defined in <systemPropertyVariables> to override the one
> defined on the CLI during IT execution.
>
> As an example, consider the build of the maven-remote-resources-plugin.
> When trying to run the ITs with a custom local repo set on the CLI (with
> -Dmaven.repo.local=...), they all fail because they can't resolve the
> plugin in the version being built. What happens is that, even though
> there is
>
>    <systemPropertyVariables>
>      <!-- Pass this through to the tests (if set!) to have them pick the
> right repository -->
> <maven.repo.local>${project.build.directory}/it-repo</maven.repo.local>
>     </systemPropertyVariables>
>
> in the POM, to force the local repository to point to a location where
> the plugin was installed before-hand, it is getting ignored because
> -Dmaven.repo.local was also set on the CLI (and to a location where the
> plugin is rightly not installed). The current workaround I have is to
> set a different system property, like <localRepositoryPath>, and then use
>
> verifier.setLocalRepo( System.getProperty( "localRepositoryPath" ) );
>
> in each IT code. But this sounds very brittle since the same issue could
> happen again if someone were to define -DlocalRepositoryPath for any
> reason on the CLI...
>
> Guillaume
>
>
> ---
> L'absence de virus dans ce courrier électronique a été vérifiée par le
> logiciel antivirus Avast.
> https://www.avast.com/antivirus
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> <http:///user/SendEmail.jtp?type=node&node=5900361&i=0>
> For additional commands, e-mail: [hidden email]
> <http:///user/SendEmail.jtp?type=node&node=5900361&i=1>
>
>
>
> ------------------------------
> If you reply to this email, your message will be added to the discussion
> below:
> http://maven.40175.n5.nabble.com/Passing-a-system-property-
> already-defined-on-CLI-to-Failsafe-Plugin-tp5900361.html
> To start a new topic under Maven Developers, email
> ml-node+s40175n142166...@n5.nabble.com
> To unsubscribe from Maven Developers, click here
> <http://maven.40175.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=142166&code=dGlib3JkaWdhbmFAYXBhY2hlLm9yZ3wxNDIxNjZ8LTI4OTQ5MjEwMg==>
> .
> NAML
> <http://maven.40175.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>




--
View this message in context: 
http://maven.40175.n5.nabble.com/Passing-a-system-property-already-defined-on-CLI-to-Failsafe-Plugin-tp5900361p5900369.html
Sent from the Maven Developers mailing list archive at Nabble.com.

Reply via email to