Note that there are some explanatory texts on larger screens.

plurals
  1. POCan't get Build Success with Maven and C++ project in Hudson
    primarykey
    data
    text
    <p>I have a project in Hudson that is build with maven. It compiles C++ source code to create a an executable that is used in other parts of the project. It uses the Visual Studio tools, specially one that is causing trouble. When it tries to load the midl program it can't find it. If I log into the server were my Hudson lives and try to run mvn clean install in that particular project I get:</p> <pre><code>D:\Hudson\jobs\{project-name}&gt;mvn clean install . . . [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 1.876s [INFO] Finished at: Mon Jan 14 21:56:18 PST 2013 [INFO] Final Memory: 8M/154M [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.2.1:exec (build-tlb) on project interop: Command execution failed. Cannot run program "midl" (in directory "D:\Hudson\jobs\{project-name}"): CreateProcess error=2, The system cannot find the file specified -&gt; [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException </code></pre> <p>A way to around this is to load the Visual Studio tools:</p> <pre><code>D:\Hudson\jobs\{project-name}&gt;%VS100COMNTOOLS%\vsvars32.bat Setting environment for using Microsoft Visual Studio 2010 x86 tools. </code></pre> <p>After doing that I get a clean build:</p> <pre><code>D:\Hudson\jobs\{project-name}&gt;mvn clean install . . . [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 7.331s [INFO] Finished at: Mon Jan 14 21:59:06 PST 2013 [INFO] Final Memory: 13M/222M [INFO] ------------------------------------------------------------------------ </code></pre> <p>But this does not work when Hudson kicks of an automatic build. I tried to load that bat file (vsvars32.bat) performing:</p> <pre><code>pushd %VS100COMNTOOLS% vsvars32.bat popd </code></pre> <p>before I start the maven process, I know this is working because I see this in the console output:</p> <pre><code>C:\Apps\MicrosoftVisualStudio-10.0\Common7\Tools&gt;vsvars32.bat Setting environment for using Microsoft Visual Studio 2010 x86 tools. </code></pre> <p>but whenever it gets to the point in which midl is actually used I get this output after the BUILD FAILURE:</p> <pre><code>[INFO] o.h.m.e.h.MavenExecutionResultHandler - Build failed with exception(s) [INFO] o.h.m.e.h.MavenExecutionResultHandler - [1] org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.2.1:exec (build-tlb) on project interop: Command execution failed. [DEBUG] Closing connection to remote [ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.2.1:exec (build-tlb) on project interop: Command execution failed. Cannot run program "midl" (in directory "D:\Hudson\jobs\{project-name}"): CreateProcess error=2, The system cannot find the file specified -&gt; [Help 1] </code></pre> <p>I also set the environmental variable pair {VS100COMNTOOLS,C:\Apps\MicrosoftVisualStudio-10.0\Common7\Tools} in the Hudson configuration panel. I do not know what else to do, any help will be apreciated.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload