Hello,
In my project developed using Vaadin 24.3.2 version and Spring Boot, I select the production profile and run prepare-install
afterwards, then I run the package.json
file with node.js and the node-modules
folder is created. However, during mvn-install
, I encounter the following error:
Cannot invoke “java.lang.Class.isInterface()” because the return value of “org.reflections.Reflections.forClass(String, java.lang.ClassLoader)” is null
Is there anyone who can help with this?
package.json
{
"name": "no-name",
"license": "UNLICENSED",
"type": "module",
"dependencies": {
"@vaadin/common-frontend": "0.0.19",
"construct-style-sheets-polyfill": "3.1.0",
"lit": "3.1.0",
"@vaadin/router": "1.7.5",
"@polymer/polymer": "3.5.1"
},
"devDependencies": {
"strip-css-comments": "5.0.0",
"@vitejs/plugin-react-swc": "3.5.0",
"workbox-build": "7.0.0",
"rollup-plugin-visualizer": "5.9.2",
"glob": "10.3.3",
"@rollup/plugin-replace": "5.0.4",
"async": "3.2.4",
"workbox-core": "7.0.0",
"vite": "5.0.6",
"rollup-plugin-brotli": "3.1.0",
"@rollup/pluginutils": "5.0.5",
"vite-plugin-checker": "0.6.2",
"workbox-precaching": "7.0.0",
"transform-ast": "2.4.4",
"typescript": "5.3.3",
"@vitejs/plugin-react": "4.2.0"
},
"overrides": {
},
"vaadin": {
"dependencies": {
"@vaadin/common-frontend": "0.0.19",
"construct-style-sheets-polyfill": "3.1.0",
"lit": "3.1.0",
"@vaadin/router": "1.7.5",
"@polymer/polymer": "3.5.1"
},
"devDependencies": {
"strip-css-comments": "5.0.0",
"@vitejs/plugin-react-swc": "3.5.0",
"workbox-build": "7.0.0",
"rollup-plugin-visualizer": "5.9.2",
"glob": "10.3.3",
"@rollup/plugin-replace": "5.0.4",
"async": "3.2.4",
"workbox-core": "7.0.0",
"vite": "5.0.6",
"rollup-plugin-brotli": "3.1.0",
"@rollup/pluginutils": "5.0.5",
"vite-plugin-checker": "0.6.2",
"workbox-precaching": "7.0.0",
"transform-ast": "2.4.4",
"typescript": "5.3.3",
"@vitejs/plugin-react": "4.2.0"
},
"hash": ""
}
}
pom.xml
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<!-- Vaadin project from https://github.com/vaadin/skeleton-starter-flow-spring -->
<groupId>a.b.c</groupId>
<artifactId>abc-web</artifactId>
<name>abc Web</name>
<version>2.0.1</version>
<packaging>war</packaging>
<properties>
<java.version>17</java.version>
<spring.boot.version>3.2.0</spring.boot.version>
<oracle.version>23.3.0.23.09</oracle.version>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
<vaadin.version>24.3.2</vaadin.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>3.2.0</version>
</parent>
<repositories>
<repository>
<id>Vaadin Directory</id>
<url>https://maven.vaadin.com/vaadin-addons</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
</repositories>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-bom</artifactId>
<version>${vaadin.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>com.oracle.database.jdbc</groupId>
<artifactId>ojdbc11</artifactId>
<version>${oracle.version}</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>com.vaadin</groupId>
<!-- Replace artifactId with vaadin-core to use only free components -->
<artifactId>vaadin-core</artifactId>
<version>${vaadin.version}</version>
</dependency>
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-spring-boot-starter</artifactId>
<version>${vaadin.version}</version>
</dependency>
<dependency>
<groupId>org.parttio</groupId>
<artifactId>line-awesome</artifactId>
<version>2.0.0</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-security</artifactId>
<version>${spring.boot.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-validation</artifactId>
<version>${spring.boot.version}</version>
</dependency>
<!-- https://mvnrepository.com/artifact/com.itextpdf/itextpdf -->
<dependency>
<groupId>com.itextpdf</groupId>
<artifactId>itextpdf</artifactId>
<version>5.5.13.3</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.apache.poi/poi -->
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi</artifactId>
<version>5.2.5</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-thymeleaf</artifactId>
<version>${spring.boot.version}</version>
</dependency>
</dependencies>
<build>
<defaultGoal>spring-boot:run</defaultGoal>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<version>${spring.boot.version}</version>
</plugin>
<plugin>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-maven-plugin</artifactId>
<version>${vaadin.version}</version>
<executions>
<execution>
<goals>
<goal>prepare-frontend</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<!-- Production mode is activated using -Pproduction -->
<id>production</id>
<properties>
<vaadin.productionMode>true</vaadin.productionMode>
</properties>
<dependencies>
<!-- Exclude development dependencies from production -->
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-core</artifactId>
<version>${vaadin.version}</version>
<exclusions>
<exclusion>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-dev</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-maven-plugin</artifactId>
<version>${vaadin.version}</version>
<executions>
<execution>
<goals>
<goal>build-frontend</goal>
</goals>
<phase>compile</phase>
</execution>
</executions>
<configuration>
<forceProductionBuild>true</forceProductionBuild>
<ciBuild>true</ciBuild>
</configuration>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>it</id>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<executions>
<execution>
<id>start-spring-boot</id>
<phase>pre-integration-test</phase>
<goals>
<goal>start</goal>
</goals>
</execution>
<execution>
<id>stop-spring-boot</id>
<phase>post-integration-test</phase>
<goals>
<goal>stop</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>