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

Hi,

You can remove the JRE 1.2 from your eclipse workspace, and others pre-1.6. m2e take the most adapted JRE that is defined, so it will then take 1.6.


On Tue, Aug 6, 2013 at 1:33 PM, ThorbjÃrn Ravn Andersen <thunderaxiom@xxxxxxxxxxx> wrote:

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


_______________________________________________
m2e-users mailing list
m2e-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/m2e-users




--
Adrien Rivard

PNG image