You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Boda Béla (JIRA)" <ji...@codehaus.org> on 2009/10/28 09:53:27 UTC

[jira] Created: (MNG-4414) "ERROR: M2_HOME is set to an invalid directory" Again ???

"ERROR: M2_HOME is set to an invalid directory" Again ???
---------------------------------------------------------

                 Key: MNG-4414
                 URL: http://jira.codehaus.org/browse/MNG-4414
             Project: Maven 2
          Issue Type: Bug
          Components: Bootstrap & Build
    Affects Versions: 2.2.1, 2.1.0
         Environment: Windows Vista, JDK 1.5.0_11
            Reporter: Boda Béla
         Attachments: mvn210.bat, mvn221.bat, settings.xml

I would like to upgrade from 2.0.9 to 2.2.1, but I face the following problem.

I simply set the M2_HOME variable in the mvn210.bat:
SET M2_HOME=D:\java\maven\apache-maven-2.1.0

I run mvn210.bat and get this error:
"ERROR: M2_HOME is set to an invalid directory"

I attached my configs. This is ordinary i think.

The same configuration is working with 2.0.9.




-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] Commented: (MNG-4414) "ERROR: M2_HOME is set to an invalid directory" Again ???

Posted by "Gajo Csaba (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-4414?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=196515#action_196515 ] 

Gajo Csaba commented on MNG-4414:
---------------------------------

In the mvn210.bat file it says:

SET M2_HOME=D:\java\maven\apache-maven-2.1.0

:checkMBat
if exist "%M2_HOME%\bin\mvn.bat" goto init

echo.
echo ERROR: M2_HOME is set to an invalid directory

-----------

Does the file D:\java\maven\apache-maven-2.1.0\bin\mvn.bat really exists on your system?

> "ERROR: M2_HOME is set to an invalid directory" Again ???
> ---------------------------------------------------------
>
>                 Key: MNG-4414
>                 URL: http://jira.codehaus.org/browse/MNG-4414
>             Project: Maven 2
>          Issue Type: Bug
>          Components: Bootstrap & Build
>    Affects Versions: 2.1.0, 2.2.1
>         Environment: Windows Vista, JDK 1.5.0_11
>            Reporter: Boda Béla
>         Attachments: mvn210.bat, mvn221.bat, settings.xml
>
>
> I would like to upgrade from 2.0.9 to 2.2.1, but I face the following problem.
> I simply set the M2_HOME variable in the mvn210.bat:
> SET M2_HOME=D:\java\maven\apache-maven-2.1.0
> I run mvn210.bat and get this error:
> "ERROR: M2_HOME is set to an invalid directory"
> I attached my configs. This is ordinary i think.
> The same configuration is working with 2.0.9.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] Commented: (MNG-4414) "ERROR: M2_HOME is set to an invalid directory" Again ???

Posted by "Boda Béla (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-4414?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=197787#action_197787 ] 

Boda Béla commented on MNG-4414:
--------------------------------

Yes that was the problem.

But why is it needed?
I simply removed that ckeck, and everything is fine.
I think it is a very bad way of checking if M2_HOME points to the appropriate directory, because I have multiple versions of maven on the PATH, so I have to rename the files, and don't want any redundand mvn.bats.

It would be better to check the lib\maven-2.2.1-uber.jar maybe. That is what metters, doesn't it.

Thanks.

> "ERROR: M2_HOME is set to an invalid directory" Again ???
> ---------------------------------------------------------
>
>                 Key: MNG-4414
>                 URL: http://jira.codehaus.org/browse/MNG-4414
>             Project: Maven 2
>          Issue Type: Bug
>          Components: Bootstrap & Build
>    Affects Versions: 2.1.0, 2.2.1
>         Environment: Windows Vista, JDK 1.5.0_11
>            Reporter: Boda Béla
>            Assignee: Benjamin Bentmann
>         Attachments: mvn210.bat, mvn221.bat, settings.xml
>
>
> I would like to upgrade from 2.0.9 to 2.2.1, but I face the following problem.
> I simply set the M2_HOME variable in the mvn210.bat:
> SET M2_HOME=D:\java\maven\apache-maven-2.1.0
> I run mvn210.bat and get this error:
> "ERROR: M2_HOME is set to an invalid directory"
> I attached my configs. This is ordinary i think.
> The same configuration is working with 2.0.9.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] Closed: (MNG-4414) "ERROR: M2_HOME is set to an invalid directory" Again ???

Posted by "Benjamin Bentmann (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MNG-4414?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Benjamin Bentmann closed MNG-4414.
----------------------------------

    Resolution: Cannot Reproduce
      Assignee: Benjamin Bentmann

I just booted Vista, downloaded Maven 2.1.0, unzipped the archive to {{D:\java\maven}}, replaced {{D:\java\maven\apache-maven-2.1.0\bin\mvn.bat}} with your {{mvn210.bat}}, added {{D:\java\maven\apache-maven-2.1.0\bin}} to my {{PATH}} and executed {{mvn -v}}, works without problems.

So this appears to be a misconfiguration on your side. As already suggested by Gajo Csaba, you might want to make the batch file echo the value of {{%M2_HOME%\bin\mvn.bat}} and see whether this path points at the intended file. Otherwise, you could seek help on the [user mailing list|http://maven.apache.org/mail-lists.html].

> "ERROR: M2_HOME is set to an invalid directory" Again ???
> ---------------------------------------------------------
>
>                 Key: MNG-4414
>                 URL: http://jira.codehaus.org/browse/MNG-4414
>             Project: Maven 2
>          Issue Type: Bug
>          Components: Bootstrap & Build
>    Affects Versions: 2.1.0, 2.2.1
>         Environment: Windows Vista, JDK 1.5.0_11
>            Reporter: Boda Béla
>            Assignee: Benjamin Bentmann
>         Attachments: mvn210.bat, mvn221.bat, settings.xml
>
>
> I would like to upgrade from 2.0.9 to 2.2.1, but I face the following problem.
> I simply set the M2_HOME variable in the mvn210.bat:
> SET M2_HOME=D:\java\maven\apache-maven-2.1.0
> I run mvn210.bat and get this error:
> "ERROR: M2_HOME is set to an invalid directory"
> I attached my configs. This is ordinary i think.
> The same configuration is working with 2.0.9.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] Issue Comment Edited: (MNG-4414) "ERROR: M2_HOME is set to an invalid directory" Again ???

Posted by "Boda Béla (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-4414?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=197787#action_197787 ] 

Boda Béla edited comment on MNG-4414 at 11/10/09 1:14 AM:
----------------------------------------------------------

Yes that was the problem.

But why is it needed?
I simply removed that ckeck, and everything is fine.
I think it is a very bad way of checking if M2_HOME points to the appropriate directory, because I have multiple versions of maven on the PATH, so I have to rename the files, and don't want any redundand mvn.bats.

It would be better to check the lib\maven-2.2.1-uber.jar maybe. That is what metters, isn't it.

Thanks.

      was (Author: bodabela):
    Yes that was the problem.

But why is it needed?
I simply removed that ckeck, and everything is fine.
I think it is a very bad way of checking if M2_HOME points to the appropriate directory, because I have multiple versions of maven on the PATH, so I have to rename the files, and don't want any redundand mvn.bats.

It would be better to check the lib\maven-2.2.1-uber.jar maybe. That is what metters, doesn't it.

Thanks.
  
> "ERROR: M2_HOME is set to an invalid directory" Again ???
> ---------------------------------------------------------
>
>                 Key: MNG-4414
>                 URL: http://jira.codehaus.org/browse/MNG-4414
>             Project: Maven 2
>          Issue Type: Bug
>          Components: Bootstrap & Build
>    Affects Versions: 2.1.0, 2.2.1
>         Environment: Windows Vista, JDK 1.5.0_11
>            Reporter: Boda Béla
>            Assignee: Benjamin Bentmann
>         Attachments: mvn210.bat, mvn221.bat, settings.xml
>
>
> I would like to upgrade from 2.0.9 to 2.2.1, but I face the following problem.
> I simply set the M2_HOME variable in the mvn210.bat:
> SET M2_HOME=D:\java\maven\apache-maven-2.1.0
> I run mvn210.bat and get this error:
> "ERROR: M2_HOME is set to an invalid directory"
> I attached my configs. This is ordinary i think.
> The same configuration is working with 2.0.9.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira