I imported my existing maven projects under eclipse.Once imported i found under Java Build Path > Source resource foulder is
excluded(i can see Excluded:**
) from build and does not get copied under target > classes directory.
I can remove exclusion manually by selecting Excluded:**
and then click Remove, But there are large numbers of projects. Is there
a setting in eclipse where i can do it one go ?
That's part of what Maven does when you let it generate your Eclipse project settings (via the eclipse:eclipse
plugin/goal). It's quite misleading. However, if you have the m2e
plugins installed into Eclipse it coordinates things correctly.
What's going on, as best as I can figure: Eclipse's built-in Java builder automatically copies non-Java files found on the build path to the output location (unless they're excluded as you see in your Build Path). Problem is, when Maven comes in the picture it, too, wants to copy resources during a build. So to keep the two builders from competing/interfering with each other, Maven instructs Eclipse to ignore resources so it (Maven) can manage copying them during a build.
m2e
integrates into the Eclipse build process to do the Maven copying of those files, so if you configure the project as an m2e
project things will "just work," both in Eclipse and if you build from a command line.
I don't know of a way to tell Maven to not configure the project this way. To be honest, that's just one of the reasons I prefer to not let Maven generate my Eclipse project files; I do a much better job of it and I totally control the specifics rather than relying on whatever the Maven eclipse developers think is best.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With