I also had this problem today with jdk 1.4.2_04 complier, but when I added <source>1.4</source> and <target>1.4</target> to the configuration (as below) it worked fine for me. So I can confirm that feature works for me - are you sure maven is using a 1.4 compiler?
Nick Extranet [EMAIL PROTECTED] - 03/10/2005 15:36 Please respond to [email protected] To: users cc: Subject: Re: when compiling with m2 using Java 1.4 on Mac OSX asserts are not being recognised. Could you check which version of java maven is running in? I haven't been able to reproduce your problem. I'm currently running Java 5 on Mac OS X and have used the assert keyword. The only thing I could think of is that you're running maven under jdk1.3, but then I would have expected an 'unknown source/target' error before it even tried to compile your code. So I don't believe the problem lies with Maven. Just a thought: was the assert keyword introduced at version 1.4.2? Might be worth a google. AW On 3 Oct 2005, at 10:49, David Sag wrote: > > Hi M2 people, > > I am evaluating maven 2 and test-porting some small projects over > to m2 from ant and m1. > > I am finding it mostly straightforward but i can't work out how to > tell maven2 that i want to enable asserts. whenever i compile i > just get the error > > cannot resolve symbol > symbol : method assert (boolean) > > I have tried forcing java1.4 in the pom.xml with the following : > > <plugins> > <plugin> > <groupId>org.apache.maven.plugins</groupId> > <artifactId>maven-compiler-plugin</artifactId> > <configuration> > <source>1.4</source> > <target>1.4</target> > </configuration> > </plugin> > </plugins> > > but it made no difference. > > i looked through the issues in jira and found nothing to indicate > that this is a known bug. > > has anyone else hit this and if so how do i work-around it? > > Kind regards, > > Dave Sag > > > > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This message and any attachments (the "message") is intended solely for the addressees and is confidential. If you receive this message in error, please delete it and immediately notify the sender. Any use not in accord with its purpose, any dissemination or disclosure, either whole or partial, is prohibited except formal approval. The internet can not guarantee the integrity of this message. BNP PARIBAS (and its subsidiaries) shall (will) not therefore be liable for the message if modified. ********************************************************************************************** BNP Paribas Private Bank London Branch is authorised by CECEI & AMF and is regulated by the Financial Services Authority for the conduct of its investment business in the United Kingdom. BNP Paribas Securities Services London Branch is authorised by CECEI & AMF and is regulated by the Financial Services Authority for the conduct of its investment business in the United Kingdom. BNP Paribas Fund Services UK Limited is authorised and regulated by the Financial Services Authority. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
