Maven 2.x Eclipse Plugin

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

Details

  • Type: Improvement Improvement
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Fixed
  • Affects Version/s: 2.5.1
  • Fix Version/s: 2.6
  • Component/s: None
  • Labels:
    None
  • Patch Submitted:
    Yes
  • Number of attachments :
    2

Description

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.

  1. MECLIPSE-443.2.patch
    24/Apr/08 6:54 PM
    1.0 kB
    Michael Johns
  2. MECLIPSE-443.patch
    24/Apr/08 6:18 PM
    1 kB
    Michael Johns

Issue Links

Activity

Hide
Michael Johns added a comment -

First patch was incomplete. Sorry about that.

Show
Michael Johns added a comment - First patch was incomplete. Sorry about that.
Hide
Barrie Treloar added a comment -

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

Show
Barrie Treloar added a comment - Applied suggested patch by Michael Johns and updated expected test files.
Hide
Arnaud Heritier added a comment -

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 ?

Show
Arnaud Heritier added a comment - 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 ?
Hide
Michael Johns added a comment -

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.

Show
Michael Johns added a comment - 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.

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: