Actually, I think I may have just found a workaround: 

    1. Window --> Preferences --> Java --> Compiler --> Building 
    2. Under "Output folder", uncheck "Scrub output folders when cleaning" 
projects. 

This seems to keep Eclipse from "mopping up" the targeted resources. My guess 
is that (since my projects all have inter-dependencies between them) that every 
time I rebuild one project, the ones that depend on it get rebuilt, 
Maven/Eclipse gets confused as to who's doing what, and Eclipse (for some 
reason, as the last thing that happens) scrubs the target folders of all 
rebuilt projects. Disabling that scrub (with the settings above) prevents it 
from happening. 

It's worth noting that this settings change prevents Eclipse from ever cleaning 
up deleted resources, etc. To work around that, add an Eclipse Run target that 
just runs the "mvn clean" goal on your projects. Run that, and then "Project 
--> Clean" whenever you need a full rebuild. 

Best regards, 
Karl M. Davis 


----- Original Message ----- 
From: "Tim Downey" <[EMAIL PROTECTED]> 
To: user@m2eclipse.codehaus.org 
Sent: Friday, September 26, 2008 10:16:37 AM GMT -07:00 U.S. Mountain Time 
(Arizona) 
Subject: Re: [m2eclipse-user] Re: Problem with resources copying with m2eclipse 
0.9.4 


I'm seeing exactly the same thing on Eclipse 3.4. Is there any debug logging 
that we can watch to try to catch what is deleting the resources? 


On Fri, Sep 26, 2008 at 1:14 PM, Karl M. Davis < [EMAIL PROTECTED] > wrote: 




I just tried the following workaround, which didn't work: 


    1. Set the project to run process-resources resources:testResources on 
Clean. 
    2. Removed src/main/resources from the Eclipse Build Path (I don't need any 
resource filtering). 
    3. Cleaned the project: 


        1. Watching the target/classes folder in Explorer, the Maven builder 
did what it's supposed to: my META-INF folder, etc. appeared during the 
appropriate phase in the Maven console. 
        2. After that, though, Eclipse did something else that caused the 
META-INF folder to disappear-- back to just my compiled Java classes. Can't 
catch what that "something else" is-- the Eclipse Progress Bar just blinks from 
"Building workspace (sleeping)" to "Building workspace" and then back again. 

I'm using Eclipse 3.3. 


Best regards, 
Karl M. Davis 



----- Original Message ----- 
From: "Karl M. Davis" < [EMAIL PROTECTED] > 
To: user@m2eclipse.codehaus.org 



Sent: Friday, September 26, 2008 9:11:53 AM GMT -07:00 U.S. Mountain Time 
(Arizona) 
Subject: Re: [m2eclipse-user] Re: Problem with resources copying with m2eclipse 
0.9.4 


I'll confirm that it seems only some projects have this problem more than 
others. I have yet to discover a rhyme or reason, though. By the way, my 
Builders are ordered correctly and the problem seems to occur with both the 
Maven Embedder and an external 2.0.9. 


----- Original Message ----- 
From: "Tim Downey" < [EMAIL PROTECTED] > 
To: user@m2eclipse.codehaus.org 
Sent: Friday, September 26, 2008 8:04:39 AM GMT -07:00 U.S. Mountain Time 
(Arizona) 
Subject: Re: [m2eclipse-user] Re: Problem with resources copying with m2eclipse 
0.9.4 


I too have this problem on 0.9.6 but can't figure out how I'd report a good 
test case for a defect. It doesn't happen on all projects either. I have a 
particular project that it occurs on almost all the time. 

I can see that the resources are copied, but then disappear at some point 
during the build. 


On Fri, Sep 26, 2008 at 10:56 AM, Karl M. Davis < [EMAIL PROTECTED] > wrote: 




I also find myself running into this problem: my resources get processed during 
a clean but then disappear halfway through (most of the time). I'm using 0.9.5, 
though. Any ideas? 

Thanks, 
Karl 


Ok thanks for these explanations. 

I have already checked the builders order, and Maven is the last one. 
I will try to do more tests in order to provide you a project that 
show this issue. 

Regards 

On Tue, Jul 15, 2008 at 11:32 PM, Igor Fedorenko <[EMAIL PROTECTED] 
> Bouiaw wrote: 
>> 
>> Hi, 
>> 
>> I don't really understand the default values for resource processing, 
>> especially : 
>> - why should we run process-test-resources and not process-resources 
>> after a clean ? 
> 
> m2e projects include both main and test classes/resources, so it is 
> theoretically possible that some tests require processed test resources to 
> run successfully. I agree that chances are slim, but overhead of running 
> through couple of extra empty build phases is negligible. 
> 
>> - why process-test-resources is not needed after resource changes ? 
> 
> We're trying to limit extent of possible changes done by maven during 
> incremental build. process-test-resources generates sources, resource, 
> compiles classes all of which take time to execute and potentially trigger 
> other builders. 
> 
>> 
>> I know that we can cutomize these value, but as it is default value I 
>> would like to understand how it works. 
>> 
>> I have begin to play with these values because on one of my project, 
>> when I run a clean + build in Eclipse, resource files are created in 
>> target/classes at the beggining of the build but are removed at the 
>> end ! If I replace default values for after a clean 
>> "process-test-resources" by "process-resources resources:resources", 
>> it works. 
> 
> Current implementation is sensitive to builders order. Can you please verify 
> if maven build is configured to run after java builder? This should be 
> addressed to a certain degree by MNGECLIPSE-707. 
> 
>> 
>> A related question is : does it make sense to configure the following 
>> all inclusive command for both default values : process-resources 
>> process-test-resources resources:resources resources:testResources 
> 
> As I explained above, running almost complete maven build lifecycle for 
> incremental resource changes maybe very expensive. Also, 
> process-test-resources implies the other goals for all standard maven 
> project types. 
> 
>> 
>> I have tried to reproduce it in a test case project but it works well 
>> in my simple test project ... 
>> 
>> Thanks in advance for your answers. 
>> 
>> On Sat, Jul 12, 2008 at 9:00 AM, Henri Gomez <[EMAIL PROTECTED] 
>> wrote: 
>>> 
>>> BTW, this one should be added in a FAQ page until resolved, it could 
>>> save users hours of headaches :) 
>>> 
>>> 2008/7/11 Henri Gomez <[EMAIL PROTECTED] 
>>>> 
>>>> 2008/7/11 Eugene Kuleshov <[EMAIL PROTECTED] 
>>>>> 
>>>>>  There is a jira issue for that already. Please vote on it. 
>>>>> 
>>>>>  MNGECLIPSE-707: action "update project configuration" should restore 
>>>>> proper 
>>>>> order of project builders 
>>>>> http://jira.codehaus.org/browse/MNGECLIPSE-707 
>>>>> 
>>>>>  Thanks 
>>>> 
>>>> Done ! 
>>>> 
>>> --------------------------------------------------------------------- 
>>> To unsubscribe from this list, please visit: 
>>> 
>>> http://xircles.codehaus.org/manage_email 
>>> 
>>> 
>>> 
>> 
>> --------------------------------------------------------------------- 
>> To unsubscribe from this list, please visit: 
>> 
>> http://xircles.codehaus.org/manage_email 
>> 
>> 
> 
> 
> --------------------------------------------------------------------- 
> To unsubscribe from this list, please visit: 
> 
> http://xircles.codehaus.org/manage_email 
> 
> 
> 

--------------------------------------------------------------------- 
To unsubscribe from this list, please visit: 

http://xircles.codehaus.org/manage_email 





Reply via email to