Currently webservice is still being compiled even if 1.4 jdk is used. I'm assuming you wish to change that so that it will only be compiled with a 1.5 compiler. Is that correct?
Setting the properties up in that fashion should be doable.
I've opened a jira issue:
I doubt the webservices module is being compiled with jdk4.
My objective behind this thread is that there should be a standardized mechanism in the build script for modules to take advantage of jdk version based build.
Today, when jboss is built with jdk4, there should be no jbossws.sar deployed into the deploy directory.
The old axis based stack is being compiled in head for 1.4 compatibility. Whenever we require 1.5 in head we will drop the old stack.
What Anil is looking for is just a more consistent way to setup a module such that jdk5 source and artifacts are not produced when compiled with non-jdk5.
This most likely further complicates the maven2 experiment, and also brings up the outstanding retroweave like functionality:
Even if we get to a retroweave type of capability, there still may be jdk5+ features that are used that cannot be retroweaved. Since retroweaving is really an artifact post processing step, this also brings up this "Jar canonicalization and dependency isolation" issue:
I have not caught up with the current maven2 investigation, but how does this post processing of artifacts fit?
The JDK 1.4 vs JDK 1.5 compilation/deployment is one which we have been on a lookout for during the evaluations. The next iteration of the Maven evaluation already has this defined as a task. Maven has the notion of activities based off of jdk version already built in, so I am not anticipating any severe issues here.
As it stands now, the current use case needs to be as follows.
1) ability to compile modules only if jdk 1.5 is used (ejb3, ejb3x, webservice?)
2) ability to compile a default source set in addition to a source set to be compiled if 1.5 jdk is used (aop)
3) ability to create and deploy artifacts based upon jdk version (aop, aspects, webservice)
Regarding post-processing of classes, one the nice features Maven has is a knowledge of the build life-cycle. A phase is built into the lifecycle for post processing:
process-classes - post-process the generated files from compilation, for example to do bytecode enhancement on Java classes.
It would just be a matter of wrapping a plugin around the retroweaver, or a plugin around the jarjar util and defining when you wish for them to be executed.