Maven Integration for Eclipse

"Update project configuration" remove the processed resources from target

Details

  • Type: Bug Bug
  • Status: Open Open
  • Priority: Major Major
  • Resolution: Unresolved
  • Affects Version/s: 0.9.4
  • Fix Version/s: None
  • Component/s: Project Configuration
  • Labels:
    None
  • Environment:
    Eclipse 3.4, M2Eclipse 0.9.4
  • Number of attachments :
    1

Description

When I'm restarting Eclipse or launching "Update project configuration", all my projects resources from target are removed. So when I'm staring WTP I get no resources in generated jar unless i'm forcing all my projects resources to process by modifying it.

Activity

Hide
Vincent Massol added a comment -

I have the same problem...

Show
Vincent Massol added a comment - I have the same problem...
Hide
Igor Fedorenko added a comment -

Can you please provide sample project that demonstrates the problem?

Show
Igor Fedorenko added a comment - Can you please provide sample project that demonstrates the problem?
Hide
Thomas Mortagne added a comment -

I tried to package some simple project with no dependency and all but I'm unable to reproduce this and even on projects with the problem it does not append all the time (around 50-70% of the time). This looks to append more when restarting Eclipse than launching "Update project configuration".

You can find at http://svn.xwiki.org/svnroot/xwiki/xwiki-platform/core/trunk/xwiki-cache/xwiki-cache-oscache/ a project that has the problem. You will need to add repositories listed at http://dev.xwiki.org/xwiki/bin/view/Community/Building#HInstallingMaven to be able to build.

Show
Thomas Mortagne added a comment - I tried to package some simple project with no dependency and all but I'm unable to reproduce this and even on projects with the problem it does not append all the time (around 50-70% of the time). This looks to append more when restarting Eclipse than launching "Update project configuration". You can find at http://svn.xwiki.org/svnroot/xwiki/xwiki-platform/core/trunk/xwiki-cache/xwiki-cache-oscache/ a project that has the problem. You will need to add repositories listed at http://dev.xwiki.org/xwiki/bin/view/Community/Building#HInstallingMaven to be able to build.
Hide
Eugene Kuleshov added a comment -

Thomas, I am not sure what you meant by "it does not append all the time". Can you please provide step by step instructions? Eg. checkout project from svn, run action xyz, etc. See some hints on the wiki

Show
Eugene Kuleshov added a comment - Thomas, I am not sure what you meant by "it does not append all the time". Can you please provide step by step instructions? Eg. checkout project from svn, run action xyz, etc. See some hints on the wiki
Hide
Achim Huegen added a comment -

Maybe that's the same problem that I get when I execute "clean" on my project. Since it is a really big project, the compilation takes a minute. During the compilation I can watch the resources being written to the target/classes folder and some seconds later they are gone again!?

Show
Achim Huegen added a comment - Maybe that's the same problem that I get when I execute "clean" on my project. Since it is a really big project, the compilation takes a minute. During the compilation I can watch the resources being written to the target/classes folder and some seconds later they are gone again!?
Hide
Eugene Kuleshov added a comment -

It could be that Maven builder is not the last one in your Eclipse projects. See project properties / Builders / Maven Project Builder. If it is not the last builder, then you need to fix that. I've also pushed 0.9.5 dev build that includes fix for "update project configuration" action to restore proper order of project builders. You can install that build from update site at http://m2eclipse.sonatype.org/update-dev/

Show
Eugene Kuleshov added a comment - It could be that Maven builder is not the last one in your Eclipse projects. See project properties / Builders / Maven Project Builder. If it is not the last builder, then you need to fix that. I've also pushed 0.9.5 dev build that includes fix for "update project configuration" action to restore proper order of project builders. You can install that build from update site at http://m2eclipse.sonatype.org/update-dev/
Hide
Achim Huegen added a comment -

Still occurs with 0.9.6.20080822-1053, even though the maven builder is the last one.

Show
Achim Huegen added a comment - Still occurs with 0.9.6.20080822-1053, even though the maven builder is the last one.
Hide
Eugene Kuleshov added a comment -

Achim, have you run "Maven / Update Project Configuration" action on your project?
If it fail for you, can you please provide a test project that would allow us to reproduce this? Thanks.

Show
Eugene Kuleshov added a comment - Achim, have you run "Maven / Update Project Configuration" action on your project? If it fail for you, can you please provide a test project that would allow us to reproduce this? Thanks.
Hide
Achim Huegen added a comment -

I have build an example projects which allows me to reproduce the problem consistently.
I'm using eclipse 3.4 with wtp 3.0.1 and m2eclipse 0.9.6.20080822-1053.

To reproduce, import the projects with "Import\Maven Projects".
After the import, the folder TestWeb\target\classes contains the resources (config1.properties, Application.properties).
Now make a change to the TestWeb\pom.xml (from within eclipse with the xml editor): For example, change the servlet-api version from 2.3 to 2.4.
After saving the resources are gone.
The same happens, if you edit the pom.xml from the outside of eclipse and then execute "Update Project configuration".

Show
Achim Huegen added a comment - I have build an example projects which allows me to reproduce the problem consistently. I'm using eclipse 3.4 with wtp 3.0.1 and m2eclipse 0.9.6.20080822-1053. To reproduce, import the projects with "Import\Maven Projects". After the import, the folder TestWeb\target\classes contains the resources (config1.properties, Application.properties). Now make a change to the TestWeb\pom.xml (from within eclipse with the xml editor): For example, change the servlet-api version from 2.3 to 2.4. After saving the resources are gone. The same happens, if you edit the pom.xml from the outside of eclipse and then execute "Update Project configuration".

People

Vote (7)
Watch (5)

Dates

  • Created:
    Updated: