You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Siegmar Alber <si...@gmail.com> on 2010/11/26 21:49:17 UTC

Issue if colon in project path

Hi all,

is it only my setup or is there a problem if there is a colon in the project path? I attached a small sample project. (I hope it's allowed to attach files...)

I'm using Maven 3 and tried it on Mac OS X (10.6.5) and on Ubuntu Linux.

To reproduce the problem:
1. Untar the attached project somewhere.
2. Try "mvn test".
3. Everything works like expected.
4. Do "mvn clean".
5. Rename some parent directory (or the project directory itself) to something containing a colon (for example from "colon_issue" to "colon:issue").
6. Retry "mvn test".
7. It shows a compilation error and, of course, gives you a build failure.

The error message looks something like this:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.3.2:testCompile (default-testCompile) on project colon_issue: Compilation failure
[ERROR] issue/src/test/java/org/example/colon_issue/FooTest.java:[11,30] cannot find symbol
[ERROR] symbol  : class Foo
[ERROR] location: class org.example.colon_issue.FooTest

Looks like it splits the path to the main classes at the colon and consequently can't compile the test sources...

Should I report this as a bug?

-- 
Thank you and have fun,
Siegmar


Re: Issue if colon in project path

Posted by Siegmar Alber <si...@gmail.com>.
Hi Wayne,

Am 28.11.2010 um 01:01 schrieb Wayne Fay:

> Feel free to hack the Maven source code to add this functionality and
> then donate it via Jira for inclusion in a future release.

thank you for your answer. If I find some time, I will try to do this. :-)


> I just
> don't see anyone (else) caring about this enough to actually do the
> work to enable it.

I understand that it's not a large or very important issue, but at least I ran into it and maybe someone else will do so in future... ;-)

-- 
Have fun,
Siegmar


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


Re: Issue if colon in project path

Posted by Wayne Fay <wa...@gmail.com>.
> And again IMHO if some application does not support that, it's a bug in this
> application. And if you follow this idea, some time in future it will be possible
> (without any problems) to use all this characters in filenames! So in future

Feel free to hack the Maven source code to add this functionality and
then donate it via Jira for inclusion in a future release. I just
don't see anyone (else) caring about this enough to actually do the
work to enable it.

Wayne

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


Re: Issue if colon in project path

Posted by Siegmar Alber <si...@gmail.com>.
Hi again,


Am 26.11.2010 um 22:08 schrieb Brian Topping:

> For one thing, using a colon in a filename on OSX is bound to lead to problems in a lot of different applications.  That is the directory separator for MFS and HFS volumes, and while HFS+ and has deprecated use of colon, I believe it is still supported in strange ways. 

yes, I know that one should not use spaces, colons, ä, ö, ü, $ and such in file or directory names. But IMHO if the operating system and file system supports it (and yes, Mac OS X with HFS+ supports : in filenames[1]), why shouldn't a user actually use them? And again IMHO if some application does not support that, it's a bug in this application. And if you follow this idea, some time in future it will be possible (without any problems) to use all this characters in filenames! So in future you don't need to explain to stupid people like me, that they should not use colons ;-)

What is the technical (not historical) reason not to use special characters? Of course you need(?) one character to separate directories (the slash on most systems), so this character is not allowed by the operating system (and it refuses to create a file containing this character). But the others?


Am 27.11.2010 um 06:04 schrieb Wayne Fay:

>> is it only my setup or is there a problem if there is a colon in the project path?
> 
> Rename your directory and remove the colon. Including colons in
> directory names is generally a bad idea for a lot of reasons on most
> operating systems.

Yes, I know I could do that (and I will, until it is supported)...


>> Should I report this as a bug?
> 
> Definitely not.
> 
> Does this even work in vanilla javac or give a similar problem? I'm
> thinking it would also break. (ps I just tried on Ubuntu with
> openjdk-6 and the colon in my package name broke javac, not surprised)

I think it was not clear what I wanted to explain: I'm aware that Java package names are not allowed to contain colons (and most other special characters). I'm talking about some parent directory of your project:

I understand that /tmp/foobar/src/main/java/colon:issue/Foo.java is not allowed, but /tmp/foo:bar/src/main/java/colon_issue/Foo.java should (and java(c) does not have any problems with that, I just tried it out)!



[1] Well, the Finder and most Mac applications show the colon as "/" and tell you that ":" is not allowed, but "under the hood" the slash is represented as colon. You can see this if you create a file with a slash in the name and do a "ls" in the directory.

-- 
Thank you and have fun,
Siegmar


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


Re: Issue if colon in project path

Posted by Wayne Fay <wa...@gmail.com>.
> is it only my setup or is there a problem if there is a colon in the project path?

Rename your directory and remove the colon. Including colons in
directory names is generally a bad idea for a lot of reasons on most
operating systems.

> Should I report this as a bug?

Definitely not.

Does this even work in vanilla javac or give a similar problem? I'm
thinking it would also break. (ps I just tried on Ubuntu with
openjdk-6 and the colon in my package name broke javac, not surprised)

Wayne

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


Re: Issue if colon in project path

Posted by Brian Topping <to...@codehaus.org>.
For one thing, using a colon in a filename on OSX is bound to lead to problems in a lot of different applications.  That is the directory separator for MFS and HFS volumes, and while HFS+ and has deprecated use of colon, I believe it is still supported in strange ways. 

On Nov 26, 2010, at 3:49 PM, Siegmar Alber wrote:

> Hi all,
> 
> is it only my setup or is there a problem if there is a colon in the project path? I attached a small sample project. (I hope it's allowed to attach files...)
> 
> I'm using Maven 3 and tried it on Mac OS X (10.6.5) and on Ubuntu Linux.
> 
> To reproduce the problem:
> 1. Untar the attached project somewhere.
> 2. Try "mvn test".
> 3. Everything works like expected.
> 4. Do "mvn clean".
> 5. Rename some parent directory (or the project directory itself) to something containing a colon (for example from "colon_issue" to "colon:issue").
> 6. Retry "mvn test".
> 7. It shows a compilation error and, of course, gives you a build failure.
> 
> The error message looks something like this:
> [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.3.2:testCompile (default-testCompile) on project colon_issue: Compilation failure
> [ERROR] issue/src/test/java/org/example/colon_issue/FooTest.java:[11,30] cannot find symbol
> [ERROR] symbol  : class Foo
> [ERROR] location: class org.example.colon_issue.FooTest
> 
> Looks like it splits the path to the main classes at the colon and consequently can't compile the test sources...
> 
> Should I report this as a bug?
> 
> -- 
> Thank you and have fun,
> Siegmar
> 
> <colon_issue.tar.bz2>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org


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