On Mon, Oct 28, 2013 at 12:55 PM, Kohsuke Kawaguchi <kkawagu...@cloudbees.com> wrote: > we can tweak the RemoteClassLoader so that it'd warn us if we > try to load Java7 classes inside Maven JVM.
As I just mentioned, the remoting library can already do this. (I wrote the hook months ago.) It just needs to be activated in maven-plugin. The code to do so is commented out because it was not clear to me that we wanted to forbid Java 7-specific classes from being loaded from plugins, if they are advertised as being for Java 7+. The same decision applies to the slave channel: it would be a one-line change to prevent Java 7 bytecode from being loaded on slaves, but this might block deliberate usage of plugins with known 7+ dependencies. But the positive side is that we would immediately know if 7+ bytecode dependencies were *accidentally* introduced in plugins. We would also know if 7+ bytecode from servlet containers was “leaking” through the remoting channel. Perhaps Slave should have an optional NodeProperty to restrict bytecode level? Then a user who suspects a problem with accidental 7+ dependencies could check the box to enforce 6+ compatibility, and get a clear error message rather than the opaque ClassFormatError they currently get. -- You received this message because you are subscribed to the Google Groups "Jenkins Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-dev+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.