Hi
I am trying to create jar with maven and I want also all resources (all .properties files and I have also .png files) to be included
right now all non-java (.class) files are ignored
here is part of my pom.xml file:
and here is also assembly.xml:
There is an article about resources on maven page, but they have all their resources in directery named "resources" and I do not want to do this way
could you help me, how to add resources (in my case .properties and .png files) into jar file?
All of you java source should go at src/main/java. All of your resource files should go in src/main/resources. When the build runs, during the process-resources phase the resource are copied to target/classes. Similarly, during the compile phase, the Java source are compiled into target/classes. Then during the package phase, all of the files in target/classes (both resource files and class files) are packaged into a JAR file. This standard Maven practice and you should not try to subvert that (unless you like causing yourself much grief and anguish.)
If you are trying to use the assembly plugin to create the JAR file, you are doing it wrong. The assembly plugin is meant to create an installation or distribution package of your product, it is not meant to build the artifact (JAR file) for the project.