Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 64FAB200CC3 for ; Sat, 15 Jul 2017 14:24:08 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 636CB169DD9; Sat, 15 Jul 2017 12:24:08 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (unknown [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id A8ED5169DC5 for ; Sat, 15 Jul 2017 14:24:07 +0200 (CEST) Received: (qmail 85761 invoked by uid 500); 15 Jul 2017 12:24:06 -0000 Mailing-List: contact issues-help@maven.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@maven.apache.org Delivered-To: mailing list issues@maven.apache.org Received: (qmail 85750 invoked by uid 99); 15 Jul 2017 12:24:06 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 15 Jul 2017 12:24:06 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 4D4DDC024A for ; Sat, 15 Jul 2017 12:24:06 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -99.202 X-Spam-Level: X-Spam-Status: No, score=-99.202 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id tcV4jKceapfx for ; Sat, 15 Jul 2017 12:24:05 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id E464F5FE02 for ; Sat, 15 Jul 2017 12:24:04 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 24259E0059 for ; Sat, 15 Jul 2017 12:24:04 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 06AF82475C for ; Sat, 15 Jul 2017 12:24:02 +0000 (UTC) Date: Sat, 15 Jul 2017 12:24:02 +0000 (UTC) From: "ASF GitHub Bot (JIRA)" To: issues@maven.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (MNG-6256) Maven script can break if "-f" path contains special characters MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Sat, 15 Jul 2017 12:24:08 -0000 [ https://issues.apache.org/jira/browse/MNG-6256?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16088568#comment-16088568 ] ASF GitHub Bot commented on MNG-6256: ------------------------------------- Github user Tunaki commented on the issue: https://github.com/apache/maven/pull/128 Shouldn't there be the same fix for `mvn`, and not just `mvn.cmd`? [`${basedir}`](https://github.com/apache/maven/blob/707cff6ffdecbfb0e0356c70e3a7b490535e7ce4/apache-maven/src/bin/mvn#L150) and [`${arg}`](https://github.com/apache/maven/blob/707cff6ffdecbfb0e0356c70e3a7b490535e7ce4/apache-maven/src/bin/mvn#L154) are not escaped as well. > Maven script can break if "-f" path contains special characters > ---------------------------------------------------------------- > > Key: MNG-6256 > URL: https://issues.apache.org/jira/browse/MNG-6256 > Project: Maven > Issue Type: Bug > Components: Command Line > Affects Versions: 3.5.0 > Environment: Windows 10 with PowerShell > Reporter: Christoph Etzel > > Executing maven on Windows using the {{\-f}} or {{--file}} parameter to specify an alternate POM file can break the script if the path contains special characters. > It was originally discovered on a Windows Jenkins instance with working directory located under C:\Program Files (x86)\Jenkins...... > Example: > {code:java}mvn -f "folderWithClosing)Bracket/pomFolder"{code} > Command line output: {{"Bracket/pomFolder" kann syntaktisch an dieser Stelle nicht verarbeitet werden.}} > Just for fun: Starting calc from maven script using {{\-f}} > {code:java}mvn -f " ' & start calc"{code} > Command line output: {{POM file '}} and a new calculator process > The bug was introduced with commit https://github.com/apache/maven/commit/f8ab2a650f32d5d87126d341d9bbfccbf99fd0ca for issue MNG-5889. > Workaround: Use maven 3.3.9 or below > Possible fix: Escape {{%FILE_ARG%}} and {{%POM_DIR%}} with {{"}} in {{echo}} commands in {{maven.cmd}} (line 120 and 129). -- This message was sent by Atlassian JIRA (v6.4.14#64029)