I finally gave in :-) and downloaded maven 2 at home, since at work, we're still sticking with maven 1.

Worked like a charm with cygwin, but I see what you mean when running from Windows cmd.

So I looked at the batch file (m2.bat) and saw the problem. I am not an expert on batch files, but I got maven 2 to work properly after changing line 68. The line sets $M2_HOME% and it needed to go one more level up the directory structure in order for line 79 to work properly.

Change line 86 from:
if "%OS%"=="Windows_NT" SET M2_HOME=%~dps0\..

to

if "%OS%"=="Windows_NT" SET M2_HOME=%~dps0\..\\..

(need double \\ to escape)

Of course another way of making everything work without changing the batch file would be to set the M2_HOME environment variable manually. Although if you decide to go this way, the path can NOT have spaces. If you installed to a path with spaces, you can run `dir /X` in cmd and it will give you the DOS path which has no spaces, something like:

C:\PROGRA~1\MAVEN-~1.0-A

and you can use that to set the environment variable and it would work too.

All this was tested on Win2000.

Dave "The Gerb" wrote:
Nope, I cant just type anything, I must put in the full path... or drag/drop
THEN append the command afterwards.

-----Original Message-----
From: baleineca [mailto:[EMAIL PROTECTED] Sent: Thursday, April 14, 2005 10:54 PM
To: Maven Users List
Subject: Re: Need of serious help (almost there!)


I am not yet using maven 2 (still on maven 1.0.2), so I am not sure 100% but if maven 2 bin is in your windows path, it seems you should try typing "m2 -v" instead of "maven -v".



Dave "The Gerb" wrote:

Many thanks to Daniel Or and Mykel Alvis. Both of you guys hit the nail on
the head! It was the spaces in the path.


Though I still cant just type "maven -v" at the command prompt... I have

to

use the trick shown me by Patrick Roumanoff (thanks Pat, been using
computers for many many moons... never knew I could drag drop into command
line!).


But! If I put in "D:\maven-2.0-alpha-1\bin\m2.bat maven -v" I get the
version number.

-----Original Message-----
From: Mykel Alvis [mailto:[EMAIL PROTECTED] Sent: Thursday, April 14, 2005 2:04 PM
To: Maven Users List
Subject: Re: Need of serious help


JAVA_HOME should be set to the root of your JDK distro. In my case, it's
C:\j2sdk1.4.2_06 , but you're using a different JDK and that's OK.

MAVEN_HOME should be set to where maven was installed.  I noted some
issues at one point when I installed maven into a path that had a
space in it.  I solved this by always installing maven into
c:\maven-1.0.2

%MAVEN_HOME%\bin should be put into your PATH

After installing maven, you should check the integrity of your
repository.  If it failed to build for some reason, then you'll need
to follow the directions on the website for initializing your
repository.

Finally, you should be able to open a command prompt and execute
maven -v
and get some version information.


On 4/13/05, Dave The Gerb <[EMAIL PROTECTED]> wrote:


Thank you guys for the rapid responses! Wow!

For the record.... yes, I knew it was command line, yes I had set my
variables (both in 1.0.2 and in 2).

Patrick.. you threw me buddy... Ive messed with computers (yes, command

line


too) since DOS (pre windows). Until today, I never knew I could drag/drop
into it though! Wow!

Ok, onto the important stuff. Once I did that, it says the JAVA_HOME is

set


wrong. But, it IS where Java is installed. Do I point it to the

jdk1.5.0_02


folder or the jdk1.5.0_02\bin? I have it set to jdk1.5.0_02 folder only.

Will be trying jdk1.5.0_02\bin while waiting for responses. Thank you all!

Dave

-----Original Message-----
From: Patrick Roumanoff [mailto:[EMAIL PROTECTED]
Sent: Wednesday, April 13, 2005 7:57 PM
To: Maven Users List
Subject: RE: Need of serious help

run the maven.bat command from the command line
then you'll be able to see the message.

to achieve that follow the instructions:

click on the start menu then choose "Run..."
enter "cmd" and click OK
The black box is called "The Command Line"
drag an drop from Explorer to "The Command Line" the maven.bat script
be sure to click again in "The Command Line" box to give it the focus
then hit enter -->> maven is running

cheers,

Patrick



-----Original Message-----
From: Dave "The Gerb" [mailto:[EMAIL PROTECTED]
Sent: Thursday, 14 April 2005 09:26
To: 'Maven Users List'
Subject: Need of serious help



Big newbie here gang.

I tried to get Maven 1.0.2 to run on here (here = win2000)
but never to any
avail. First, Id click on maven.bat and a dos window would
pop up and close
so fast could never read any messages. After some website
reading (further),
tweaking, variable editing it would at least stay up long
enough to see the
maven logo and a bunch of other loading stuff before it would vanish.

I finally gave up and hoped for a new version since no one
else seemed to
have the same problem (according to the mailing list).

The new version arrived! Yea! But Im back to where it comes
and goes faster
than I can read.

I don't know maven, I don't know java but I am very
interested in java and
need maven in order to run something else I need (which by
now I cant even
recall what that was.... I just know I need maven first).

Anyone who is EXTREMELY patient? I need help.

Dave


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



NOTICE This e-mail and any attachments are confidential and may contain copyright material of Macquarie Bank or third parties. If you are not the intended recipient of this email you should not read, print, re-transmit, store or act in reliance on this e-mail or any attachments, and should destroy all copies of them. Macquarie Bank does not guarantee the integrity of any emails or any attached files. The views or opinions expressed are the author's own and may not reflect the views or opinions of Macquarie Bank.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

--
No virus found in this incoming message.
Checked by AVG Anti-Virus.
Version: 7.0.308 / Virus Database: 266.9.7 - Release Date: 4/12/2005


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to