Maven synchronization and excluded directories
Hi,
I don't understand why Maven synchronization doesn't exclude some directories :
- when a project is synchronized from pom.xml, output directory is not exluded.
- same thing for nested modules : if moduleA1 is under moduleA, moduleA will contain moduleA1 whereas moduleA1 is also synchonized as another module.
In both case, files are duplicated, which is not convenient. You can mark directories as excluded using projects settings, but these settings will be reset after next Maven synchronization.
How do you handle that ? Why these directories couln't be marked as excluded by default ?
Thanks
请先登录再写评论。
Hi, Sylvain,
'target' directory is not excluded because it may contain 'generated-sources' that should be marked as source folders. Why do you want to exclude it for, anyway? I mean is there any real problem with it?
As for nested modules, could you please attach pom files so that I could reproduce the problem?
Did you every try to delete a test class maven has run before?
Idea will find the reference within the targets/surefire-reports folder.
The same exists when Javadoc has been created. For every
rename/move/delete of a class, Idea will ask whether the javadocs shall
be changed...
So I really want the exclusion of those folders. At least the folders
for the classes, javadocs, site and surefire-reports must be excluded...
Regards,
Johannes Schneider
Anton Makeev wrote:
Could you please create jira issue for this?
Thanks
>'target' directory is not excluded because it may contain 'generated-sources' that should
Well resource files are duplicated, which is not convenient when performing searches or calling Ctrl-Shift-n. Besides, some errors may be found in files generated in target directory because they are not consideres as sources, whereas they are.
Could you exclude all but <generated-sources> directory inside target ?
-
Actually I should have started by searching in Jira, I see 2 entries related to this subject :)
- Override excluding all directories in target when using Maven for project
http://www.jetbrains.net/jira/browse/IDEA-14282
Create project from maven - should exclude contents of compound module
http://www.jetbrains.net/jira/browse/IDEA-15732
PS : by the way, the link "Tracker" displayed in forum header is invalid, it points to http://www.intellij.net/tracker instead of http://www.jetbrains.net/jira. That's why you have so few bugs :)