Hi to all Devs,
I have made a setup for a toolchain example but I've found an issue
which i currently don't have good idea to solve.
https://github.com/khmarbaise/maven-toolchain-example
If I ran that everything works so far fine...i will get compiled the
different modules with different JDK's (6, 7, 8) which i have configured
in my toolchains.xml file. Also maven-compiler-plugin shows that it
recognizes the toolchain correctly etc.
But what I have stumbled over is that the entries in the MANIFEST.MF
files for Build-Jdk: ... are only showing the JDK which is used to run
Maven itself instead of the ones used to create the class files in
contradiction to the toolchain configuration...
Ok after looking into the code in maven-archiver I saw the reason for it:
addManifestAttribute( m, entries, "Built-By", System.getProperty(
"user.name" ) );
addManifestAttribute( m, entries, "Build-Jdk", System.getProperty(
"java.version" ) );
I already thought about using Toolchains in Maven-Archiver (or
maven-jar-plugin), but after i thinking about that a little bit longer I
declined that, cause toolchain needed to call a Tool like javac...apart
from the performance overhead it would produce to call javac -version
something to get the correct version of which has been used to compile
the classes etc.
What i could imagine is something like giving some kind of information
from maven-compile-plugin(?) via WhatEver??? to maven-jar-plugin ?
So the question is:
Does someone has a good idea to solve this kind of problem ?
Any hints/tips/ideas are appreciated...
Kind regards
Karl Heinz Marbaise
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]