Generate jar with including images

Hello!

I have the following task in gradle

task deploy (dependsOn: [assemble, cleanConf], type: CubaDeployment) {
    appName = "${modulePrefix}"
    appJars (modulePrefix + '-global', modulePrefix + '-web')
    copy {
        from "images"
        into "$cuba.tomcat.dir/webapps/${modulePrefix}/VAADIN/images"
        include "*.png"
    }
}

When I deploy the application using intelliJ it works fine, but I don’t know how to make the same thing happen when I deploy it with a jar

task buildUberJar (type: CubaUberJarBuilding) {
    singleJar = true
    appProperties = ['cuba.automaticDatabaseUpdate': false]
    coreJettyEnvPath = 'modules/core/web/META-INF/jetty-env.xml'
    logbackConfigurationFile = 'etc/uber-jar-logback.xml'
}

Can you help me? Thanks a lot

Can anybody help me? :disappointed_relieved:

what is the goal for packing the images? are you going to refer to them through http://

or do you want to refer to them as classpathrescources (in which case you can just put them in a src/main/resources folder)

I have not verified this, but this discussion on stackoverflow talks about serving images from an uberjar for jetty https://stackoverflow.com/questions/33829573/how-to-get-embedded-jetty-serving-html-files-from-a-jar-not-a-war

Hi,
Are images used as static resources?
You could try to put them into /modules/web/web/VAADIN/ directory. See documentation: https://doc.cuba-platform.com/manual-7.2/static_resources.html