Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[m2e-users] m2e 1.4 uses target instead of source when choosing Java Runtime

I have the following snippet in my pom.xml to be able to compile new source into an older byte format.

 

<plugin>

           <groupId>org.apache.maven.plugins</groupId>

           <artifactId>maven-compiler-plugin</artifactId>

           <version>3.1</version>

           <configuration>

                      <source>1.6</source>

                      <target>1.2</target>

                      <debug>true</debug>

                      <compilerId>eclipse</compilerId>

           </configuration>

          

           <dependencies>

                      <dependency>

                                 <groupId>org.codehaus.plexus</groupId>

                                 <artifactId>plexus-compiler-eclipse</artifactId>

                                 <version>2.2</version>

                      </dependency>

           </dependencies>

</plugin>

 

(the eclipse compiler can do this, not the normal javac when running from the command line)

 

Unfortunately the JRE System Library is then set to 1.2 and not 1.6 by m2e.

 

 

I would like it to be set to 1.6 by m2e always (and I am aware that this may lead to accidental use of  classes available in 1.6 but not in 1.2).

 

How would I approach this?

 

Thanks

 

/Thorbjørn Ravn Andersen


Back to the top