Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[m2e-dev] Source roots in non-java configurators

I have trouble sharing source roots across different configurators.

I add one more source folder using build-helper-maven-plugin. Then I
would like checkstyleConfigurator to configure Eclipse project to
check these sources.

Configurator order of execution is correct:
1. org.sonatype.m2e.buildhelper.buildhelperConfigurator - uses
IClasspathDescriptor.addSourceEntry()
2. org.eclipse.m2e.jdt.javaConfigurator
3. com.basistech.m2e.code.quality.checkstyleConfigurator - uses
MavenProject.getCompileSourceRoots()

AbstractJavaProjectConfigurator uses
IClasspathDescriptor.addSourceEntry() to add source folders.
Configurator, which inherits from AbstractProjectConfigurator, is left
with IMavenProjectFacade.getCompileSourceLocations() or
MavenProject.getCompileSourceRoots(), which does not contain source
folders added by IClasspathDescriptor.addSourceEntry().

My thought is, that we should not force checkstyleConfigurator to
understand java specific classpath, since it could also run on
non-java projects.
So probably add source folders added by
IClasspathDescriptor.addSourceEntry() also to MavenProject by calling
addCompileSourceRoots() ?

Petr Janata


Back to the top