rfscholte commented on a change in pull request #13: Emit a warning instead of throwing an exception URL: https://github.com/apache/maven-compiler-plugin/pull/13#discussion_r290894404
########## File path: src/main/java/org/apache/maven/plugin/compiler/TestCompilerMojo.java ########## @@ -369,9 +369,11 @@ else if ( Double.valueOf( getTarget() ) < Double.valueOf( MODULE_INFO_TARGET ) ) // very odd // Means that main sources must be compiled with -modulesource and -Xmodule:<moduleName> // However, this has a huge impact since you can't simply use it as a classpathEntry - // due to extra folder in between - throw new UnsupportedOperationException( "Can't compile test sources " - + "when main sources are missing a module descriptor" ); + // due to extra folder in between ... or the user wants to test his main code on the + // classpath used by a named module ... or ... + getLog().warn( "Modular black-box test compilation with no main module?!" ); + + // TODO classpathElements = List.of( mainOutputDirectory ); Review comment: @sormuras you know what I'm going to say ;) documentation is key here. Without having clear examples what's happening here and why somebody wants to do this I'd prefer to keep the Exception. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services