Re: Blocker Maven issue just opened?
On Sat, 19 Oct 2019 at 11:32, Neil C Smith wrote: > Searching that system property surprised to see it's quite old - > https://blogs.oracle.com/thejavatutorials/jdk-7u25:-solutions-to-issues-caused-by-changes-to-runtimeexec > > I've opened a linked issue for 11.3 to track fixing it properly > https://issues.apache.org/jira/browse/NETBEANS-3254 I have had a bit of a play with this and might have made some progress. However, in the NB source there are at comments relating to fixing at least 6 different bugs going back a decade so it's obviously a bit of a hairy patch of code. In the linked article above it gives the 'Golden Rule' as creating a process builder with the first 2 string args being "cmd" and "/c", then folding the actual thing you want to call into the third argument, taking care to quote it properly. But it seems to me that with changes to the JDK's command line argument validation it is impossible to tiptoe around the tighter checks with this technique, and furthermore a better approach is to keep all the parts of the arguments separated out, and let Java take care of the escaping. More like you'd do on Linux, in fact. I've had a go at implementing this here: https://github.com/pedro-w/netbeans/tree/NETBEANS-3254 It works for me with JDK11 on Windows and Linux but I only tested simple projects. I'm not a Maven expert* and I don't know what kind of crazy parameters people will use to invoke mvn.cmd with. So, if anyone could have a go and see where they get to I would be grateful. In my branch there is also a commit which just cleans up some warnings in the code, I didn't go all-in on this (e.g. using lambdas where suggested) but I thought if we were changing the file we might as well clear up a few things. Pete .* see what I _didn't_ do there! - To unsubscribe, e-mail: dev-unsubscr...@netbeans.apache.org For additional commands, e-mail: dev-h...@netbeans.apache.org For further information about the NetBeans mailing lists, visit: https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
Re: Blocker Maven issue just opened?
On Sat, 19 Oct 2019 at 13:36, Neil C Smith wrote: > So, vc1 is building - probably another half hour to go. If anyone who > can test this could look at > https://builds.apache.org/view/M-R/view/NetBeans/job/netbeans-TLP/job/netbeans/job/release112/29/ > once complete and check this is fixed, I'll look to initiate the vote > later today. OK, realistically with need to wait for new build, I'm not going to finish all tasks today ... so, still time to test! Thanks, Neil - To unsubscribe, e-mail: dev-unsubscr...@netbeans.apache.org For additional commands, e-mail: dev-h...@netbeans.apache.org For further information about the NetBeans mailing lists, visit: https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
Re: Re: Blocker Maven issue just opened?
No objection to the change but this made me notice the size of that Netbeans.conf file. If I’m not mistaken, a lot of these are added to account for java modules in some way (I.e. —add-exports) but was curious if long term (maybe after some further java 9 module updates of some type) if those would eventually be refactored/removed to simplify things some. Eric Bresie ebre...@gmail.com > On October 18, 2019 at 3:37:56 PM CDT, Geertjan Wielenga > wrote: > https://github.com/apache/netbeans/pull/1581 > > https://issues.apache.org/jira/browse/NETBEANS-3253 > > Gj > > On Fri, Oct 18, 2019 at 10:31 PM Neil C Smith wrote: > > > On Fri, 18 Oct 2019, 21:10 Christian Oyarzun, wrote: > > > > > FYI, Adding -J-Djdk.lang.Process.allowAmbiguousCommands=true to > > > netbeans_default_options does resolve the issue. > > > > > > > Definitely looking like we might want to add that into netbeans.conf before > > 11.2? If anyone wants to put in the PR I can merge across and retrigger the > > voting build tomorrow. > > > > Best wishes, > > > > Neil > > > > > > >
Re: Blocker Maven issue just opened?
On Sat, 19 Oct 2019 at 11:31, Neil C Smith wrote: > Thanks! Merged and looking to retrigger vc1 build shortly. So, vc1 is building - probably another half hour to go. If anyone who can test this could look at https://builds.apache.org/view/M-R/view/NetBeans/job/netbeans-TLP/job/netbeans/job/release112/29/ once complete and check this is fixed, I'll look to initiate the vote later today. Thanks, Neil - To unsubscribe, e-mail: dev-unsubscr...@netbeans.apache.org For additional commands, e-mail: dev-h...@netbeans.apache.org For further information about the NetBeans mailing lists, visit: https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
Re: Blocker Maven issue just opened?
On Fri, 18 Oct 2019 at 21:38, Geertjan Wielenga wrote: > > https://github.com/apache/netbeans/pull/1581 > > https://issues.apache.org/jira/browse/NETBEANS-3253 > Thanks! Merged and looking to retrigger vc1 build shortly. Searching that system property surprised to see it's quite old - https://blogs.oracle.com/thejavatutorials/jdk-7u25:-solutions-to-issues-caused-by-changes-to-runtimeexec Hopefully doesn't introduce any other unwanted behaviour. I've opened a linked issue for 11.3 to track fixing it properly https://issues.apache.org/jira/browse/NETBEANS-3254 Best wishes, Neil - To unsubscribe, e-mail: dev-unsubscr...@netbeans.apache.org For additional commands, e-mail: dev-h...@netbeans.apache.org For further information about the NetBeans mailing lists, visit: https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
Re: Blocker Maven issue just opened?
https://github.com/apache/netbeans/pull/1581 https://issues.apache.org/jira/browse/NETBEANS-3253 Gj On Fri, Oct 18, 2019 at 10:31 PM Neil C Smith wrote: > On Fri, 18 Oct 2019, 21:10 Christian Oyarzun, wrote: > > > FYI, Adding -J-Djdk.lang.Process.allowAmbiguousCommands=true to > > netbeans_default_options does resolve the issue. > > > > Definitely looking like we might want to add that into netbeans.conf before > 11.2? If anyone wants to put in the PR I can merge across and retrigger the > voting build tomorrow. > > Best wishes, > > Neil > > > >
Re: Blocker Maven issue just opened?
On Fri, 18 Oct 2019, 21:10 Christian Oyarzun, wrote: > FYI, Adding -J-Djdk.lang.Process.allowAmbiguousCommands=true to > netbeans_default_options does resolve the issue. > Definitely looking like we might want to add that into netbeans.conf before 11.2? If anyone wants to put in the PR I can merge across and retrigger the voting build tomorrow. Best wishes, Neil >
Re: Blocker Maven issue just opened?
FYI, Adding -J-Djdk.lang.Process.allowAmbiguousCommands=true to netbeans_default_options does resolve the issue. Tested with 11.2-beta3 with amazon corretto 11.0.5 and 1.8.0_212 --Christian On Fri, Oct 18, 2019 at 2:51 PM Matthias Bläsing wrote: > Hi, > > Am Freitag, den 18.10.2019, 19:37 +0100 schrieb Peter Hull: > > Possibly it is the change labelled "Runtime.exec and ProcessBuilder > > Argument Restrictions" in > > > https://www.oracle.com/technetwork/java/javase/11all-relnotes-5013287.html#R11_0_5 > > > > In which case it's not a bug introduced by JDK and the command line > > for maven needs to change, I think. > > so is there a reason no to set: > > jdk.lang.Process.allowAmbiguousCommands > > to true? From the above referenced link: > > [...] The restrictions are enforced if there is a security manager and > the jdk.lang.Process.allowAmbiguousCommands property is "false" or > there is no security manager and property is not "false".[...] > > As we run with a security manager that property might be our escape to > that property. > > Greetings > > Matthias > > > - > To unsubscribe, e-mail: dev-unsubscr...@netbeans.apache.org > For additional commands, e-mail: dev-h...@netbeans.apache.org > > For further information about the NetBeans mailing lists, visit: > https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists > > > >
Re: Blocker Maven issue just opened?
Hi, Am Freitag, den 18.10.2019, 19:37 +0100 schrieb Peter Hull: > Possibly it is the change labelled "Runtime.exec and ProcessBuilder > Argument Restrictions" in > https://www.oracle.com/technetwork/java/javase/11all-relnotes-5013287.html#R11_0_5 > > In which case it's not a bug introduced by JDK and the command line > for maven needs to change, I think. so is there a reason no to set: jdk.lang.Process.allowAmbiguousCommands to true? From the above referenced link: [...] The restrictions are enforced if there is a security manager and the jdk.lang.Process.allowAmbiguousCommands property is "false" or there is no security manager and property is not "false".[...] As we run with a security manager that property might be our escape to that property. Greetings Matthias - To unsubscribe, e-mail: dev-unsubscr...@netbeans.apache.org For additional commands, e-mail: dev-h...@netbeans.apache.org For further information about the NetBeans mailing lists, visit: https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
Re: Blocker Maven issue just opened?
On Fri, 18 Oct 2019 at 19:37, Peter Hull wrote: > > Possibly it is the change labelled "Runtime.exec and ProcessBuilder > Argument Restrictions" in > https://www.oracle.com/technetwork/java/javase/11all-relnotes-5013287.html#R11_0_5 > > In which case it's not a bug introduced by JDK and the command line > for maven needs to change, I think. Interesting! So does running with -J-Dnetbeans.security.nocheck=true provide a workaround? Neil - To unsubscribe, e-mail: dev-unsubscr...@netbeans.apache.org For additional commands, e-mail: dev-h...@netbeans.apache.org For further information about the NetBeans mailing lists, visit: https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
Re: Blocker Maven issue just opened?
Possibly it is the change labelled "Runtime.exec and ProcessBuilder Argument Restrictions" in https://www.oracle.com/technetwork/java/javase/11all-relnotes-5013287.html#R11_0_5 In which case it's not a bug introduced by JDK and the command line for maven needs to change, I think. Pete On Fri, 18 Oct 2019 at 19:27, Geertjan Wielenga wrote: > > And here as well: > > https://netbeans.org/bugzilla/show_bug.cgi?id=228901 > > Can someone on Windows take 11.2 beta 3 and try to reproduce? > > Gj > > On Fri, Oct 18, 2019 at 8:25 PM Geertjan Wielenga > wrote: > > > Similar report: > > > > > > https://stackoverflow.com/questions/58411279/java-with-maven-wouldnt-build-cannot-run-program-cmd-malformed-argument-has/58456347#58456347 > > > > Gj > > > > On Fri, Oct 18, 2019 at 8:21 PM Geertjan Wielenga > > wrote: > > > >> https://twitter.com/lhochet/status/1185217897049841671 > >> > >> Gj > >> > >> On Fri, Oct 18, 2019 at 8:21 PM Geertjan Wielenga > >> wrote: > >> > >>> Maybe it's the same concern as posted here on Twitter: > >>> > >>> > >>> On Fri, Oct 18, 2019 at 7:10 PM Neil C Smith > >>> wrote: > >>> > Hi, > > Just looking at final tasks for triggering the NB 11.2 release vote > and noticed a new "blocker" issue just opened. Anyone, particularly > with Windows 10, want to assess? > > https://issues.apache.org/jira/projects/NETBEANS/issues/NETBEANS-3251 > > Thanks, > > Neil > > - > To unsubscribe, e-mail: dev-unsubscr...@netbeans.apache.org > For additional commands, e-mail: dev-h...@netbeans.apache.org > > For further information about the NetBeans mailing lists, visit: > https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists > > > > - To unsubscribe, e-mail: dev-unsubscr...@netbeans.apache.org For additional commands, e-mail: dev-h...@netbeans.apache.org For further information about the NetBeans mailing lists, visit: https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
Re: Blocker Maven issue just opened?
And here as well: https://netbeans.org/bugzilla/show_bug.cgi?id=228901 Can someone on Windows take 11.2 beta 3 and try to reproduce? Gj On Fri, Oct 18, 2019 at 8:25 PM Geertjan Wielenga wrote: > Similar report: > > > https://stackoverflow.com/questions/58411279/java-with-maven-wouldnt-build-cannot-run-program-cmd-malformed-argument-has/58456347#58456347 > > Gj > > On Fri, Oct 18, 2019 at 8:21 PM Geertjan Wielenga > wrote: > >> https://twitter.com/lhochet/status/1185217897049841671 >> >> Gj >> >> On Fri, Oct 18, 2019 at 8:21 PM Geertjan Wielenga >> wrote: >> >>> Maybe it's the same concern as posted here on Twitter: >>> >>> >>> On Fri, Oct 18, 2019 at 7:10 PM Neil C Smith >>> wrote: >>> Hi, Just looking at final tasks for triggering the NB 11.2 release vote and noticed a new "blocker" issue just opened. Anyone, particularly with Windows 10, want to assess? https://issues.apache.org/jira/projects/NETBEANS/issues/NETBEANS-3251 Thanks, Neil - To unsubscribe, e-mail: dev-unsubscr...@netbeans.apache.org For additional commands, e-mail: dev-h...@netbeans.apache.org For further information about the NetBeans mailing lists, visit: https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
Re: Blocker Maven issue just opened?
Similar report: https://stackoverflow.com/questions/58411279/java-with-maven-wouldnt-build-cannot-run-program-cmd-malformed-argument-has/58456347#58456347 Gj On Fri, Oct 18, 2019 at 8:21 PM Geertjan Wielenga wrote: > https://twitter.com/lhochet/status/1185217897049841671 > > Gj > > On Fri, Oct 18, 2019 at 8:21 PM Geertjan Wielenga > wrote: > >> Maybe it's the same concern as posted here on Twitter: >> >> >> On Fri, Oct 18, 2019 at 7:10 PM Neil C Smith >> wrote: >> >>> Hi, >>> >>> Just looking at final tasks for triggering the NB 11.2 release vote >>> and noticed a new "blocker" issue just opened. Anyone, particularly >>> with Windows 10, want to assess? >>> >>> https://issues.apache.org/jira/projects/NETBEANS/issues/NETBEANS-3251 >>> >>> Thanks, >>> >>> Neil >>> >>> - >>> To unsubscribe, e-mail: dev-unsubscr...@netbeans.apache.org >>> For additional commands, e-mail: dev-h...@netbeans.apache.org >>> >>> For further information about the NetBeans mailing lists, visit: >>> https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists >>> >>> >>> >>>
Re: Blocker Maven issue just opened?
Maybe it's the same concern as posted here on Twitter: On Fri, Oct 18, 2019 at 7:10 PM Neil C Smith wrote: > Hi, > > Just looking at final tasks for triggering the NB 11.2 release vote > and noticed a new "blocker" issue just opened. Anyone, particularly > with Windows 10, want to assess? > > https://issues.apache.org/jira/projects/NETBEANS/issues/NETBEANS-3251 > > Thanks, > > Neil > > - > To unsubscribe, e-mail: dev-unsubscr...@netbeans.apache.org > For additional commands, e-mail: dev-h...@netbeans.apache.org > > For further information about the NetBeans mailing lists, visit: > https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists > > > >
Re: Blocker Maven issue just opened?
https://twitter.com/lhochet/status/1185217897049841671 Gj On Fri, Oct 18, 2019 at 8:21 PM Geertjan Wielenga wrote: > Maybe it's the same concern as posted here on Twitter: > > > On Fri, Oct 18, 2019 at 7:10 PM Neil C Smith > wrote: > >> Hi, >> >> Just looking at final tasks for triggering the NB 11.2 release vote >> and noticed a new "blocker" issue just opened. Anyone, particularly >> with Windows 10, want to assess? >> >> https://issues.apache.org/jira/projects/NETBEANS/issues/NETBEANS-3251 >> >> Thanks, >> >> Neil >> >> - >> To unsubscribe, e-mail: dev-unsubscr...@netbeans.apache.org >> For additional commands, e-mail: dev-h...@netbeans.apache.org >> >> For further information about the NetBeans mailing lists, visit: >> https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists >> >> >> >>