Graham Leggett a écrit :
david delbecq wrote:
What are the best practice when deploying artifact about java version
used for compiling? I read somewhere that the purpose of maven
release process is to make the build "reproductible", but if that
build does not include aimed compiler, we can't assure a "rebuild"
will be fully compatible with previous build, if the java version
changed...
Configure the maven-compiler-plugin to specify the specific java
version you need for that particular build. This will ensure your
future rebuild is repeatable, even with a newer JDK version.
Regards,
Graham
--
Thank you all for all solutions, but my concern is very particular about
"dependencies", when i pickup dependencies on maven repository, how do i
know about it's transititive dependencies java requirement, there
doesn't seems to be anything about it in the pom.xml. So when i pickup,
for example, richfaces, i have absolutely no way to know
1) does it requires a java 1.4, java 5 or java 6 runtime
2) do it's transitive dependency depends on java 1.4, java 5 or java 6
3) in the end, will it run on my java 1.4 server?
It's very frustrating to work 2 weeks porting from maven1 to maven2 and
in the end discover the transitive dependecies brings up java 5
requirement our production server can't cope with :)
Now that mean i either
1) upgrade server (seems resonnable) to java 5
2) go to each classload exception, one at a time, to pickup a wrong java
requirement library, rebuild it on java 1.4 and the publish it in
internal repo, hoping it won't collide with the "official" builded file.
It's a very long process, since the exceptions doe not occur at init
time, but in middle of day work.
Even if i do 1) i have no garantee that none of the jar are build on
java 6, which would be a problem since our prod environnement has,
afaik, absolutely no java 6 jvm available.
Considering Those point, a sideway question too, could it be possible to
ask maven to recompile very dependencies when building a project? Since
sources are published along jar and scm informations is present in
pom.xml, it should be faisible, no?
And another one, could this (information about jvm or even "java
version", be added to jar? using the extension mecanism, in future maven
version?)
Regards,
David Delbecq
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]