[Run as a springboot jar] Is it possible to put all neded files (package) in a big fat jar

Hi,

Is it possible to create a fat jar that includes all files needed in a vaadin project.

A jar that is created with mvn package -Pproduction must be run inside target folder because needs several generated files or dirs in target directory.

When this jar run outside target directory, it will complain that it cant find several generated files.

I need it for demo purpose and simplicity :)

many thanks.

Hi,

I think i screw up my project a bit.

mvn package -Pproduction will create all necesarry files to be run with java -jar xx.jar

I will try to confirm this. Or maybe someone wants to confirm this behaviour.

Many thanks.
sl

mvn package -Pproduction will produce an artifact with all necessary resources needed by Vaadin.
The fat jar is produced by the spring-boot maven plugin.

Usually, with the default configuration of Vaadin and spring-boot maven plugins, the produced fat-jar has all it needs to be executed.

Note: this requires either the usage of the spring boot parent or spring boot maven plugin goal “repackage”.

1 Like

many thanks @knoobie :)