1

I have a Maven project. It is successfully deploying the jar file. I also want it to deploy the contents of src/main/resources.

mvn deploy does not deploy the resources.

How can I make it do that?

I read about using the copy file task and other workaround methods, but I want to use Maven's default behavior for deploying, which I thought would include the resources.

Akhil Jain
  • 13,872
  • 15
  • 57
  • 93
Mark
  • 61
  • 2
  • 4
  • Take a look at http://stackoverflow.com/questions/3685461/maven-eclipse-wtp-src-main-resources-not-deployed – Sai Dec 05 '12 at 18:19

1 Answers1

1

The folder src/main/resources contains resources which will be packaged into the jar file which means in other words it is already deployed within the created jar file.

khmarbaise
  • 92,914
  • 28
  • 189
  • 235
  • So Maven't can't deploy files other than the jar...the issue I'm having is that `getResource` cannot access files inside jars, so the files need to be deployed separately. – flow2k Nov 17 '18 at 01:24
  • `getResource` can access files within JARs, see for example https://stackoverflow.com/questions/4905888/within-resources-in-jar?rq=1 – hoijui Mar 03 '19 at 06:56