Hi Jan, Jan Nielsen wrote on Friday, August 11, 2006 11:32 PM:
> I'm a newbie to Maven and Continuum, so aplogies if this is > obvious. I'm > not sure if this is a Maven question or Continuum question, > or perhaps > both, so I thought I'd try here first. > > When dealing with multiple projects which need different JDK for > compilation, it's possible to use the source and target > elements for the > maven-compiler-plugin for each project to define the desired > byte-code: > > <plugin> > <groupId>org.apache.maven.plugins</groupId> > <artifactId>maven-compiler-plugin</artifactId> > <version>2.0</version> > <configuration> > <source>1.5</source> > <target>1.5</target> > </configuration> > </plugin> > > but, to avoid JDK library swapping, I would much rather be > able to defined > which one of my multiple JDKs should be used for compilation and test > execution, akin to what is done in Eclipse with configured > JDKs. Is this > possible in Maven and/or Continuum. > > Specifically, I have code which must be JDK 1.3 only, I have > library code > which needs to be JDK 1.3 compatible but typically runs in a JDK 5 > environment, and I have application code which is JDK 5 only. My > mixed-mode library code has backport of some of the JDK 1.4 and JDK 5 > functionality which if I're running in JDK 5 environment I > take advantage > of via reflection; otherwise, these services are implemented > with JDK 1.3 > constructs. My test code needs to test both modes of > operation, i.e., JDK > 1.3 environments and JDK 5 environments so my unit tests for > this library > must be executed twice, once in each environment, and my code must be > compiled in JDK 1.3. Does that make sense? > > Any thoughts? You can configure multiple executions for a plugin with different settings. Said that, this functionality is unfiotunately quite buggy, but I have managed to get it work for myself, see http://jira.codehaus.org/browse/MCOMPILER-37 - Jörg --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]