You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Gabriel Goïc <ga...@gmail.com> on 2013/03/30 18:58:11 UTC
Re: C# compiler / plexus-compiler-csharp
Hilco Wijbenga <hilco.wijbenga <at> gmail.com> writes:
>
> Hi all,
>
> I found the plexus-compiler-csharp in
> http://maven.apache.org/plugins/maven-compiler-plugin/non-javac-compilers.html.
> I'd like to know how to actually use this compiler.
>
> I've got some Java code and some C# code (the latter currently in
> src/main/csharp but I've also tried src/main/cs). I can't get the C#
> code to compile. Mvn -X seems to indicate that the compiler plugin is
> still looking in src/main/java for the C# code.
>
> When I put C# code in src/main/java I get a complaint that "This
> compiler doesn't support in-process compilation.".
>
> How is this supposed to work? Or should I forget about this plugin and
> use an Ant task?
>
> Cheers,
> Hilco
>
This plugin has a "fork" parameter which must be set to true (according to the
source code of the plugin). Try the following:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.0</version>
<configuration>
<compilerId>csharp</compilerId>
<fork>true</fork>
<executable>C:\Windows\Microsoft.NET\Framework64\v4.0.30319\csc.exe</executable>
<outputFileName>myDLL</outputFileName>
</configuration>
<dependencies>
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-compiler-csharp</artifactId>
<version>2.2</version>
</dependency>
</dependencies>
</plugin>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: C# compiler / plexus-compiler-csharp
Posted by Dan Tran <da...@gmail.com>.
wow, a question finally get a response after 4 years :)
On Sat, Mar 30, 2013 at 10:58 AM, Gabriel Goïc <ga...@gmail.com>wrote:
> Hilco Wijbenga <hilco.wijbenga <at> gmail.com> writes:
>
> >
> > Hi all,
> >
> > I found the plexus-compiler-csharp in
> >
> http://maven.apache.org/plugins/maven-compiler-plugin/non-javac-compilers.html
> .
> > I'd like to know how to actually use this compiler.
> >
> > I've got some Java code and some C# code (the latter currently in
> > src/main/csharp but I've also tried src/main/cs). I can't get the C#
> > code to compile. Mvn -X seems to indicate that the compiler plugin is
> > still looking in src/main/java for the C# code.
> >
> > When I put C# code in src/main/java I get a complaint that "This
> > compiler doesn't support in-process compilation.".
> >
> > How is this supposed to work? Or should I forget about this plugin and
> > use an Ant task?
> >
> > Cheers,
> > Hilco
> >
>
>
> This plugin has a "fork" parameter which must be set to true (according to
> the
> source code of the plugin). Try the following:
>
> <plugin>
> <groupId>org.apache.maven.plugins</groupId>
> <artifactId>maven-compiler-plugin</artifactId>
> <version>3.0</version>
> <configuration>
> <compilerId>csharp</compilerId>
> <fork>true</fork>
>
>
> <executable>C:\Windows\Microsoft.NET\Framework64\v4.0.30319\csc.exe</executable>
> <outputFileName>myDLL</outputFileName>
> </configuration>
> <dependencies>
> <dependency>
> <groupId>org.codehaus.plexus</groupId>
> <artifactId>plexus-compiler-csharp</artifactId>
> <version>2.2</version>
> </dependency>
> </dependencies>
> </plugin>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>