What's the "right" way to (temporarily) exclude sources from a maven build, and is there an easy way to do it from Eclipse? -
i'm new maven, , don't have whole lot of experience eclipse either.
to exclude java files building in eclipse, right click files , choose build path -> exclude. works great "on-save" compilation in eclipse, not propagate maven project, when build project mvn install, tries compile excluded sources.
i've done few searches , results point me compiler plugin , <excludes> functionality, editing maven project files in order temporarily exclude file build seems bit awkward.
what's "right" way (temporarily) exclude sources maven build, , there easy way eclipse, via m2eclipse plugin or otherwise?
you use <excludes> parameter in maven compiler plugin temporarily exclude files compilation.
<plugin> <groupid>org.apache.maven.plugins</groupid> <artifactid>maven-compiler-plugin</artifactid> <version>2.3.2</version> <configuration> <excludes> <exclude>**/model/*.java</exclude> </excludes> </configuration> </plugin>
if using m2eclipse plugin , run maven->update project configuration, excluded files in pom should automagically excluded eclipse compilation well.
Comments
Post a Comment