Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 351800

Summary: m2e adds an exclude **/*.* pattern to the java source folder /src/main/java
Product: z_Archived Reporter: ChristophK <kaser>
Component: m2eAssignee: Project Inbox <m2e.core-inbox>
Status: CLOSED WONTFIX QA Contact:
Severity: normal    
Priority: P3 CC: igor, kaser, matthew
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Attachments:
Description Flags
Project to reproduce bug none

Description ChristophK CLA 2011-07-12 04:18:40 EDT
Build Identifier: 20110615-0604

We have a maven project with a lot of modules, which we want to work with in eclipse. 

Unfortunately, the m2e project configurator keeps adding an exclude filter on the default java source folder, both when a new module is imported as eclipse project or when "Maven->Update project configuration.." is executed.

I know that m2e adds an exclusion pattern to the resources folder, but to my understanding it should not exclude anything on the java source folder.

This is rather annoying, because sometimes I have to Udpate the project configuration when m2e fails to resolve dependencies in the workspace, and every time I do that I have to remove the exclude-patterns from all modules.

Reproducible: Always

Steps to Reproduce:
1. Import the attached dummy project using Import->General->Existing projects into workspace->Select archive file
2. Import the child_project using Import->Maven->Existing Maven Projects
3. Look at the /src/main/java source folder of the child project to see its exclude filters

After you manually remove the unnecessary exclude filters, you can run Maven->Update project configuration... and m2e will add them again.
Comment 1 ChristophK CLA 2011-07-12 04:23:04 EDT
Created attachment 199473 [details]
Project to reproduce bug
Comment 2 Matthew Piggott CLA 2011-07-12 09:29:11 EDT
In your parent pom you exclude all files for the maven compiler plugin.
Comment 3 ChristophK CLA 2011-07-12 10:03:06 EDT
Thank you for your reply - I should have thought of that!

That's because I use an anttask to compile everything because I need to use the eclipse compiler and there was no way to specify the compiler to use for the compiler plugin. 
Moreover, I did not find any other way to disable the maven compiler plugin.

Is there a way to tell m2e to disregard the exclusion in the parent pom.xml-file?
Comment 4 Igor Fedorenko CLA 2011-07-12 12:12:00 EDT
There are no plans to support use of anttask from m2e.
Comment 5 Denis Roy CLA 2021-04-19 13:26:56 EDT
Moved to https://github.com/eclipse-m2e/m2e-core/issues/