maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stephen Connolly <stephen.alan.conno...@gmail.com>
Subject Re: Multiple JDK Versions
Date Mon, 08 Apr 2013 11:21:08 GMT
The manifest is not generated by JavaC but by the tool used to JAR up the
files. That would be the Maven Jar Plugin which does not fork the build but
actually generates the JAR file using the JRE that you launch Maven with.

It should not matter whether you use Java 1.2 or Java 1.8 to JAR up the
files as the JAR specification has not changed. What should matter to you
is the bytecode version, and there are tools such as AnimalSniffer that can
help you verify that the bytecode version is the version you believe it
should be


On 8 April 2013 11:41, virg g <06virg@gmail.com> wrote:

> Hi,
> I want to compile my code with multiple JDK versions 1.4, 1.5, 1.6. I am
> using maven-compiler-plugin 3.0.
> i am changing <executable>${JAVA_1_5_HOME}/bin/javac</executable> parameter
> in maven-compiler-plugin and also set source and target to 1.5. But my
> default JAVA_HOME is 1.6. The source is getting compiled with 1.5 java
> compiler. But if the  the manifest file version always shows Build-Jdk: as
> 1.6. It is picking from my JAVA_HOME, Not the the javac version it is
> built. I have tried same thing even with maven-toolchains-plugin  plugin
> also by setting all jdk paths. How to change manifest  info to point to
> correct jdk? Do i have to reset JAVA_HOME everytime if i change jdk?
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message