Maven 1

Autoset MAVEN_HOME on Win32

Details

  • Type: Improvement Improvement
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: None
  • Fix Version/s: 1.1-beta-3
  • Component/s: core
  • Labels:
    None
  • Environment:
    Windows
  • Number of attachments :
    3

Description

I've had this put into ant.bat, now let's put it into maven.bat Here's how to see my patch usefullness:

Run on Windows.
Set JAVA_HOME.
Add maven/bin added to %PATH%.
Do not set MAVEN_HOME.
Type maven -v

Before my patch: ERROR: MAVEN_HOME not found in your environment.
After my patch: maven run proceeds, MAVEN_HOME set to maven/bin/..

P.S. Have got an apache account, atagunov, but not ready to apply other patches, at least right now.

  1. maven.bat.2.diff
    24/Nov/05 7:52 AM
    0.4 kB
    Anton Tagunov
  2. maven.bat.3.diff
    24/Nov/05 7:57 AM
    0.4 kB
    Anton Tagunov
  3. maven.bat.diff
    23/Nov/05 12:08 PM
    0.5 kB
    Anton Tagunov

Activity

Hide
Arnaud Heritier added a comment -

Are you sure it works with all windows versions ?
I didn't remember when variables like %~dp0.. were added.

Show
Arnaud Heritier added a comment - Are you sure it works with all windows versions ? I didn't remember when variables like %~dp0.. were added.
Hide
Anton Tagunov added a comment -

Arnaud, it's a 100% hit. On my way home yesterday I remembered that it won't work on win98.
But it does work on NT.
How about maven.bat.2.diff patch?
Now it's exactly the same logic as for ant.bat.

Show
Anton Tagunov added a comment - Arnaud, it's a 100% hit. On my way home yesterday I remembered that it won't work on win98. But it does work on NT. How about maven.bat.2.diff patch? Now it's exactly the same logic as for ant.bat.
Hide
Anton Tagunov added a comment -

Or to be even on a safer side, could do like mvn.bat does. Now we're bulletproof

Show
Anton Tagunov added a comment - Or to be even on a safer side, could do like mvn.bat does. Now we're bulletproof
Hide
Anton Tagunov added a comment -

C'on, guys!

Just go and apply maven.bat.3.diff!

Show
Anton Tagunov added a comment - C'on, guys! Just go and apply maven.bat.3.diff!
Hide
Arnaud Heritier added a comment -

Applied. Thx.

Show
Arnaud Heritier added a comment - Applied. Thx.

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: