When I raised the Java 5 thing, I mentioned needing toolchain support,
but probably wasn't clear about what I meant given all the responses
about target environments, -source and -target not being enough, and so on.

It's probably worth sharing what I was thinking of here for Maven 2.1,
regardless of what JVM it is running on.

A reasonable analogy would be how IntelliJ configures the JDKs you can
use, which can then be selected on a per-project or per-module basis,
and are used for compilation and test execution but are completely
irrelevant to what IDEA is using.

Some things to note about targeting a different JDK:
* rt.jar is not enough - JDKs provide a number of other classes in extra
libraries, and it isn't called rt.jar on some platforms.
* -source and -target are not enough (but still useful to target
something not installed)
* you can never cover all the options in testing from Maven itself. Such
responsibility should be delegated to something like Continuum running
across different platforms and JDKs.
* you want to pass the JDK to either the whole project, or just a part
of it (eg: compile with what you want, but test with this)
* the toolchain includes more than just the JARs used, but also the
applications at various phases (java.exe to fork tests, javac to fork
compiler, and so on)
* this should be considered a "toolchain" rather than a "JDK" so the
same principle can be applied to other technologies when we build
non-Java stuff.
* you might still want to augment the toolchain (eg, use this installed
JDK 1.4, but use eclipse to compile, or use the given source/target).


As far as implementation goes, just some rough thoughts so far:
- configuring the JDKs/toolchains needs to be done from the user's settings.
- there need to be known constraints (eg, jdk >= 1.3)
- plugins need to inspect the available toolchains
- there needs to be a default (for JDK, that would presumably be the JDK
running Maven)

Thoughts?
- Brett

--
Apache Maven - http://maven.apache.org/
Better Builds with Maven - http://library.mergere.com/


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to