You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by Christian Schulte <cs...@schulte.it> on 2017/02/23 01:12:45 UTC

Launcher script issues in 3.5.0.

Hi,

our launchers (both Unix and Windows) still seem to be broken for
directory names like "Spaces & Special Char".

pwd
/home/schulte
$ mvn -version
Apache Maven 3.5.0-SNAPSHOT (e6217a455547e5b3bcac310be18daf2a333cd5d1;
2017-02-21T01:24:24+01:00)
Maven home: /home/schulte/Applications/apache-maven-3.5.0-SNAPSHOT
Java version: 1.7.0_80, vendor: Oracle Corporation
Java home: /usr/local/jdk-1.7.0/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "openbsd", version: "6.0", arch: "amd64", family: "unix"

$ env LANG=C mvn -f "/tmp/Spaces\ \&\ Special\
Char/maven-invoker-plugin/pom.xml" clean

/home/schulte/Applications/apache-maven-3.5.0-SNAPSHOT/bin/mvn[171]: [:
\&\: unexpected operator/operand
POM file /tmp/Spaces\ \&\ Special\ Char/maven-invoker-plugin/pom.xml
specified with the -f/--file command line argument does not exist
[INFO] Scanning for projects...
[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[FATAL] Non-readable POM /tmp/Spaces\ \&\ Special\
Char/maven-invoker-plugin/pom.xml: /tmp/Spaces\ \&\ Special\
Char/maven-invoker-plugin/pom.xml (No such file or directory) @


$ env LANG=C mvn -f /tmp/Spaces\ \&\ Special\
Char/maven-invoker-plugin/pom.xml clean

/home/schulte/Applications/apache-maven-3.5.0-SNAPSHOT/bin/mvn[171]: [:
&: unexpected operator/operand
POM file /tmp/Spaces & Special Char/maven-invoker-plugin/pom.xml
specified with the -f/--file command line argument does not exist
[INFO] Scanning for projects...
[INFO]
[INFO]
------------------------------------------------------------------------
[INFO] Building Apache Maven Invoker Plugin 3.0.0-SNAPSHOT
[INFO]
------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:3.0.0:clean (default-clean) @
maven-invoker-plugin ---

Something similar is happening on Windows. On Unix, the mvn launcher
fails as soon as it is used in a directory like "Spaces & Special Char".
On Windows this works. So on Windows only the -f option is affected. Can
someone take a look, please?

Just checkout some project into a directory with a name like "Spaces &
Special Char" and try to execute Maven from inside that directory and
from outside that directory using the -f option pointing to the pom
inside that directory. It won't work on Unix and Windows. I somehow lost
track on all those launcher related issues for 3.5.0 but this should
work with 3.5.0.

Regards,
-- 
Christian

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


Re: Launcher script issues in 3.5.0.

Posted by Christian Schulte <cs...@schulte.it>.
See the attached patch. This should make the Unix launcher support
directory names like "Spaces & Special Char". At least here:

SH_VERSION='@(#)PD KSH v5.2.14 99/07/13.2'

Can someone review and apply this patch please. Thanks.

Regards,
-- 
Christian


Re: Launcher script issues in 3.5.0.

Posted by Christian Schulte <cs...@schulte.it>.
Please see the attachment. Can someone please review this and apply the
patches. Both launchers - Windows and Unix - should support directory
names like "Spaces & Special Char" with this patch applied. I do not
know what JIRA issue corresponds to these changes.

Regards,
-- 
Christian


Re: Launcher script issues in 3.5.0.

Posted by Christian Schulte <cs...@schulte.it>.
Am 02/23/17 um 04:21 schrieb Igor Fedorenko:
> On all platforms .mvn/ search is expected to start with directory
> specified by -f parameter and keep doing "cd .." until it files .mvn/
> subdirectory or hits the filesystem root.

What if I put a .mvn directory at the file system root? Will that become
the default for everything when there is no other .mvn found before?

> The idea is to use .mvn/ subdirectory as a marker of multimodule project
> basedir. The build can be started from any submodule, but multimodule
> project basedir will be always the same.

That's how I understood it as well. If it does not stop anywhere but the
drive root, this will lead to invalid project base directories as soon
as someone adds a .mvn directory somewhere inappropriate. I am not using
that feature myself, so just wanted to be sure. The patch does not
change the logic in any way. Just makes it work for directory names like
"Spaces & Special Char". I'll merge it, if no one objects.

Regards,
-- 
Christian


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


Re: Launcher script issues in 3.5.0.

Posted by Igor Fedorenko <ig...@ifedorenko.com>.
On all platforms .mvn/ search is expected to start with directory
specified by -f parameter and keep doing "cd .." until it files .mvn/
subdirectory or hits the filesystem root.

The idea is to use .mvn/ subdirectory as a marker of multimodule project
basedir. The build can be started from any submodule, but multimodule
project basedir will be always the same.

-- 
Regards,
Igor

On Wed, Feb 22, 2017, at 09:19 PM, Christian Schulte wrote:
> Both issues seem to be related to MNG-5889. MNG-5889 branch created. If
> no one objects, I'll merge it to master when the build job completed
> successfully on Jenkins. Otherwise consider the MNG-5889 branch yours.
> Note: I just noticed that the Windows launcher does not stop searching
> for the .mvn directory at the directory given by the -f option. Search
> does not stop until the drive root has been reached (like C:). I am not
> sure this is intended.
> 
> Regards,
> -- 
> Christian
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


Re: Launcher script issues in 3.5.0.

Posted by Christian Schulte <cs...@schulte.it>.
Both issues seem to be related to MNG-5889. MNG-5889 branch created. If
no one objects, I'll merge it to master when the build job completed
successfully on Jenkins. Otherwise consider the MNG-5889 branch yours.
Note: I just noticed that the Windows launcher does not stop searching
for the .mvn directory at the directory given by the -f option. Search
does not stop until the drive root has been reached (like C:). I am not
sure this is intended.

Regards,
-- 
Christian


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org