Thanks for the reply.

I've followed your advice (I've set "Goals to invoke on Resource changes"
from process-resources resources:testResources to nothing), but I still have
the problem.

By the way, it's not changing resources that causes the problem; rather,
it's changing any classes - I don't know if I'd made that clear.

Every time I save any Java file, my target folder is wiped. I need to do a
clean to re-compile. 

I have changed the compiler settings, so that "Scrub output folders when
cleaning projects" is NOT checked, and this has helped, but with the
side-effect of causing the project to be rebuilt whenever I changed any
file. 


Here is the resources and testResources piece of my effecitve pom:


<resources>
      <resource>
       
<directory>c:\Users\JonnyC\workspace\fcg\core\src\main\resources</directory>
      </resource>
    </resources>
    <testResources>
      <testResource>
        <filtering>true</filtering>
       
<directory>c:\Users\JonnyC\workspace\fcg\core\src\test\resources</directory>
      </testResource>
    </testResources>

Thanks

Jonny


Igor Fedorenko-4 wrote:
> 
> Jonny,
> 
> Can you please show build/resources and build/testResources section of 
> your effective pom.xml?
> 
> FYI, m2e does not follow includes/excludes rules (known limitation) so 
> you will see such build-on-java-file-save behaviour if your project has 
> overlapping resources and java sources folders. If this is the case, the 
> workaround is to disable incremental resource processing (right-click on 
> the project, maven, set Goals to run on resource changes to blank 
> string) and use project/clean... clean action to force m2e process the 
> resources.
> 
> Jonny Cavell wrote:
>> I have a standard Appfuse Maven project in Eclipse.
>> 
>> Every time I save a file (e.g. edit a Java class) in core, Eclipse starts
>> "Building Workspace", which a) takes a long time and b) results in none
>> of
>> my project's classes being able to be resolved (although Maven
>> dependencies
>> such as Spring libraries etc. are ok).
>> 
>> I need to clean the project to sort it out each time.
>> 
>> How do I prevent this?
>> 
>> I'm using the latest version of m2eclipse.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
> 
>     http://xircles.codehaus.org/manage_email
> 
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Every-time-I-save-a-file-Eclipse-starts-Building-Workspace-tp19455594p19458037.html
Sent from the Maven Eclipse - User mailing list archive at Nabble.com.


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

    http://xircles.codehaus.org/manage_email


Reply via email to