felix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stefan Seifert (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (FELIX-4535) Calling eclipse:eclipse with maven-scr-plugin r1.15.0 and up leads to corrupt Eclipse project
Date Fri, 13 Jun 2014 15:55:01 GMT

    [ https://issues.apache.org/jira/browse/FELIX-4535?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14030777#comment-14030777

Stefan Seifert commented on FELIX-4535:

oh, i just found FELIX-4530 where the decision from FELIX-4241 should be revisited. so this
is perhaps a duplicate of FELIX-4530.

i'm closing this issue and add some info to FELIX-4530 for the usecase described in this ticket.

> Calling eclipse:eclipse with maven-scr-plugin r1.15.0 and up leads to corrupt Eclipse
> ---------------------------------------------------------------------------------------------
>                 Key: FELIX-4535
>                 URL: https://issues.apache.org/jira/browse/FELIX-4535
>             Project: Felix
>          Issue Type: Bug
>    Affects Versions: maven-scr-plugin 1.15.0, maven-scr-plugin 1.16.0, maven-scr-plugin
>            Reporter: Stefan Seifert
>         Attachments: FELIX-4535-testproject.zip
> in r1.15.0 of the eclipse plugin (FELIX-4241) the default output directory of the generated
SCR metadata files was changed to {{$\{project.build.directory\}/classes}}
> this leads to problems when generating and eclipse project with the maven-eclipse plugin
like this - eclipse reports an error like this:
> {noformat}
> Source folder 'src/main/java' in project 'scr-testproject' cannot output to distinct
source folder
> The project cannot be built until build path errors are resolved
> {noformat}
> to be precise, the error occurs only when the eclipse project is generated at the same
time as the SCR generation, e.g.
> {noformat}
> mvn clean install eclipse:eclipse
> {noformat}
> if this is done in two independent steps it does not occur:
> {noformat}
> mvn clean install
> mvn eclipse:eclipse
> {noformat}
> if the plugin version is downgraded to 1.14.0 it works as usual.
> the source of the problem is that when the project is generated at the same time as in
the build, an additional "source" folder is added to the {{.classpath}} eclipse project file
- so it exists twice, once as source folder and once as target folder:
> {code:xml}
> <classpathentry kind="src" path="target/classes" excluding="**/*.java"/>
> <classpathentry kind="output" path="target/classes"/>
> {code}
> i'm not sure why this is happening. i assume the problem is the method {{SCRDescriptorMojo.updateProjectResources()}}
in the maven-scr-plugin, but i'm not sure for what it is needed.
> please note that this problem was already mentioned in the comments of FELIX-4241, but
the solution from robert is not plausible for me: "The conflict seems to be with the explicit
pluginExecution definition for the maven-scr-plugin. If I remove that, all works fine.". if
the execution "generate-scr-scrdescriptor" is removed, no SCR metadata is generated at all
for the annotated classes. this removes the eclipse project problem, but the component are
no longer SCR components as well.
> attached is a minimal test project to reproduce the problem with the mvn calls mentioned

This message was sent by Atlassian JIRA

View raw message