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 Erik Ramfelt <er...@gmail.com> on 2008/06/09 08:23:43 UTC

M2-snapshot repository and tool chains

I followed the guide at
http://incubator.apache.org/nmaven/0.16/features.html and managed to
create a dotnet library. But in order to run tests on the project I
had to add the m2-snapshot repository to the pom, otherwise it did not
find the nunit artifact. Perhaps adding a section to the guide that
the m2-snapshot must be set would be useful for other?
  <repositories>
    <repository>
        <id>m2-snapshot</id>
        <name>Maven2 Snapshot Repository</name>
        <url>http://people.apache.org/repo/m2-snapshot-repository/</url>
        <snapshots>
            <enabled>true</enabled>
        </snapshots>
    </repository>
  </repositories>


Then when I ran the test, I got two "No toolchain found" exceptions in
the consolem, but everything ran fine after that. Is there a problem
with my installation?
[INFO] [dotnet-compiler:test-compile]
[INFO] .NET Vendor: MICROSOFT
org.apache.maven.dotnet.ExecutionException: No toolchain found.
        at org.apache.maven.dotnet.compiler.impl.DotnetCompilerContextImpl.getCompilerExecutableFor(DotnetCompilerContextImpl.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.TestCompilerMojo.execute(TestCompilerMojo.java:156)


regards
//Erik

Re: M2-snapshot repository and tool chains

Posted by Erik Ramfelt <er...@gmail.com>.
On Mon, Jun 9, 2008 at 7:18 PM, Shane Isbell <sh...@gmail.com> wrote:
> Hi Erik,
>
> The 'no toolchains' exception is expected. If the csharp compiler toolchain
> is not found, NMaven will default to csc on the classpath. I'll get the
> documentation updated with the snapshot info.

Ok, thanks for the info.

BTW when you're updating the documentation you might update the title
as it says "Apache NMaven 0.15"

//Erik

>
> Thanks,
> Shane
>
> On Mon, Jun 9, 2008 at 1:23 AM, Erik Ramfelt <er...@gmail.com> wrote:
>>
>> I followed the guide at
>> http://incubator.apache.org/nmaven/0.16/features.html and managed to
>> create a dotnet library. But in order to run tests on the project I
>> had to add the m2-snapshot repository to the pom, otherwise it did not
>> find the nunit artifact. Perhaps adding a section to the guide that
>> the m2-snapshot must be set would be useful for other?
>>  <repositories>
>>    <repository>
>>        <id>m2-snapshot</id>
>>        <name>Maven2 Snapshot Repository</name>
>>        <url>http://people.apache.org/repo/m2-snapshot-repository/</url>
>>        <snapshots>
>>            <enabled>true</enabled>
>>        </snapshots>
>>    </repository>
>>  </repositories>
>>
>>
>> Then when I ran the test, I got two "No toolchain found" exceptions in
>> the consolem, but everything ran fine after that. Is there a problem
>> with my installation?
>> [INFO] [dotnet-compiler:test-compile]
>> [INFO] .NET Vendor: MICROSOFT
>> org.apache.maven.dotnet.ExecutionException: No toolchain found.
>>        at
>> org.apache.maven.dotnet.compiler.impl.DotnetCompilerContextImpl.getCompilerExecutableFor(DotnetCompilerContextImpl.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.TestCompilerMojo.execute(TestCompilerMojo.java:156)
>>
>>
>> regards
>> //Erik
>
>

Re: M2-snapshot repository and tool chains

Posted by Shane Isbell <sh...@gmail.com>.
For anyone implementing class compilers for new languages in 0.16: the
CompilerContext will throw an exception if there isn't a toolchain. It's up
to the ClassCompiler implementation to handle this. One option is to recover
by providing default compiler executable names to run from the command line.

Shane

On Mon, Jun 9, 2008 at 10:18 AM, Shane Isbell <sh...@gmail.com>
wrote:

> Hi Erik,
>
> The 'no toolchains' exception is expected. If the csharp compiler toolchain
> is not found, NMaven will default to csc on the classpath. I'll get the
> documentation updated with the snapshot info.
>
> Thanks,
> Shane
>
>   On Mon, Jun 9, 2008 at 1:23 AM, Erik Ramfelt <er...@gmail.com> wrote:
>
>> I followed the guide at
>> http://incubator.apache.org/nmaven/0.16/features.html and managed to
>> create a dotnet library. But in order to run tests on the project I
>> had to add the m2-snapshot repository to the pom, otherwise it did not
>> find the nunit artifact. Perhaps adding a section to the guide that
>> the m2-snapshot must be set would be useful for other?
>>  <repositories>
>>    <repository>
>>        <id>m2-snapshot</id>
>>        <name>Maven2 Snapshot Repository</name>
>>        <url>http://people.apache.org/repo/m2-snapshot-repository/</url>
>>        <snapshots>
>>            <enabled>true</enabled>
>>        </snapshots>
>>    </repository>
>>  </repositories>
>>
>>
>> Then when I ran the test, I got two "No toolchain found" exceptions in
>> the consolem, but everything ran fine after that. Is there a problem
>> with my installation?
>> [INFO] [dotnet-compiler:test-compile]
>> [INFO] .NET Vendor: MICROSOFT
>> org.apache.maven.dotnet.ExecutionException: No toolchain found.
>>        at
>> org.apache.maven.dotnet.compiler.impl.DotnetCompilerContextImpl.getCompilerExecutableFor(DotnetCompilerContextImpl.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.TestCompilerMojo.execute(TestCompilerMojo.java:156)
>>
>>
>> regards
>> //Erik
>>
>
>

Re: M2-snapshot repository and tool chains

Posted by Shane Isbell <sh...@gmail.com>.
Hi Erik,

The 'no toolchains' exception is expected. If the csharp compiler toolchain
is not found, NMaven will default to csc on the classpath. I'll get the
documentation updated with the snapshot info.

Thanks,
Shane

On Mon, Jun 9, 2008 at 1:23 AM, Erik Ramfelt <er...@gmail.com> wrote:

> I followed the guide at
> http://incubator.apache.org/nmaven/0.16/features.html and managed to
> create a dotnet library. But in order to run tests on the project I
> had to add the m2-snapshot repository to the pom, otherwise it did not
> find the nunit artifact. Perhaps adding a section to the guide that
> the m2-snapshot must be set would be useful for other?
>  <repositories>
>    <repository>
>        <id>m2-snapshot</id>
>        <name>Maven2 Snapshot Repository</name>
>        <url>http://people.apache.org/repo/m2-snapshot-repository/</url>
>        <snapshots>
>            <enabled>true</enabled>
>        </snapshots>
>    </repository>
>  </repositories>
>
>
> Then when I ran the test, I got two "No toolchain found" exceptions in
> the consolem, but everything ran fine after that. Is there a problem
> with my installation?
> [INFO] [dotnet-compiler:test-compile]
> [INFO] .NET Vendor: MICROSOFT
> org.apache.maven.dotnet.ExecutionException: No toolchain found.
>        at
> org.apache.maven.dotnet.compiler.impl.DotnetCompilerContextImpl.getCompilerExecutableFor(DotnetCompilerContextImpl.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.TestCompilerMojo.execute(TestCompilerMojo.java:156)
>
>
> regards
> //Erik
>