java - Extract all classes under in "model" packages to a separate Maven module -
i have maven module src directory looks this:
src/ main/ foo/ model/ modela.java bar/ model/ modelb.java
what easiest way extract classes under in "model" packages separate maven module? (i.e. want move modela , modelb separate module)
you can define copy-resources plugin in pom.xml:
<plugin> <artifactid>maven-resources-plugin</artifactid> <version>2.4.3</version> <executions> <execution> <id>copy-models</id> <phase>validate</phase> <goals> <goal>copy-resources</goal> </goals> <configuration> <outputdirectory>{code_base}/new-module/src/main/foo/model> <!-- location models need copied --> <overwrite>true</overwrite> <resources> <resource> <directory>src/main/*/model/*.java</directory> <filtering>true</filtering> </resource> </resources> </configuration> </execution> </executions> </plugin>
Comments
Post a Comment