Can't you use a profile for the test case, where you redefine the maven-compiler-plugin settings to what you need for test ?
I thinks settings in profiles overrides previously seen definitions, but I'm not 100% sure of that. In worst case you might need 2 different profiles. Cheers, Tommy Från: Lovro Pandzic <[email protected]> Svara: Maven Users List <[email protected]> Datum: 9 oktober 2019 at 14:48:46 Till: [email protected] <[email protected]>, Maven Users List <[email protected]> Ämne: Re: Maven compiler plugin - test compiler arguments with double dash But this approach also affects production compiler... So the full use case is: production: -parameters test: -parameters --enable-preview BR, Lovro Pandzic Division Lead, Enterprise Zagreb [email protected] On 09/10/2019, 14:46, "Karl Heinz Marbaise" <[email protected]> wrote: Hi, this is documented on the documentation page[1] which can be achieved by using the following: <project> [...] <build> [...] <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>3.8.1</version> <configuration> <compilerArgs> <arg>--enable-preview</arg> <arg>wished supplemental option</arg> </compilerArgs> </configuration> </plugin> </plugins> [...] </build> [...] </project> Kind regards Karl Heinz Marbaise [1]: https://maven.apache.org/plugins/maven-compiler-plugin/examples/pass-compiler-arguments.html On 09.10.19 14:23, Lovro Pandzic wrote: > Hello, > > I'd like to pass -parameters and enable-preview arguments to the test > compiler but I can't figure out how, the closest I got is: > > <testCompilerArguments> > <parameters/> > <enable-preview/> > </testCompilerArguments> > > How can I pass two arguments to the test compiler where one of them requires > double dash? > > Best Regards, > > > > > [https://cf-cdn.infobip.com/email_signature/Infobip_logo_vertical_signature.png]<https://www.infobip.com?utm_medium=email&utm_source=signature&utm_campaign=reach%20%7C%20email%20%7C%20global%20%7C%20signature&utm_term=all%20%7C%20recepient%20%7C%20mwc19&utm_content=signature> > > > Lovro Pandzic > Division Lead, Enterprise Zagreb > > [email protected]<mailto:[email protected]> > > [https://cf-cdn.infobip.com/email_signature/line.png] > > > > Office: Zadarska 80, 6th floor, 10000 Zagreb, Croatia > Mobile: +385921001403 > > > [https://cf-cdn.infobip.com/email_signature/roccovendor2019.png]<https://www.infobip.com/en/media/press-releases/rocco-awards-2019-infobip-rated-1-a2p-sms-messaging-vendor-by-enterprises-m> > [https://cf-cdn.infobip.com/email_signature/spacer.png] > > [https://cf-cdn.infobip.com/email_signature/Facebook.png]<https://www.facebook.com/infobip> > [https://cf-cdn.infobip.com/email_signature/Linkedin.png] > <https://www.linkedin.com/company/infobip> > [https://cf-cdn.infobip.com/email_signature/Twitter.png] > <https://twitter.com/Infobip> > [https://cf-cdn.infobip.com/email_signature/Instagram.png] > <https://www.instagram.com/infobip/> > [https://cf-cdn.infobip.com/email_signature/Youtube.png] > <https://www.youtube.com/channel/UCUPSTy53VecI5GIir3J3ZbQ> > www.infobip.com<https://www.infobip.com?utm_medium=email&utm_source=signature&utm_campaign=reach%20%7C%20email%20%7C%20global%20%7C%20signature&utm_term=all%20%7C%20recepient%20%7C%20mwc19&utm_content=signature> > > > > GSMA Associate Member / Mobey Forum Member > This message is private and confidential. Any views or opinions expressed are > solely those of the author and do not necessarily represent those of Infobip > d.o.o. If you have received this message in error, please notify us > immediately via email to > [email protected]<mailto:[email protected]> or > telephone +442032864231. > --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
