Spring Tool Suite
  1. Spring Tool Suite
  2. STS-2457

Roo 'perform tests' command fails from STS

    Details

    • Type: Bug Bug
    • Status: Resolved Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.8.1.RELEASE
    • Fix Version/s: None
    • Component/s: ROO
    • Labels:
    • Environment:

      win7 64bit,

      SpringSource Tool Suite
      Version: 2.8.1.RELEASE
      Build Id: 201111221000

      Description

      my configuration is win7 64bit using springsource-tool-suite-2.8.1.RELEASE-e3.7.1-win32-x86_64.
      I recently updated my roo version from spring-roo-1.1.5.RELEASE to spring-roo-1.2.1.RELEASE and followed following steps to update the verion in springsource-tool-suite: windows->preference->spring->roo support and then added the new roo instalation.
      as i was getting an error running the perform tests command in roo 1.1.5 which said "mvn.bat not found".

      now following error comes for perform commands(none of the perform commands work):
      CreateProcess error=2, The system cannot find the file specified

      please suggest any workarounds if possible.

        Activity

        Hide
        Leo Dos Santos (c) added a comment -

        Making a note that this seems to be a known issue with STS and/or Roo: https://jira.springsource.org/browse/ROO-1663

        The workaround is to add Maven to your $PATH as described in this post:
        http://forum.springsource.org/showthread.php?104530-STS-cannot-find-quot-mvn-bat-quot&p=401358#post401358

        Show
        Leo Dos Santos (c) added a comment - Making a note that this seems to be a known issue with STS and/or Roo: https://jira.springsource.org/browse/ROO-1663 The workaround is to add Maven to your $PATH as described in this post: http://forum.springsource.org/showthread.php?104530-STS-cannot-find-quot-mvn-bat-quot&p=401358#post401358
        Hide
        Leo Dos Santos (c) added a comment -

        Mohit were you able to get the workaround working for you?

        Show
        Leo Dos Santos (c) added a comment - Mohit were you able to get the workaround working for you?
        Hide
        Mohit Rodey added a comment - - edited

        Hi leo, Yes I had to re install spring source tool suite. The workarounds listed did not work with STS 64 bit.

        I am now using 32 bit version and all is working well with it. seems to be a problem with 64 bit version.

        Show
        Mohit Rodey added a comment - - edited Hi leo, Yes I had to re install spring source tool suite. The workarounds listed did not work with STS 64 bit. I am now using 32 bit version and all is working well with it. seems to be a problem with 64 bit version.
        Hide
        Laurence Myers added a comment -

        I am also experiencing this issue in Windows 7 64-bit, using sts-2.9.1.RELEASE (x64), spring-roo-1.2.1.RELEASE, apache-maven-3.0.3. I have added the maven path to my PATH environment variable, but to no avail.

        I will try out the 32-bit installer of STS and see if that works.

        Show
        Laurence Myers added a comment - I am also experiencing this issue in Windows 7 64-bit, using sts-2.9.1.RELEASE (x64), spring-roo-1.2.1.RELEASE, apache-maven-3.0.3. I have added the maven path to my PATH environment variable, but to no avail. I will try out the 32-bit installer of STS and see if that works.
        Hide
        Laurence Myers added a comment -

        Using the 32-bit installation on my original workspace did not work. However, creating a new workspace and a new project worked okay. Using the x64 installation on the second workspace worked fine. Creating a third new workspace & project from the x64 version also worked fine.

        This leads me to believe the PATH environment variable has to be modified >BEFORE< you create your workspace, otherwise it doesn't pick up the change for Maven. (Apologies if this is a known limitation of Eclipse's architecture, I was not aware of it)

        Show
        Laurence Myers added a comment - Using the 32-bit installation on my original workspace did not work. However, creating a new workspace and a new project worked okay. Using the x64 installation on the second workspace worked fine. Creating a third new workspace & project from the x64 version also worked fine. This leads me to believe the PATH environment variable has to be modified >BEFORE< you create your workspace, otherwise it doesn't pick up the change for Maven. (Apologies if this is a known limitation of Eclipse's architecture, I was not aware of it)
        Hide
        Munk Fachine added a comment - - edited

        I am having the same issue - Win 7, 64bit STS 2.9.2.RELEASE-e3.7.2. I set the PATH environment variable and created a new workspace but it didn't fix the problem. I'll try the 32 bit version and see how I go.

        Show
        Munk Fachine added a comment - - edited I am having the same issue - Win 7, 64bit STS 2.9.2.RELEASE-e3.7.2. I set the PATH environment variable and created a new workspace but it didn't fix the problem. I'll try the 32 bit version and see how I go.
        Hide
        dracito added a comment - - edited

        Same issue for me: Win7 x64 STS Version: 3.2.0.RELEASE Build Id: 201303060821

        I haven't try 32bit version but initial error on "perform test" command was :

        CreateProcess error=2, The system cannot find the file specified

        Next i modified my PATH and chante PATH env var to add maven bin dir but same error message.

        Then i 've restarded STS and error message change to

        roo> perform test
        The command 'mvn.bat test' did not complete successfully
        ERROR: M2_HOME is set to an invalid directory.
        M2_HOME = "C:\Users\Me\workwspace\MyProject\.."
        Please set the M2_HOME variable in your environment to match the
        location of the Maven installation

        Then i set my env var M2_HOME=C:\springsource\apache-maven-3.0.4
        and restart STS

        Work fine now

        Show
        dracito added a comment - - edited Same issue for me: Win7 x64 STS Version: 3.2.0.RELEASE Build Id: 201303060821 I haven't try 32bit version but initial error on "perform test" command was : CreateProcess error=2, The system cannot find the file specified Next i modified my PATH and chante PATH env var to add maven bin dir but same error message. Then i 've restarded STS and error message change to roo> perform test The command 'mvn.bat test' did not complete successfully ERROR: M2_HOME is set to an invalid directory. M2_HOME = "C:\Users\Me\workwspace\MyProject\.." Please set the M2_HOME variable in your environment to match the location of the Maven installation Then i set my env var M2_HOME=C:\springsource\apache-maven-3.0.4 and restart STS Work fine now
        Hide
        Leo Dos Santos (c) added a comment -

        Closing

        Show
        Leo Dos Santos (c) added a comment - Closing

          People

          • Assignee:
            Leo Dos Santos (c)
            Reporter:
            Mohit Rodey
          • Votes:
            2 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:
              First Response Date: