Making ant-like flat lib directory in pom.xml


/ Published in: XML
Save to your folder(s)

Copy all runtime dependencies into single flat directory (ant-like lib setup) - maybe useful for trimming too long classpathes.


Copy this code and paste it in your HTML
  1. <project>
  2.  
  3. ...
  4.  
  5.  
  6. <build>
  7. <plugins>
  8. <plugin>
  9. <artifactId>maven-dependency-plugin</artifactId>
  10. <executions>
  11. <execution>
  12. <phase>generate-resources</phase>
  13. <goals>
  14. <goal>copy-dependencies</goal>
  15. </goals>
  16. <configuration>
  17. <includeScope>runtime</includeScope>
  18. <outputDirectory>lib</outputDirectory>
  19. </configuration>
  20. </execution>
  21. </executions>
  22. </plugin>
  23. </plugins>
  24. </build>
  25. </project>

URL: copy-dependencies-lib

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.