I'm trying to use an XML resource file which I package inside a jar file (let's call it wrapper.jar)
I found this other thread which was very useful but I stumbled upon another problem. Within resources in JAR
My jar file content is as follows:
wrapper.jar:
/META-INF
/org
/ihe
axis2.xml
When I try this inside a class org.ihe.consumer.Foo constructor
java.net.URL xmlURL = getClass().getClassLoader().getResource("axis2.xml");
I get this from the "watch":
jar:file:/C:/Users/JROSE-HP/.m2/repository/org/apache/axis2/axis2-kernel/1.5.4/axis2-kernel-1.5.4.jar!/axis2.xml
I can't understand why it tries to get the xml file from the default axis2 jar instead of my jar... there is a dependency with axis-kernel-1.5.4.jar.
But how can I get the XMl file from wrapper.jar?
Thank you