4 Replies Latest reply on Dec 12, 2010 10:17 PM by igarashitm

    Error building from trunk: Cannot run program "mvn"

    mjustin

      Hello,


      using Windows Vista,

      after updating from http://anonsvn.jboss.org/repos/hornetq/trunk and

      running build distro,

      the build fails with the message


      C:\Users\mj\Desktop\Development\HornetQ-2.1\build-maven.xml:152: Execute failed:
        java.io.IOException: Cannot run program "mvn": CreateProcess error=2


      The tools/maven/bin directory is present and contains the mvn binaries. I also have my local Maven directory in the system path, so mvn on command line shows that Maven is available unless the Path environment variable gets lost (cleared).

       

      Is there something I can check regarding the configuration?


      --

      Michael Justin



      C:\Users\mj\Desktop\Development\HornetQ-2.1>call build distro
      Build script found javac.
      Using the following ant version from tools\ant:
      calling tools\ant\bin\ant.bat -version
      Apache Ant version 1.7.1 compiled on June 27 2008
      calling tools\ant\bin\ant.bat distro -Dhornetq.run_script=true
      Buildfile: build.xml

       

      check.inhibit.downloads:

       

      createthirdparty:

       

      bin-distro:

       

      check.inhibit.downloads:

       

      createthirdparty:

       

      init:

       

      compile-core:
           [echo] setting netty version 3.2.1.Final-r2319
           [copy] Copying 1 file to C:\Users\mj\Desktop\Development\HornetQ-2.1\build\
      classes\core

       

      jar-core:
            [jar] Building jar: C:\Users\mj\Desktop\Development\HornetQ-2.1\build\jars
      \hornetq-core.jar

       

      jar-core-client:
            [jar] Building jar: C:\Users\mj\Desktop\Development\HornetQ-2.1\build\jars
      \hornetq-core-client.jar

       

      compile-core-client-java5:
           [echo] setting netty version 3.2.1.Final-r2319
           [copy] Copying 1 file to C:\Users\mj\Desktop\Development\HornetQ-2.1\build\
      classes\core-client-java5

       

      jar-core-client-java5:
            [jar] Building jar: C:\Users\mj\Desktop\Development\HornetQ-2.1\build\jars
      \hornetq-core-client-java5.jar

       

      compile-jms:

       

      jar-jms:

       

      jar-jms-client:

       

      compile-jms-java5:

       

      jar-jms-client-java5:

       

      compile-jboss-integration:

       

      jar-jboss-integration:

       

      compile-jboss-service:

       

      jar-jboss-service:

       

      compile-bootstrap:

       

      jar-bootstrap:

       

      compile-logging:

       

      jar-logging:

       

      compile-ra:

       

      jar-ra:
            [jar] Building jar: C:\Users\mj\Desktop\Development\HornetQ-2.1\build\jars
      \hornetq-ra.rar

       

      jar-mc:

       

      jar-jnp-client:

       

      jar-resources:

       

      jar-core-sources:

       

      jar-core-client-sources:

       

      jar-core-client-java5-sources:

       

      jar-jms-sources:

       

      jar-jms-client-sources:

       

      jar-jms-client-java5-sources:

       

      jar-jboss-integration-sources:

       

      jar-jboss-service-sources:

       

      jar-bootstrap-sources:

       

      jar-logging-sources:

       

      jar-ra-sources:

       

      jar-resources-sources:

       

      jar-twitter-integration-sources:

       

      jar-spring-integration-sources:

       

      sources-jar:

       

      compile-twitter-integration:

       

      jar-twitter-integration:

       

      compile-spring-integration:

       

      jar-spring-integration:

       

      jar-rest-init:

       

      upload-local-target:

       

      BUILD FAILED
      C:\Users\mj\Desktop\Development\HornetQ-2.1\build.xml:211: The following error o
      ccurred while executing this line:
      C:\Users\mj\Desktop\Development\HornetQ-2.1\build-hornetq.xml:1180: The followin
      g error occurred while executing this line:
      C:\Users\mj\Desktop\Development\HornetQ-2.1\build-maven.xml:152: Execute failed:
      java.io.IOException: Cannot run program "mvn": CreateProcess error=2, Das Syste
      m kann die angegebene Datei nicht finden


        • 1. Re: Error building from trunk: Cannot run program "mvn"
          ataylor

          actually, I noticed this issue friday and it needs to be fixed. will look at it monday, for now try installing maven or setting your path to incluse the shipped version vial the build script

          • 2. Re: Error building from trunk: Cannot run program "mvn"
            igarashitm

            I got same messages on windows7, but simply changing executable attribute of Ant exec task from "mvn" to "mvn.bat" worked for me.

             

            HornetQ-2.0.0 tree still can be built without above workaround. something happen with Ant exec task on trunk ?

            • 3. Re: Error building from trunk: Cannot run program "mvn"
              romney

              I had the same issue and changed from "mvn" to "mvn.bat". It worked. However, now I am getting the following error:

               

                   [java] [INFO] ------------------------------------------------------------------------
                   [java] [INFO] Building HornetQ REST Interface Implementation
                   [java] [INFO]    task-segment: [install]
                   [java] [INFO] ------------------------------------------------------------------------
                   [java] [INFO] [resources:resources {execution: default-resources}]
                   [java] [WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent!
                   [java] [INFO] skip non existing resourceDirectory C:\dev\hornetq\hornetq-rest\hornetq-rest\src\main\resources
                   [java] [INFO] Unable to find resource 'org.hornetq:hornetq-core:pom:2.2.0.CR1' in repository jboss (http://repository.jboss.org/nexus/content/groups/public/)
                   [java] [INFO] Unable to find resource 'org.hornetq:hornetq-core:pom:2.2.0.CR1' in repository central (http://repo1.maven.org/maven2)
                   [java] [INFO] Unable to find resource 'org.hornetq:hornetq-jms:pom:2.2.0.CR1' in repository jboss (http://repository.jboss.org/nexus/content/groups/public/)
                   [java] [INFO] Unable to find resource 'org.hornetq:hornetq-jms:pom:2.2.0.CR1' in repository central (http://repo1.maven.org/maven2)
                   [java] [INFO] Unable to find resource 'org.hornetq:hornetq-core:jar:2.2.0.CR1' in repository jboss (http://repository.jboss.org/nexus/content/groups/public/)
                   [java] [INFO] Unable to find resource 'org.hornetq:hornetq-core:jar:2.2.0.CR1' in repository central (http://repo1.maven.org/maven2)
                   [java] [INFO] Unable to find resource 'org.hornetq:hornetq-jms:jar:2.2.0.CR1' in repository jboss (http://repository.jboss.org/nexus/content/groups/public/)
                   [java] [INFO] Unable to find resource 'org.hornetq:hornetq-jms:jar:2.2.0.CR1' in repository central (http://repo1.maven.org/maven2)
                   [java] [INFO] ------------------------------------------------------------------------
                   [java] [ERROR] BUILD ERROR
                   [java] [INFO] ------------------------------------------------------------------------
                   [java] [INFO] Failed to resolve artifact.
                   [java]
                   [java] Missing:
                   [java] ----------
                   [java] 1) org.hornetq:hornetq-core:jar:2.2.0.CR1
                   [java]
                   [java]   Try downloading the file manually from the project website.
                   [java]
                   [java]   Then, install it using the command:
                   [java]       mvn install:install-file -DgroupId=org.hornetq -DartifactId=hornetq-core -Dversion=2.2.0.CR1 -Dpackaging=jar -Dfile=/path/to/file
                   [java]
                   [java]   Alternatively, if you host your own repository you can deploy the file there:
                   [java]       mvn deploy:deploy-file -DgroupId=org.hornetq -DartifactId=hornetq-core -Dversion=2.2.0.CR1 -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]
                   [java]
                   [java]   Path to dependency:
                   [java]        1) org.hornetq.rest:hornetq-rest:jar:2.2.0.CR1
                   [java]        2) org.hornetq:hornetq-core:jar:2.2.0.CR1
                   [java]
                   [java] 2) org.hornetq:hornetq-jms:jar:2.2.0.CR1
                   [java]
                   [java]   Try downloading the file manually from the project website.
                   [java]
                   [java]   Then, install it using the command:
                   [java]       mvn install:install-file -DgroupId=org.hornetq -DartifactId=hornetq-jms -Dversion=2.2.0.CR1 -Dpackaging=jar -Dfile=/path/to/file
                   [java]
                   [java]   Alternatively, if you host your own repository you can deploy the file there:
                   [java]       mvn deploy:deploy-file -DgroupId=org.hornetq -DartifactId=hornetq-jms -Dversion=2.2.0.CR1 -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]
                   [java]
                   [java]   Path to dependency:
                   [java]        1) org.hornetq.rest:hornetq-rest:jar:2.2.0.CR1
                   [java]        2) org.hornetq:hornetq-jms:jar:2.2.0.CR1
                   [java]
                   [java] ----------
                   [java] 2 required artifacts are missing.
                   [java]
                   [java] for artifact:
                   [java]   org.hornetq.rest:hornetq-rest:jar:2.2.0.CR1
                   [java]
                   [java] from the specified remote repositories:
                   [java]   central (http://repo1.maven.org/maven2),
                   [java]
                   [java]
                   [java]
                   [java] [INFO] ------------------------------------------------------------------------
                   [java] [INFO] For more information, run Maven with the -e switch
                   [java] [INFO] ------------------------------------------------------------------------
                   [java] [INFO] Total time: 9 seconds
                   [java] [INFO] Finished at: Sun Dec 12 18:23:57 CET 2010
                   [java] [INFO] Final Memory: 14M/34M
                   [java] [INFO] ------------------------------------------------------------------------
              Done

                   [java] [INFO] ------------------------------------------------------------------------

                   [java] [INFO] Building HornetQ REST Interface Implementation

                   [java] [INFO]    task-segment: [install]

                   [java] [INFO] ------------------------------------------------------------------------

              ...

               

              (http://repository.jboss.org/nexus/content/groups/public/)

                   [java] Downloading: http://repo1.maven.org/maven2/org/hornetq/hornetq-core/2.2.0.CR1/hornetq-core-2.2.0.CR1.jar

                   [java] [INFO] Unable to find resource 'org.hornetq:hornetq-core:jar:2.2.0.CR1' in repository central (http://repo1.maven.org/maven2)

                   [java] Downloading: http://repository.jboss.org/nexus/content/groups/public//org/hornetq/hornetq-jms/2.2.0.CR1/hornetq-jms-2.2.0.CR1.jar

                   [java] [INFO] Unable to find resource 'org.hornetq:hornetq-jms:jar:2.2.0.CR1' in repository jboss (http://repository.jboss.org/nexus/content/groups/public/)

                   [java] Downloading: http://repo1.maven.org/maven2/org/hornetq/hornetq-jms/2.2.0.CR1/hornetq-jms-2.2.0.CR1.jar

                   [java] [INFO] Unable to find resource 'org.hornetq:hornetq-jms:jar:2.2.0.CR1' in repository central (http://repo1.maven.org/maven2)

                   [java] [INFO] ------------------------------------------------------------------------

                   [java] [ERROR] BUILD ERROR

                   [java] [INFO] ------------------------------------------------------------------------

                   [java] [INFO] Failed to resolve artifact.

                   [java]

                   [java] Missing:

                   [java] ----------

                   [java] 1) org.hornetq:hornetq-core:jar:2.2.0.CR1

                   [java]

                   [java]   Try downloading the file manually from the project website.

                   [java]

                   [java]   Then, install it using the command:

                   [java]       mvn install:install-file -DgroupId=org.hornetq -DartifactId=hornetq-core -Dversion=2.2.0.CR1 -Dpackaging=jar -Dfile=/path/to/file

                   [java]

                   [java]   Alternatively, if you host your own repository you can deploy the file there:

                   [java]       mvn deploy:deploy-file -DgroupId=org.hornetq -DartifactId=hornetq-core -Dversion=2.2.0.CR1 -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]

                   [java]

                   [java]   Path to dependency:

                   [java]   1) org.hornetq.rest:hornetq-rest:jar:2.2.0.CR1

                   [java]   2) org.hornetq:hornetq-core:jar:2.2.0.CR1

                   [java]

                   [java] 2) org.hornetq:hornetq-jms:jar:2.2.0.CR1

                   [java]

                   [java]   Try downloading the file manually from the project website.

                   [java]

                   [java]   Then, install it using the command:

                   [java]       mvn install:install-file -DgroupId=org.hornetq -DartifactId=hornetq-jms -Dversion=2.2.0.CR1 -Dpackaging=jar -Dfile=/path/to/file

                   [java]

                   [java]   Alternatively, if you host your own repository you can deploy the file there:

                   [java]       mvn deploy:deploy-file -DgroupId=org.hornetq -DartifactId=hornetq-jms -Dversion=2.2.0.CR1 -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]

                   [java]

                   [java]   Path to dependency:

                   [java]   1) org.hornetq.rest:hornetq-rest:jar:2.2.0.CR1

                   [java]   2) org.hornetq:hornetq-jms:jar:2.2.0.CR1

                   [java]

                   [java] ----------

                   [java] 2 required artifacts are missing.

                   [java]

                   [java] for artifact:

                   [java]   org.hornetq.rest:hornetq-rest:jar:2.2.0.CR1

                   [java]

                   [java] from the specified remote repositories:

                   [java]   central (http://repo1.maven.org/maven2),

                   [java]   jboss (http://repository.jboss.org/nexus/content/groups/public/)

                   [java]

                   [java]

                   [java]

                   [java] [INFO] ------------------------------------------------------------------------

                   [java] [INFO] For more information, run Maven with the -e switch

                   [java] [INFO] ------------------------------------------------------------------------

                   [java] [INFO] Total time: 9 seconds

                   [java] [INFO] Finished at: Sun Dec 12 18:23:57 CET 2010

                   [java] [INFO] Final Memory: 14M/34M

                   [java] [INFO] ------------------------------------------------------------------------

              Done

               

              Can anyone help out?

               

              /Romney

              • 4. Re: Error building from trunk: Cannot run program "mvn"
                igarashitm

                The artifacts aren't yet really exists on repository now. So you may need to do mvn install as maven mentions in the error messages. The files you need will be in build/jars directory if your build is fine.