Issue Details (XML | Word | Printable)

Key: MECLIPSE-443
Type: Improvement Improvement
Status: Closed Closed
Resolution: Fixed
Priority: Minor Minor
Assignee: Barrie Treloar
Reporter: Michael Johns
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
Maven 2.x Eclipse Plugin

Only include **/*.java in Java source directories

Created: 24/Apr/08 06:15 PM   Updated: 09/May/09 07:05 PM   Resolved: 27/Nov/08 11:12 PM
Return to search
Component/s: None
Affects Version/s: 2.5.1
Fix Version/s: 2.6

Time Tracking:
Not Specified

File Attachments: 1. Text File MECLIPSE-443.2.patch (1.0 kB)
2. Text File MECLIPSE-443.patch (1 kB)

Issue Links:
Related
 

Patch Submitted: Yes


 Description  « Hide

Since Maven only recognizes *.java files in Java source directories (src/main/java, or src/test/java, for example), it would be nice if the plugin produced .classpath files configured the same way. Right now, a developer can inadvertently leave a non-Java resource in one of those directories, and everything will work fine in Eclipse. But when the time comes to produce a package, that artifact will be missing since Maven won't pick it up.



Michael Johns added a comment - 24/Apr/08 06:54 PM

First patch was incomplete. Sorry about that.


Barrie Treloar added a comment - 27/Nov/08 11:12 PM

Applied suggested patch by Michael Johns and updated expected test files.


Arnaud Heritier added a comment - 28/Nov/08 12:54 AM

Are we sure it won't break many projects which stored other files (like properties, xml) in the java dir (even it's a bad practice)
What is the behavior of the compiler plugin in maven ??
Is it strict like this ?


Michael Johns added a comment - 01/Dec/08 08:29 AM

Yes, that's the default behavior of the compiler plugin: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-compiler-plugin/src/main/java/org/apache/maven/plugin/CompilerMojo.java?view=markup

You can override that behavior to include other types of files. I suppose this plugin should follow that same pattern.