Re: [mevenide-user] Source Level for Source and Test
"Milos Kleint" <[email protected]>
| Newsgroups | gmane.comp.jakarta.turbine.maven.mevenide.user |
|---|---|
| Message-ID | <[email protected]> |
Hello, I recall someone already asked the question before. From what I remember, it doesn't work because it's not implemented in mevenide sourcebase. I've probably promised to fix it, but forgotten about it. I've taken a look now, and it seems as a pretty safe and straightforward to implement. I've added it to the trunk, you can try to install binaries at http://deadlock.netbeans.org/hudson/job/mevenide/ to check it. Please let me know if it works for you. I still need to decide if I want to put it not the 6.0 final binaries or not. Regards Milos On 11/14/07, Ravi Luthra <[email protected]> wrote: > > Hi, > > I'm curious if there is a way to set the test source level 1.5 and the > source level to 1.4? > Currently I have a parent pom that uses a simple properties > sourceLevel and testSourceLevel to configure the > maven-compiler-plugin. > > Based on some Google searches I found the following recommendation to > make Maven compile the source in 1.4 rules, and the tests using Java > 1.5 rules (generics, enums, etc): > > <build> > <plugins> > <plugin> > <groupId>org.apache.maven.plugins</groupId> > <artifactId>maven-compiler-plugin</artifactId> > <configuration> > > <compilerVersion>${sourceLevel}</compilerVersion> > <source>${sourceLevel}</source> > <target>${sourceLevel}</target> > </configuration> > <executions> > <execution> > <id>compile-tests</id> > > <phase>process-test-sources</phase> > <goals> > <goal>testCompile</goal> > </goals> > <configuration> > > <source>${testSourceLevel}</source> > > <target>${testSourceLevel}</target> > </configuration> > </execution> > </executions> > </plugin> > </plugins> > </build> > And in each child I have: > <properties> > <sourceLevel>1.4</sourceLevel> > <testSourceLevel>1.5</testSourceLevel> > </properties> > > > However the Mevenide projects are still marked up with red lines when > a test source file is open in the editor. I don't know if this is a > Netbeans limitation (Using today's RC1), or if there's something I can > do in my poms to let Mevenide enable source 1.5 for test sources, and > 1.4 for non-tests. > > Ravi > > --------------------------------------------------------------------- > To unsubscribe from this list please visit: > > http://xircles.codehaus.org/manage_email > >