jspc-maven-plugin
jspc-maven-plugin copied to clipboard
m2e/Eclipse integration
Support incremental builds as well as Eclipse compatible error reporting
See https://wiki.eclipse.org/M2E_compatible_maven_plugins
Closes: https://github.com/leonardehrenfried/jspc-maven-plugin/issues/25
This is a work in progress - it seems to work, but I'd really like some review and feedback.
I removed the ability to specify a different compiler as I had to customize the compiler class. I also set the default thread count to the number of CPUs.
Also, I have to complain about Jasper - it does not make this work easy. Things are private that shouldn't be, there's package scoped stuff that makes things really messy, etc
HI,
Thx for the PR, however I don't like the idea of removing a feature like specify different compiler. And I'm not a huge fan of taking number of CPU by default to threading. I think that the other modification you have made (in pom.xml, and adding @Parameter in mojo) must be in a separate PR. I don't have time right now to check all of this PR and to test it in eclipse but I will do in fews days
regards
Thanks for this PR.
Since @tcollignon has been the main developer for a few years, I will defer the review to him.
CI reports a few build errors on Maven 3.3.9:
[INFO] 2) Error injecting: private org.eclipse.aether.spi.log.Logger org.apache.maven.repository.internal.DefaultVersionResolver.logger
[INFO] while locating org.apache.maven.repository.internal.DefaultVersionResolver
[INFO] while locating java.lang.Object annotated with *
[INFO] at org.eclipse.sisu.wire.LocatorWiring
[INFO] while locating org.eclipse.aether.impl.VersionResolver
[INFO] for parameter 2 at org.eclipse.aether.internal.impl.DefaultArtifactResolver.<init>(Unknown Source)
[INFO] while locating org.eclipse.aether.internal.impl.DefaultArtifactResolver
[INFO] while locating java.lang.Object annotated with *
[INFO] at org.eclipse.sisu.wire.LocatorWiring
[INFO] while locating org.eclipse.aether.impl.ArtifactResolver
[INFO] for parameter 2 at org.eclipse.aether.internal.impl.DefaultRepositorySystem.<init>(Unknown Source)
[INFO] while locating org.eclipse.aether.internal.impl.DefaultRepositorySystem
[INFO] while locating java.lang.Object annotated with *
[INFO] while locating org.apache.maven.artifact.installer.DefaultArtifactInstaller
[INFO] at ClassRealm[plexus.core, parent: null] (via modules: org.eclipse.sisu.wire.WireModule -> org.eclipse.sisu.plexus.PlexusBindingModule)
[INFO] at ClassRealm[plexus.core, parent: null] (via modules: org.eclipse.sisu.wire.WireModule -> org.eclipse.sisu.plexus.PlexusBindingModule)
[INFO] while locating org.apache.maven.artifact.installer.ArtifactInstaller
[INFO] while locating org.apache.maven.plugin.dependency.fromDependencies.CopyDependenciesMojo
[INFO] Caused by: java.lang.IllegalArgumentException: Can not set org.eclipse.aether.spi.log.Logger field org.apache.maven.repository.internal.DefaultVersionResolver.logger to org.eclipse.aether.internal.impl.slf4j.Slf4jLoggerFactory
See https://travis-ci.org/leonardehrenfried/jspc-maven-plugin/builds/386707747?utm_source=github_status&utm_medium=notification
It would be a prerequisite for the merge to resolve these build errors.
Regarding the ability to use another compiler, I personally would be okay, if the m2e integration only works if you do not change the the default compiler.
That way we can support @tcollignon use case of overriding the specific compiler being used and @candrews use case of integrating with eclipse. Or am I overlooking something?