Skip to content

Instantly share code, notes, and snippets.

Last active August 29, 2015 14:15
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
# I'd expect the following to fail, but it works because javac will implicitly load
# from src/main/java passed as -sourcepath.
# That wouldn't happen if javac was called with a dummy -sourcepath; sourcepath is not needed
# as Maven already computes the exact list of source files to compute.
# Proof by example: uncomment the `compilerArgs` and run `mvn clean compile` again
mkdir -p src/main/java/foo/bar
echo '
<!-- Uncomment to workaround bug: -->
' > pom.xml
echo '
abstract class A {
' > src/main/java/foo/bar/;
echo '
class B extends A {
' > src/main/java/foo/bar/;
mvn compile
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment