[mevenide-user] Source Level for Source and Test

"Ravi Luthra" <[email protected]>
Newsgroups gmane.comp.jakarta.turbine.maven.mevenide.user
Message-ID <[email protected]>
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.