Am 09/03/16 um 11:48 schrieb Robert Scholte:
> Simple? We have several options. Most user friendly might be to have the  
> "magic" in the maven-compiler-plugin, which implies you need to be able to  
> set the javac executable for both, set the source/target/release for both.  
> And how about compilation results (success/failures/error)? Merge them?

This really is a shortcoming of the standard javac compiler. What about
this?

We have 'src/main/java' and 'src/test/java'. The compiler plugin
compiles these source roots the same way it did before. In addition, we
make that plugin support the following well-known source roots and make
it compile the sources by setting target and source automatically based
on the name of the source root in order of lowest to highest target so
that classes of a higher target platform can be compiled against classes
of a lower target platform. Like this:

'src/main/java1.1'
'src/main/java1.2'
'src/main/java1.3'
'src/main/java1.4'
'src/main/java1.5'
'src/main/java1.6'
'src/main/java1.7'
'src/main/java1.8'
'src/main/java1.9'

'src/test/java1.1'
'src/test/java1.2'
'src/test/java1.3'
'src/test/java1.4'
'src/test/java1.5'
'src/test/java1.6'
'src/test/java1.7'
'src/test/java1.8'
'src/test/java1.9'

All optional. The compiler plugin searches for these source roots and
does everything automatically in order 1.1 to 1.9 writing everything to
'target/classes'.

Regards,
-- 
Christian


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to