[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [m2e-dev] Source roots in non-java configurators
|
This is bug 349586 [1], which describes at least two underlying problems.
First, m2e maintain MavenProject state during project import,
configuration update and workspace build the same way as during command
line build. In case of build-helper-maven-plugin:add-sources this means
adding compile source roots to the model, but other configurators will
need to provide similar functionality.
Second, we need to make sure MavenProject state either survives
workbench restart or is properly recreated after workbench restart.
Currently, new project instance is read after restart and project
configurators do not get the chance to make any changes to the project
instance.
We are still looking for a good solution to these problems.
[1] https://bugs.eclipse.org/bugs/show_bug.cgi?id=349586
--
Regards,
Igor
On 11-08-03 11:51 AM, Petr Janata wrote:
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
_______________________________________________
m2e-dev mailing list
m2e-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/m2e-dev