You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by David Balažic <xe...@gmail.com> on 2010/05/11 11:12:51 UTC

Maven triggers cygwin warning

Hi!

When I start maven inside cygwin environment, cygwin gives a warning
about an  MS-DOS style path.
As the mvn script tries to detect cygwin, I find that surprising.

I have:
 - Windows XP Professional SP3
 - maven 2.2.1
 - Sun JDK 1.6.0_20

First I posted about this to the cygwin list, it can be found here:

http://cygwin.com/ml/cygwin/2010-05/msg00227.html

Regards,
David

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


Re: Maven triggers cygwin warning

Posted by David Balažic <xe...@gmail.com>.
Hi!

Jeremy Bopp <je...@psam.bopp.psam.ten>
(psam=spam (remove) ;  ten=net)
wrote a small patch for mvn.
Using that I don not get the warning any more.

Here it is:

$ diff -u  mvn mvnmodified/mvn-modified
--- mvn 2010-05-12 10:34:19.261049000 +0200
+++ mvnmodified/mvn-modified    2010-05-12 10:31:36.000000000 +0200
@@ -143,11 +143,14 @@
 fi

 CLASSWORLDS_LAUNCHER=org.codehaus.classworlds.Launcher
+CLASSPATH=`echo "${M2_HOME}"/boot/classworlds-*.jar`

 # For Cygwin, switch paths to Windows format before running java
 if $cygwin; then
   [ -n "$M2_HOME" ] &&
     M2_HOME=`cygpath --path --windows "$M2_HOME"`
+  [ -n "$CLASSPATH" ] &&
+    CLASSPATH=`cygpath --path --windows "$CLASSPATH"`
   [ -n "$JAVA_HOME" ] &&
     JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"`
   [ -n "$HOME" ] &&
@@ -156,7 +159,7 @@

 exec "$JAVACMD" \
   $MAVEN_OPTS \
-  -classpath "${M2_HOME}"/boot/classworlds-*.jar \
+  -classpath "$CLASSPATH" \
   "-Dclassworlds.conf=${M2_HOME}/bin/m2.conf" \
   "-Dmaven.home=${M2_HOME}"  \
   ${CLASSWORLDS_LAUNCHER} $QUOTED_ARGS

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


RE: Maven triggers cygwin warning

Posted by "Pacileo, Ken" <ke...@uhc.com>.
I've been getting the same message since I upgraded to Cygwin 1.7. I
don't think I got it with 1.5 but am not positive. The message only
appears during the first invocation of Maven. Since the various app
teams within our org use different versions of Maven I need to have many
scripts to set the version of Maven and Java that a particular app team
will use. I always run "mvn --version" at the end of my scripts to
verify I'm using the correct version. I've gotten this message with
Maven 2.0.8, 2.0.9, 2.0.10, 2.1.0 and 2.2.1 using Sun JDKs 1.4.2_15,
1.5.0_12 or 1.6.0_14.

If I include Nick's suggestion and add "CYGWIN=nodosfilewarning" the
warning does go away.

I'm using Cygwin Setup version 2.697. The message appears in both the
Cygwin bash shell and Xterm v255-1 using Xinit 1.2.1-1

Commenting out the "mvn --version" in my script and running sh -x
"$(which mvn)" -version >mvn.log 2>&1 instead still gives the message.

See the content of this log for output of running Maven 2.0.8 & JDK
1.4.2_15, Maven 2.2.1 & JDK 1.6.0_14 along with the "sh -x "$(which
mvn)" -version >mvn.log 2>&1" command.
http://pastebin.com/WAYwKy3k

This doesn't appear to affect any of our builds so it isn't a problem
for me. Just posting this info in case someone can use it.

Regards,
--Ken

-----Original Message-----
From: Wayne Fay [mailto:waynefay@gmail.com] 
Sent: Tuesday, May 11, 2010 10:40 AM
To: Maven Users List
Subject: Re: Maven triggers cygwin warning

> The warning is printed only once per session. Maybe you missed it?

No, I didn't.

> sh -x "$(which mvn)" -version >mvn.log 2>&1

See the content of my mvn.log here:
http://pastebin.com/SSCrqsjN

I really don't think this is a Maven issue, but rather something
specific about your environment or your specific Cygwin version. It may
also be due to the fact that I'm running cygwin 1.5.25-15, haven't
updated in a while. ;-)

Wayne

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


This e-mail, including attachments, may include confidential and/or
proprietary information, and may be used only by the person or entity
to which it is addressed. If the reader of this e-mail is not the intended
recipient or his or her authorized agent, the reader is hereby notified
that any dissemination, distribution or copying of this e-mail is
prohibited. If you have received this e-mail in error, please notify the
sender by replying to this message and delete this e-mail immediately.


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


Re: Maven triggers cygwin warning

Posted by Wayne Fay <wa...@gmail.com>.
> The warning is printed only once per session. Maybe you missed it?

No, I didn't.

> sh -x "$(which mvn)" -version >mvn.log 2>&1

See the content of my mvn.log here:
http://pastebin.com/SSCrqsjN

I really don't think this is a Maven issue, but rather something
specific about your environment or your specific Cygwin version. It
may also be due to the fact that I'm running cygwin 1.5.25-15, haven't
updated in a while. ;-)

Wayne

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


Re: Maven triggers cygwin warning

Posted by Nick Klauer <kl...@gmail.com>.
I've had that when upgrading to Cygwin 1.7, and it was a Cygwin issue that I
fixed it with.  I've never seen it since modifying my .profile:

export CYGWIN=nodosfilewarning

I'm pretty sure this is a Cygwin issue, not Maven.

For instance, from the "What's New" page on Cygwin 1.7:
http://www.cygwin.com/cygwin-ug-net/ov-new1.7.html

On the first usage of a DOS path (C:\foo, \\foo\bar), the Cygwin DLL emits a
> scary warning that DOS paths shouldn't be used. This warning may be disabled
> via the new CYGWIN=nodosfilewarning setting.


Do you have this setting configured when you open up a terminal (either by
placing in your .profile, .bash_profile, or .bashrc file)?

-Nick
<http://www.cygwin.com/cygwin-ug-net/ov-new1.7.html>
On Tue, May 11, 2010 at 10:52 AM, David Balažic <xe...@gmail.com> wrote:

> On 11 May 2010 17:36, Wayne Fay <wa...@gmail.com> wrote:
> >> When I start maven inside cygwin environment, cygwin gives a warning
> >> about an  MS-DOS style path.
> >> As the mvn script tries to detect cygwin, I find that surprising.
> >
> > I've used Maven inside Cygwin on and off for quite a while now (not
> > really often to be honest), and I've never seen that warning.
> >
> > I read the messages posted to that Cygwin list, tried the "sh -x ..."
> > command suggested by Jeremy and got no warnings, then tried again
> > using mintty and still didn't get anything.
> >
> > This is testing on Win XP SP2, Maven 2.2.1, and Sun JDK 1.6.0_07 with
> > default locale en_US and encoding Cp1252.
>
> The warning is printed only once per session. Maybe you missed it?
>
> What do you get with
> sh -x "$(which mvn)" -version >mvn.log 2>&1
> ?
>
> About the "session", I'm not sure what exactly are the session borders.
> If I log into Windows, start mintty, I get one warning. If I close
> mintty and open it again,
> I again get the warning (once). If I have multiple consoles open,
> sometimes I can not
> get the warning, even if I close all of them and open one new.
>
> Regards,
> David
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

Re: Maven triggers cygwin warning

Posted by Nick Klauer <kl...@gmail.com>.
I've had that when upgrading to Cygwin 1.7, and it was a Cygwin issue that I
fixed it with.  I've never seen it since modifying my .profile:

export CYGWIN=nodosfilewarning

I'm pretty sure this is a Cygwin issue, not Maven.

For instance, from the "What's New" page on Cygwin 1.7:
http://www.cygwin.com/cygwin-ug-net/ov-new1.7.html

On the first usage of a DOS path (C:\foo, \\foo\bar), the Cygwin DLL emits a
> scary warning that DOS paths shouldn't be used. This warning may be disabled
> via the new CYGWIN=nodosfilewarning setting.


Do you have this setting configured when you open up a terminal (either by
placing in your .profile, .bash_profile, or .bashrc file)?

-Nick
<http://www.cygwin.com/cygwin-ug-net/ov-new1.7.html>
On Tue, May 11, 2010 at 10:52 AM, David Balažic <xe...@gmail.com> wrote:

> On 11 May 2010 17:36, Wayne Fay <wa...@gmail.com> wrote:
> >> When I start maven inside cygwin environment, cygwin gives a warning
> >> about an  MS-DOS style path.
> >> As the mvn script tries to detect cygwin, I find that surprising.
> >
> > I've used Maven inside Cygwin on and off for quite a while now (not
> > really often to be honest), and I've never seen that warning.
> >
> > I read the messages posted to that Cygwin list, tried the "sh -x ..."
> > command suggested by Jeremy and got no warnings, then tried again
> > using mintty and still didn't get anything.
> >
> > This is testing on Win XP SP2, Maven 2.2.1, and Sun JDK 1.6.0_07 with
> > default locale en_US and encoding Cp1252.
>
> The warning is printed only once per session. Maybe you missed it?
>
> What do you get with
> sh -x "$(which mvn)" -version >mvn.log 2>&1
> ?
>
> About the "session", I'm not sure what exactly are the session borders.
> If I log into Windows, start mintty, I get one warning. If I close
> mintty and open it again,
> I again get the warning (once). If I have multiple consoles open,
> sometimes I can not
> get the warning, even if I close all of them and open one new.
>
> Regards,
> David
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

Re: Maven triggers cygwin warning

Posted by David Balažic <xe...@gmail.com>.
On 11 May 2010 17:36, Wayne Fay <wa...@gmail.com> wrote:
>> When I start maven inside cygwin environment, cygwin gives a warning
>> about an  MS-DOS style path.
>> As the mvn script tries to detect cygwin, I find that surprising.
>
> I've used Maven inside Cygwin on and off for quite a while now (not
> really often to be honest), and I've never seen that warning.
>
> I read the messages posted to that Cygwin list, tried the "sh -x ..."
> command suggested by Jeremy and got no warnings, then tried again
> using mintty and still didn't get anything.
>
> This is testing on Win XP SP2, Maven 2.2.1, and Sun JDK 1.6.0_07 with
> default locale en_US and encoding Cp1252.

The warning is printed only once per session. Maybe you missed it?

What do you get with
sh -x "$(which mvn)" -version >mvn.log 2>&1
?

About the "session", I'm not sure what exactly are the session borders.
If I log into Windows, start mintty, I get one warning. If I close
mintty and open it again,
I again get the warning (once). If I have multiple consoles open,
sometimes I can not
get the warning, even if I close all of them and open one new.

Regards,
David

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


Re: Maven triggers cygwin warning

Posted by Wayne Fay <wa...@gmail.com>.
> When I start maven inside cygwin environment, cygwin gives a warning
> about an  MS-DOS style path.
> As the mvn script tries to detect cygwin, I find that surprising.

I've used Maven inside Cygwin on and off for quite a while now (not
really often to be honest), and I've never seen that warning.

I read the messages posted to that Cygwin list, tried the "sh -x ..."
command suggested by Jeremy and got no warnings, then tried again
using mintty and still didn't get anything.

This is testing on Win XP SP2, Maven 2.2.1, and Sun JDK 1.6.0_07 with
default locale en_US and encoding Cp1252.

Wayne

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