Icon and offline.html missing when running with java -jar

When i start my application with eclipse the src/main/webapp/offline.html and the src/main/resources/icons/icon.png gets loaded normally as it should.
But when i try to run the app with java -jar … it uses the default Vaadin-Icon.
I added
sourceSets { main { resources { srcDirs "src/main/resources", "src/main/webapp" } } }
this to my build.gradle and in the .jar i can see the icon and the offline page but it doesnt load it.

What am i doing wrong?