Syntastic has a nice feature that autodetects the correct classpath for Maven projects and appends it to javac.
ALE could probably steal parts of their implementation, which basically is just calling mvn dependency:build-classpath.
It would be great to get an example GitHub project to test this with. I'll have a look for a sufficiently complicated one if someone doesn't suggest one. I would like it if class paths could be detected automatically for maybe 90% of users, and then others could use a flag for setting extra paths.
I'm interested in this feature as well. You can try my EqualsVerifier project as a test case: https://github.com/jqno/equalsverifier
It doesn't have multiple modules but it does use a number of different scopes, which could affect the classpath.
https://github.com/artur-shaik/vim-javacomplete2 generates the class path in .cache/javacomplete2/classpath probably using mvn dependency:build-classpath. It would be great if there is a vim plugin that integrates javacomplete2 and ale. Thanks!
A call for mvn dependency:build-classpath could be made to get the path where a Maven project is detected. That would probably work quite well. See the DMD linter implementation for a similar strategy: https://github.com/w0rp/ale/blob/bdad25eefd6526f8130f97edbe25a1179e27aadc/ale_linters/d/dmd.vim#L18
That sounds like a good way to handle it. I'll give it a go at some point.
Sounds great!
Now ALE runs mvn dependency:build-classpath in the background to automatically grab class paths from Maven.
Most helpful comment
Now ALE runs
mvn dependency:build-classpathin the background to automatically grab class paths from Maven.