You are viewing a plain text version of this content. The canonical link for it is here.
Posted to nmaven-dev@incubator.apache.org by Carlos Sanchez <ca...@carlossanchez.eu> on 2008/09/01 09:01:16 UTC

Re: How do I fix?: ExecutionException: No toolchain found

you'll need a ~/.m2/toolchains.xml with these contents

<?xml version="1.0" encoding="UTF8"?>
<toolchains>
    <toolchain>
       <type>jdk</type>
       <provides>
           <version>1.5</version>
      	   <vendor>sun</vendor>
       </provides>
       <configuration>
          <jdkHome>C:\Program Files\java\jdk1.5.0_10</jdkHome>
       </configuration>
    </toolchain>
    <toolchain>
       <type>jdk</type>
       <provides>
           <version>1.6.0</version>
       </provides>
       <configuration>
          <jdkHome>C:\Program Files\java\jdk1.6.0_06</jdkHome>
       </configuration>
    </toolchain>

     <toolchain>
        <type>dotnet</type>
        <provides>
            <frameworkVersion>2.0</frameworkVersion>
            <vendorVersion>2.0.50727</vendorVersion>
            <vendor>MICROSOFT</vendor>
            <id>.NET Framework 2.0</id>
        </provides>
        <configuration>
            <csharpCompiler>C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\csc.exe</csharpCompiler>
            <nunitConsole>C:\Program Files\NUnit
2.4.8\bin\nunit-console.exe</nunitConsole>
            <installRoot>C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727</installRoot>
            <sdkInstallRoot>C:\Program
Files\Microsoft.NET\SDK\v2.0</sdkInstallRoot>
        </configuration>
    </toolchain>
</toolchains>


On Sat, Aug 30, 2008 at 12:11 AM, James Carpenter
<jc...@yahoo.com> wrote:
> What configuration change do I need to make to avoid the following exception when building the example library project spun by the example library archetype?  I think my SDK is in a non-standard location.  I have made sure to put the SDK and .NET framework in my path but i expect the right configuration in settings.xml will allow me to avoid having to do so.
>
> [INFO] [dotnet-compiler:generate-assembly-info]
> [INFO] NMAVEN-902-000: Generating Assembly Info: Language = C_SHARP
> [INFO] [dotnet-compiler:process-sources]
> [INFO] NMAVEN-904-002: Copying source files: From = C:\workarea\nmaven_example\my-app,  To = C:\workarea\nmaven_example\
> my-app\target\build-sources\main-sources, File Count = 1
> [INFO] [dotnet-compiler:compile]
> [INFO] Could not find dotnet toolchain.
> [INFO] .NET Vendor: MICROSOFT
> org.apache.maven.dotnet.ExecutionException: No toolchain found.
>         at org.apache.maven.dotnet.compiler.impl.DotnetCompilerContextImpl.getCompilerExecutableFor(DotnetCompilerContex
> tImpl.java:142)
>         at org.apache.maven.dotnet.extensions.compiler.CSharpClassCompiler.getCompilerFileName(CSharpClassCompiler.java:
> 200)
>         at org.apache.maven.dotnet.extensions.compiler.CSharpClassCompiler.compile(CSharpClassCompiler.java:182)
>         at org.apache.maven.dotnet.plugin.compiler.CompilerMojo.execute(CompilerMojo.java:194)
>         at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:451)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:558)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:49
> 9)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:478)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.jav
> a:330)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:291)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:142)
>         at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:336)
>         at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:129)
>         at org.apache.maven.cli.MavenCli.main(MavenCli.java:287)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:597)
>         at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
>         at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
>         at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
>         at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
> NMAVEN-040-003: Error Log not set: Will use java.util.logging.Logger
> warning CS1607: Assembly generation -- The version '1.0-SNAPSHOT' specified for the 'product version' is not in the norm
> al 'major.minor.build.revision' format
> target\build-sources\main-sources\Class1.cs(7,18): warning CS1591: Missing XML comment for publicly visible type or memb
> er 'ClassLibrary1.Class1'
> NMAVEN-040-000: Executed command: Commandline = cmd.exe /X /C '"csc /out:C:\workarea\nmaven_example\my-app\target\my-app
> -1.0-SNAPSHOT.dll /target:library /recurse:C:\workarea\nmaven_example\my-app\target\build-sources\** /nologo /warnaserro
> r- /doc:C:\workarea\nmaven_example\my-app\target\comments.xml"', Result = 0