zDev - M2E - OSS
  1. zDev - M2E - OSS
  2. MNGECLIPSE-1970

resources inside target/classes disappear when closing a dependency project

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Duplicate
    • Affects Version/s: 0.9.9 iteration 11/25
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Environment:
      Ubuntu
    • Global Rank:
      13910

      Description

      1- Create 2 maven projects A & B
      2- Set project A as dependency of B.
      3- Create a testProjectA.properties in src/main/resources in project A
      4- Create a testProjectB.properties in src/main/resources in project B

      5- Using linux, check the presence of the resources in target/classes :
      $ ls testProjectA/target/classes
      projectA.properties
      $ ls testProjectB/target/classes
      projectB.properties

      6- Run a mvn install on project A.
      7- Close project A.

      8- Recheck the presence of the resources in target/classes :
      $ ls testProjectA/target/classes
      projectA.properties
      $ ls testProjectB/target/classes
      EMPTY!!!

      => I close the project A and resources of project B are deleted from target/classes.

      I don't understand why.

        Issue Links

          Activity

          Hide
          Igor Fedorenko added a comment -

          What you see is another case of MNGECLIPSE-823, which boils down to bad interaction between JDT and Maven builders. You need to either use custom lifecycle mapping for your projects or explicitly run project clean after dependency change.

          Show
          Igor Fedorenko added a comment - What you see is another case of MNGECLIPSE-823 , which boils down to bad interaction between JDT and Maven builders. You need to either use custom lifecycle mapping for your projects or explicitly run project clean after dependency change.
          Hide
          Michenaud Laurent added a comment -

          MNGECLIPSE-823 has been marked as fixed in 0.9.9 but the bug is still present using close project.

          About the solutions you're talking :

          • I don't understand how to customize the lifecycle relating to closing a project.
          • When i worked with ten projects and i close one, running "project clean" on the other projects
            is quite horrible as solution.

          Please have a look on what can be done for that : bug fix or a solution that is transparent for the developpers.

          Thanks.

          Show
          Michenaud Laurent added a comment - MNGECLIPSE-823 has been marked as fixed in 0.9.9 but the bug is still present using close project. About the solutions you're talking : I don't understand how to customize the lifecycle relating to closing a project. When i worked with ten projects and i close one, running "project clean" on the other projects is quite horrible as solution. Please have a look on what can be done for that : bug fix or a solution that is transparent for the developpers. Thanks.
          Hide
          Igor Fedorenko added a comment -

          JDT builder "escalates" incremental builds to full builds in some cases (classpath change is one such case, but there are several others). Problem is, JDT builder does not tell other builders about such escalation, so we can't do much from Maven builder to compensate, at least not in a generic fashion. maven-resources-plugin 2.5-SNAPSHOT is supposed to handle missing target resources during incremental build properly, but you need to configure your project(s) to use custom lifecycle mapping to take advantage of the new behaviour. Example configuration https://docs.sonatype.org/pages/viewpage.action?pageId=2949459 .

          Show
          Igor Fedorenko added a comment - JDT builder "escalates" incremental builds to full builds in some cases (classpath change is one such case, but there are several others). Problem is, JDT builder does not tell other builders about such escalation, so we can't do much from Maven builder to compensate, at least not in a generic fashion. maven-resources-plugin 2.5-SNAPSHOT is supposed to handle missing target resources during incremental build properly, but you need to configure your project(s) to use custom lifecycle mapping to take advantage of the new behaviour. Example configuration https://docs.sonatype.org/pages/viewpage.action?pageId=2949459 .
          Hide
          Michenaud Laurent added a comment -

          I tried with the profile & maven-resources-plugin 2.5-SNAPSHOT and it works good now.
          I hope there will be no side effect using that snapshot version.

          Just a litle remark : that bug didnot exist in 0.9.8. It has appeared since 0.9.9.

          Thanks for the help.

          Show
          Michenaud Laurent added a comment - I tried with the profile & maven-resources-plugin 2.5-SNAPSHOT and it works good now. I hope there will be no side effect using that snapshot version. Just a litle remark : that bug didnot exist in 0.9.8. It has appeared since 0.9.9. Thanks for the help.

            People

            • Assignee:
              Unassigned
              Reporter:
              Michenaud Laurent
              Last Updated By:
              Brian Fox
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Date of First Response: