1

I'm a newbie in Maven and I would like to know. Is there any way I can write some task or plugin or something else for Maven in order to copy arbitrary (selected by myself) directories to classpath while building a simple Java SE project? Thank you in advance!

sidlejinks
  • 709
  • 1
  • 9
  • 25
  • 2
    This question lists eight (!) approaches to copying files using Maven : http://stackoverflow.com/questions/586202/best-practices-for-copying-files-with-maven – Graham Griffiths Aug 02 '13 at 09:19
  • 1
    whereas this question just has one approach, but explained fully and very straightforwards. I guess this is your best bet : http://stackoverflow.com/questions/3423737/copy-files-from-my-project-with-maven – Graham Griffiths Aug 02 '13 at 09:21
  • what do you mean by arbitrary directories: 1) directories that contain java classes 2) directories that contain native code to be used by java 3) directories with resource files? – linski Aug 02 '13 at 10:59
  • Thank you very much guys. I'll try every approach. – sidlejinks Aug 02 '13 at 12:12

1 Answers1

1

Its an inbuilt feature in maven as you can use maven-resources-plugin and set the goal to copy-resources.

For more you can have a look at maven specs for this plugin here.

Thanks

saurav
  • 3,424
  • 1
  • 22
  • 33