Uploaded image for project: 'Tools (JBoss Tools)'
  1. Tools (JBoss Tools)
  2. JBIDE-23018

Offline script cannot find mvn command on windows

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • 4.30.x
    • 4.4.1.AM3
    • project-examples
    • None

      The groovy cannot find mvn command, even if the command is set in PATH system variable on windows.

      C:\test_offline>groovy -Dgrape.config="C:\Users\jboss-qa\devstudio_B5760_new\workspace\.metadata\.plugins\org.jboss.tools.project.examples\offline\jbossToolsGrapeConfig_3.1.1.v20160812_0234.xml" "C:\Users\jboss-qa\devstudio_B5760_new\workspace\.metadata\.plugins\org.jboss.tools.project.examples\offline\go_offline_3.1.1.v20160812_0234.groovy" http://download.jboss.org/jbosstools/examples/4/4/project-examples-category-devstudio.xml http://download.jboss.org/jbosstools/examples/4/4/project-examples-devstudio.xml http://download.jboss.org/jbosstools/examples/4/4/project-examples-shared.xml http://download.jboss.org/gatein/quickstarts/jboss-portal-6.2/project-examples-jboss-portal6.2-jbds8.0-001.xml -u "http://dcp2.jboss.org/v2/rest/search?size=500\u0026content_provider=jboss-developer\u0026content_provider=rht\u0026field=target_product\u0026field=github_repo_url\u0026field=sys_description\u0026field=sys_title\u0026field=sys_tags\u0026field=sys_type\u0026field=experimental\u0026field=git_download\u0026field=prerequisites\u0026field=quickstart_id\u0026field=git_tag\u0026field=git_commit\u0026sys_type=quickstart" -q -e
      Quiet mode : true
      Descriptors : [http://download.jboss.org/jbosstools/examples/4/4/project-examples-category-devstudio.xml, http://download.jboss.org/jbosstools/examples/4/4/project-examples-devstudio.xml, http://download.jboss.org/jbosstools/examples/4/4/project-examples-shared.xml, http://download.jboss.org/gatein/quickstarts/jboss-portal-6.2/project-examples-jboss-portal6.2-jbds8.0-001.xml]
      creating offline\.jbosstools\cache
      parsing http://download.jboss.org/jbosstools/examples/4/4/project-examples-category-devstudio.xml
      parsing http://download.jboss.org/jbosstools/examples/4/4/project-examples-devstudio.xml
          [unzip] Expanding: C:\test_offline\offline\.jbosstools\cache\jbosstools\examples\contacts-mobile-basic\0.0.2\contacts-mobile.zip into C:\test_offline\offline\workDir\contacts-mobile.zip
      parsing http://download.jboss.org/jbosstools/examples/4/4/project-examples-shared.xml
      parsing http://download.jboss.org/gatein/quickstarts/jboss-portal-6.2/project-examples-jboss-portal6.2-jbds8.0-001.xml
          [unzip]     [unzip] Expanding: C:\test_offline\offline\.jbosstools\cache\gatein\quickstarts\jpp-6.1\cdi-generic-portlet.zip into C:\test_offline\offline\workDir\cdi-generic-portlet.zip
          [unzip] Expanding: C:\test_offline\offline\.jbosstools\cache\gatein\quickstarts\jpp-6.1\simplest-hello-world-portlet.zip into C:\test_offline\offline\workDir\simplest-hello-world-portlet.zip
          [unzip]     [unzip] Expanding: C:\test_offline\offline\.jbosstools\cache\gatein\quickstarts\jpp-6.1\jsf2-rf4-hello-world-portlet.zip into C:\test_offline\offline\workDir\jsf2-rf4-hello-world-portlet.zip
          [unzip] Expanding: C:\test_offline\offline\.jbosstools\cache\gatein\quickstarts\jpp-6.1\navigation-api-portlet.zip into C:\test_offline\offline\workDir\navigation-api-portlet.zip
          [unzip] Expanding: C:\test_offline\offline\.jbosstools\cache\gatein\quickstarts\jpp-6.1\cdi-jsf-portlet.zip into C:\test_offline\offline\workDir\cdi-jsf-portlet.zip
          [unzip] Expanding: C:\test_offline\offline\.jbosstools\cache\gatein\quickstarts\jpp-6.1\jsf2-hello-world-portlet.zip into C:\test_offline\offline\workDir\jsf2-hello-world-portlet.zip
          [unzip] Expanding: C:\test_offline\offline\.jbosstools\cache\gatein\quickstarts\jpp-6.1\social-portlets.zip into C:\test_offline\offline\workDir\social-portlets.zip
          [unzip] Expanding: C:\test_offline\offline\.jbosstools\cache\gatein\quickstarts\jpp-6.1\cdi-scopes-portlet.zip into C:\test_offline\offline\workDir\cdi-scopes-portlet.zip
      : Execute failed: java.io.IOException: Cannot run program "mvn" (in directory "C:\test_offline\offline\workDir\7.0.0.GA.zip\thread-racing"): CreateProcess error=2, The system cannot find the file specified
              at org.apache.tools.ant.taskdefs.ExecTask.runExec(ExecTask.java:672)
              at org.apache.tools.ant.taskdefs.ExecTask.execute(ExecTask.java:495)
              at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
              at java.lang.reflect.Method.invoke(Method.java:498)
              at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
              at groovy.util.AntBuilder.performTask(AntBuilder.java:327)
              at groovy.util.AntBuilder.nodeCompleted(AntBuilder.java:272)
              at groovy.util.BuilderSupport.doInvokeMethod(BuilderSupport.java:154)
              at groovy.util.AntBuilder.doInvokeMethod(AntBuilder.java:207)
              at groovy.util.BuilderSupport.invokeMethod(BuilderSupport.java:67)
              at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.call(PogoMetaClassSite.java:48)
              at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
              at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113)
              at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:133)
              at GoOfflineScript.addMavenWrapper(go_offline_3.1.1.v20160812_0234.groovy:523)
              at GoOfflineScript$addMavenWrapper$1.callCurrent(Unknown Source)
              at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:52)
              at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:154)
              at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:174)
              at GoOfflineScript.execMavenGoOffline(go_offline_3.1.1.v20160812_0234.groovy:379)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
              at java.lang.reflect.Method.invoke(Method.java:498)
              at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93)
              at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
              at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:384)
              at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1021)
              at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.callCurrent(PogoMetaClassSite.java:69)
              at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:52)
              at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:154)
              at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:174)
              at GoOfflineScript$_buildUnzippedExamples_closure5.doCall(go_offline_3.1.1.v20160812_0234.groovy:247)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
              at java.lang.reflect.Method.invoke(Method.java:498)
              at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93)
              at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
              at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:294)
              at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1021)
              at groovy.lang.Closure.call(Closure.java:426)
              at groovy.lang.Closure.call(Closure.java:442)
              at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:2030)
              at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:2015)
              at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:2056)
              at org.codehaus.groovy.runtime.dgm$162.invoke(Unknown Source)
              at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite$PojoMetaMethodSiteNoUnwrapNoCoerce.invoke(PojoMetaMethodSite.java:274)
              at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.call(PojoMetaMethodSite.java:56)
              at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
              at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113)
              at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:125)
              at GoOfflineScript.buildUnzippedExamples(go_offline_3.1.1.v20160812_0234.groovy:246)
              at GoOfflineScript$buildUnzippedExamples$0.callCurrent(Unknown Source)
              at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:52)
              at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:154)
              at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:174)
              at GoOfflineScript.goOffline(go_offline_3.1.1.v20160812_0234.groovy:158)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
              at java.lang.reflect.Method.invoke(Method.java:498)
              at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite$PogoCachedMethodSite.invoke(PogoMetaMethodSite.java:169)
              at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite.call(PogoMetaMethodSite.java:71)
              at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
              at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113)
              at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:117)
              at GoOfflineScript.main(go_offline_3.1.1.v20160812_0234.groovy:113)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
              at java.lang.reflect.Method.invoke(Method.java:498)
              at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93)
              at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
              at groovy.lang.MetaClassImpl.invokeStaticMethod(MetaClassImpl.java:1445)
              at org.codehaus.groovy.runtime.InvokerHelper.invokeMethod(InvokerHelper.java:897)
              at groovy.lang.GroovyShell.runScriptOrMainOrTestOrRunnable(GroovyShell.java:287)
              at groovy.lang.GroovyShell.run(GroovyShell.java:518)
              at groovy.lang.GroovyShell.run(GroovyShell.java:507)
              at groovy.ui.GroovyMain.processOnce(GroovyMain.java:652)
              at groovy.ui.GroovyMain.run(GroovyMain.java:384)
              at groovy.ui.GroovyMain.process(GroovyMain.java:370)
              at groovy.ui.GroovyMain.processArgs(GroovyMain.java:129)
              at groovy.ui.GroovyMain.main(GroovyMain.java:109)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
              at java.lang.reflect.Method.invoke(Method.java:498)
              at org.codehaus.groovy.tools.GroovyStarter.rootLoader(GroovyStarter.java:109)
              at org.codehaus.groovy.tools.GroovyStarter.main(GroovyStarter.java:131)
      Caused by: java.io.IOException: Cannot run program "mvn" (in directory "C:\test_offline\offline\workDir\7.0.0.GA.zip\thread-racing"): CreateProcess error=2, The system cannot find the file specified
              at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048)
              at java.lang.Runtime.exec(Runtime.java:620)
              at org.apache.tools.ant.taskdefs.launcher.Java13CommandLauncher.exec(Java13CommandLauncher.java:58)
              at org.apache.tools.ant.taskdefs.Execute.launch(Execute.java:428)
              at org.apache.tools.ant.taskdefs.Execute.execute(Execute.java:442)
              at org.apache.tools.ant.taskdefs.ExecTask.runExecute(ExecTask.java:628)
              at org.apache.tools.ant.taskdefs.ExecTask.runExec(ExecTask.java:669)
              ... 92 more
      Caused by: java.io.IOException: CreateProcess error=2, The system cannot find the file specified
              at java.lang.ProcessImpl.create(Native Method)
              at java.lang.ProcessImpl.<init>(ProcessImpl.java:386)
              at java.lang.ProcessImpl.start(ProcessImpl.java:137)
              at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)
              ... 98 more
      Script executed in 0 min, 2 sec with 1 error(s)
      Caught: ScriptProblems: Some build errors occured
      ScriptProblems: Errors:
              Error running the script
               Details:
              Error running the script
              Execute failed: java.io.IOException: Cannot run program "mvn" (in directory "C:\test_offline\offline\workDir\7.0.0.GA.zip\thread-racing"): CreateProcess error=2, The system cannot find the file specified
      

      (This could help(very similar issue): http://stackoverflow.com/questions/29757511/mvn-command-not-recognized-on-jenkins-windows-slave-node )

            Unassigned Unassigned
            jkopriva@redhat.com Josef Kopriva
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: