Onejar, with maven, won't copy resource into jar

Tag: maven Author: michelle20092009 Date: 2011-03-31

I'm using one-jar to package up my program. I have resources in src/main/resources. The maven-resources-plugin correctly copies the resources into the jar, but the jar produced by onejar does not contain my resources.

Here's my pom:





What am I doing wrong? How do I include resources in one-jar?

Best Answer

I have discovered my error. It was putting it in the jar, just not where I expected it to be. It's contained in a jar inside the main jar. Specifically, contains resourceTest-0.0.1-SNAPSHOT.jar, which contains my resource.

Now I just need to find out how to access the resource, but that's another question, which warrants more research.


Have you found out how to access this resource? Because i am stuck at this at the moment