You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Adam Perry-Pelletier <ad...@moesol.com> on 2005/07/09 02:19:53 UTC
Setting code compliance in maven.
Hi,
I'm porting our first ant script to Maven. When doing a simple maven
java:compile I get tons of:
java:97: cannot resolve symbol
symbol : method assert (boolean)
compile errors as our code uses the assert() method. This is fixed by
passing in "-source 1.4" to javac or setting some configs in eclipse. Can
anyone tell me how to do the equivalent in Maven. I've been playing with
<properties>
<maven.compile.compilerargs>-source 1.4</maven.compile.compilerargs>
</properties>
In the <build> section of the project.xml file to no avail. I'm sure this
is simple, but need help getting over this first hurdle.
Thanks in advance,
Adam
Re: Setting code compliance in maven.
Posted by Arik Kfir <ar...@gmail.com>.
Hi Adam,
Try setting the "maven.compile.target=1.4" and
"maven.compile.source=1.4" properties in your 'project.properties' files
- these tell the javac compiler to use 1.4-level bytecode instructions,
including the 'assert' keyword.
hth,
Arik.
Adam Perry-Pelletier wrote:
>Hi,
>
>
>
>I'm porting our first ant script to Maven. When doing a simple maven
>java:compile I get tons of:
>
>
>
>java:97: cannot resolve symbol
>
>symbol : method assert (boolean)
>
>
>
>compile errors as our code uses the assert() method. This is fixed by
>passing in "-source 1.4" to javac or setting some configs in eclipse. Can
>anyone tell me how to do the equivalent in Maven. I've been playing with
>
>
>
> <properties>
>
> <maven.compile.compilerargs>-source 1.4</maven.compile.compilerargs>
>
> </properties>
>
>
>
>In the <build> section of the project.xml file to no avail. I'm sure this
>is simple, but need help getting over this first hurdle.
>
>
>
>Thanks in advance,
>
>Adam
>
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org