IntelliJ maven compile don’t find file in project

I have a Spring Core project in Java 1.8 that I imported into IntelliJ (previously I was using Eclipse) and for which I created various Maven configurations to execute builds, releases, etc.

Everything went well until I changed PCs, moving from Windows 10 to Windows 11. I reinstalled IntelliJ, configured the project, but when I try to run the mvn clean install command either from the configuration or from Run Anything, I receive this error during compilation:

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
<code>org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.3:compile (default-compile) on project ReportERHomeService: Compilation failure
javac: file not found: D:RERSanitàselfbacksrccomiconsultingreporterstatsRange.java
</code>
<code>org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.3:compile (default-compile) on project ReportERHomeService: Compilation failure javac: file not found: D:RERSanitàselfbacksrccomiconsultingreporterstatsRange.java </code>
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.3:compile (default-compile) on project ReportERHomeService: Compilation failure
javac: file not found: D:RERSanitàselfbacksrccomiconsultingreporterstatsRange.java

The class obviously exists, and to be thorough, I tried downloading a standalone version of Maven and running the command through the Windows console, and everything was executed without errors.
I thought it might be a problem with the integrated version of IntelliJ, so I tried using the downloaded one, but I get the same error as above, so I’m inclined to think that the problem is, somehow, IntelliJ.

I’ve tried cleaning the cache, uninstalling and reinstalling the application and re-importing the projects, but the problem persists.
I’ve also tried renaming the package path of the class, and the error changes, but it still can’t find some other file.

Has anyone ever found themselves in a similar situation and provide any analysis or suggestions regarding this issue?

I’m using IntelliJ IDEA 2024.1.4 (Community Edition) with the following integrated Maven version:

The standalone maven version:

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
<code>Apache Maven 3.9.8 (36645f6c9b5079805ea5009217e36f2cffd34256)
Maven home: D:ApplicazioniMavenapache-maven-3.9.8
Java version: 1.8.0_422, vendor: Amazon.com Inc., runtime: C:Usersfxella.jdkscorretto-1.8.0_422jre
Default locale: it_IT, platform encoding: Cp1252
OS name: "windows 11", version: "10.0", arch: "amd64", family: "windows"
</code>
<code>Apache Maven 3.9.8 (36645f6c9b5079805ea5009217e36f2cffd34256) Maven home: D:ApplicazioniMavenapache-maven-3.9.8 Java version: 1.8.0_422, vendor: Amazon.com Inc., runtime: C:Usersfxella.jdkscorretto-1.8.0_422jre Default locale: it_IT, platform encoding: Cp1252 OS name: "windows 11", version: "10.0", arch: "amd64", family: "windows" </code>
Apache Maven 3.9.8 (36645f6c9b5079805ea5009217e36f2cffd34256)
Maven home: D:ApplicazioniMavenapache-maven-3.9.8
Java version: 1.8.0_422, vendor: Amazon.com Inc., runtime: C:Usersfxella.jdkscorretto-1.8.0_422jre
Default locale: it_IT, platform encoding: Cp1252
OS name: "windows 11", version: "10.0", arch: "amd64", family: "windows"

And the pom.xml (I’ve excluded dependencies and profiles for brevity, as they exceeded the character limit for the post):

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
<code><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>
<groupId>com.example</groupId>
<artifactId>Example</artifactId>
<version>0.1-SNAPSHOT</version>
<packaging>war</packaging>
<properties>
<mavenVersion>3.3</mavenVersion>
<springVersion>4.3.30.RELEASE</springVersion>
<poi.version>3.17</poi.version>
</properties>
<build>
<sourceDirectory>src</sourceDirectory>
<finalName>${release.file}</finalName>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>${mavenVersion}</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
<fork>true</fork>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
<plugin>
<artifactId>maven-war-plugin</artifactId>
<version>2.6</version>
<configuration>
<warSourceDirectory>${webContent}</warSourceDirectory>
<failOnMissingWebXml>false</failOnMissingWebXml>
</configuration>
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>3.0.0</version>
<configuration>
<descriptors>
<descriptor>src/assembly/bin.xml</descriptor>
</descriptors>
</configuration>
</plugin>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.8</version>
<executions>
<execution>
<phase>package</phase>
<configuration>
<target>
<tstamp>
<format property="thisday" pattern="yyyyMMdd"
locale="it,IT" unit="day" />
</tstamp>
<copy file="${project.build.directory}/${release.file}.war"
todir="${release.dir}/" />
<checksum
file="${project.build.directory}/${release.file}.war"
property="md5" />
<checksum file="${release.dir}/${release.file}.war"
property="${md5}" verifyProperty="isMD5ok" />
<fail message="Wrong md5 checksum in release folder.">
<condition>
<not>
<istrue value="${isMD5ok}" />
</not>
</condition>
</fail>
<mkdir dir="${backup.dir}/${thisday}" />
<copy file="${project.build.directory}/${release.file}.war"
todir="${backup.dir}/${thisday}" />
<checksum
file="${backup.dir}/${thisday}/${release.file}.war"
property="${md5}" verifyProperty="isMD5ok" />
<fail message="Wrong md5 checksum in release folder.">
<condition>
<not>
<istrue value="${isMD5ok}" />
</not>
</condition>
</fail>
</target>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<profiles>
...
</profiles>
<repositories>
<repository>
<id>central</id>
<url>https://repo.maven.apache.org/maven2/</url>
</repository>
<repository>
<id>jcenter</id>
<url>https://jcenter.bintray.com/</url>
</repository>
</repositories>
<dependencies>
...
</dependencies>
</project>
</code>
<code><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> <groupId>com.example</groupId> <artifactId>Example</artifactId> <version>0.1-SNAPSHOT</version> <packaging>war</packaging> <properties> <mavenVersion>3.3</mavenVersion> <springVersion>4.3.30.RELEASE</springVersion> <poi.version>3.17</poi.version> </properties> <build> <sourceDirectory>src</sourceDirectory> <finalName>${release.file}</finalName> <plugins> <plugin> <artifactId>maven-compiler-plugin</artifactId> <version>${mavenVersion}</version> <configuration> <source>1.8</source> <target>1.8</target> <fork>true</fork> <encoding>UTF-8</encoding> </configuration> </plugin> <plugin> <artifactId>maven-war-plugin</artifactId> <version>2.6</version> <configuration> <warSourceDirectory>${webContent}</warSourceDirectory> <failOnMissingWebXml>false</failOnMissingWebXml> </configuration> </plugin> <plugin> <artifactId>maven-assembly-plugin</artifactId> <version>3.0.0</version> <configuration> <descriptors> <descriptor>src/assembly/bin.xml</descriptor> </descriptors> </configuration> </plugin> <plugin> <artifactId>maven-antrun-plugin</artifactId> <version>1.8</version> <executions> <execution> <phase>package</phase> <configuration> <target> <tstamp> <format property="thisday" pattern="yyyyMMdd" locale="it,IT" unit="day" /> </tstamp> <copy file="${project.build.directory}/${release.file}.war" todir="${release.dir}/" /> <checksum file="${project.build.directory}/${release.file}.war" property="md5" /> <checksum file="${release.dir}/${release.file}.war" property="${md5}" verifyProperty="isMD5ok" /> <fail message="Wrong md5 checksum in release folder."> <condition> <not> <istrue value="${isMD5ok}" /> </not> </condition> </fail> <mkdir dir="${backup.dir}/${thisday}" /> <copy file="${project.build.directory}/${release.file}.war" todir="${backup.dir}/${thisday}" /> <checksum file="${backup.dir}/${thisday}/${release.file}.war" property="${md5}" verifyProperty="isMD5ok" /> <fail message="Wrong md5 checksum in release folder."> <condition> <not> <istrue value="${isMD5ok}" /> </not> </condition> </fail> </target> </configuration> <goals> <goal>run</goal> </goals> </execution> </executions> </plugin> </plugins> </build> <profiles> ... </profiles> <repositories> <repository> <id>central</id> <url>https://repo.maven.apache.org/maven2/</url> </repository> <repository> <id>jcenter</id> <url>https://jcenter.bintray.com/</url> </repository> </repositories> <dependencies> ... </dependencies> </project> </code>
<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>
    <groupId>com.example</groupId>
    <artifactId>Example</artifactId>
    <version>0.1-SNAPSHOT</version>
    <packaging>war</packaging>
    <properties>
        <mavenVersion>3.3</mavenVersion>
        <springVersion>4.3.30.RELEASE</springVersion>
        <poi.version>3.17</poi.version>
    </properties>

    <build>
        <sourceDirectory>src</sourceDirectory>
        <finalName>${release.file}</finalName>
        <plugins>
            <plugin>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>${mavenVersion}</version>
                <configuration>
                    <source>1.8</source>
                    <target>1.8</target>
                    <fork>true</fork>
                    <encoding>UTF-8</encoding>
                </configuration>
            </plugin>
            <plugin>
                <artifactId>maven-war-plugin</artifactId>
                <version>2.6</version>
                <configuration>
                    <warSourceDirectory>${webContent}</warSourceDirectory>
                    <failOnMissingWebXml>false</failOnMissingWebXml>
                </configuration>
            </plugin>
            <plugin>
                <artifactId>maven-assembly-plugin</artifactId>
                <version>3.0.0</version>
                <configuration>
                    <descriptors>
                        <descriptor>src/assembly/bin.xml</descriptor>
                    </descriptors>
                </configuration>
            </plugin>
            <plugin>
                <artifactId>maven-antrun-plugin</artifactId>
                <version>1.8</version>
                <executions>
                    <execution>
                        <phase>package</phase>
                        <configuration>
                            <target>
                                <tstamp>
                                    <format property="thisday" pattern="yyyyMMdd"
                                        locale="it,IT" unit="day" />
                                </tstamp>

                                <copy file="${project.build.directory}/${release.file}.war"
                                    todir="${release.dir}/" />
                                <checksum
                                    file="${project.build.directory}/${release.file}.war"
                                    property="md5" />
                                <checksum file="${release.dir}/${release.file}.war"
                                    property="${md5}" verifyProperty="isMD5ok" />

                                <fail message="Wrong md5 checksum in release folder.">
                                    <condition>
                                        <not>
                                            <istrue value="${isMD5ok}" />
                                        </not>
                                    </condition>
                                </fail>

                                <mkdir dir="${backup.dir}/${thisday}" />
                                <copy file="${project.build.directory}/${release.file}.war"
                                    todir="${backup.dir}/${thisday}" />
                                <checksum
                                    file="${backup.dir}/${thisday}/${release.file}.war"
                                    property="${md5}" verifyProperty="isMD5ok" />

                                <fail message="Wrong md5 checksum in release folder.">
                                    <condition>
                                        <not>
                                            <istrue value="${isMD5ok}" />
                                        </not>
                                    </condition>
                                </fail>

                            </target>
                        </configuration>
                        <goals>
                            <goal>run</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

    <profiles>
        ...
    </profiles>

    <repositories>
        <repository>
            <id>central</id>
            <url>https://repo.maven.apache.org/maven2/</url>
        </repository>
        <repository>
            <id>jcenter</id>
            <url>https://jcenter.bintray.com/</url>
        </repository>
    </repositories>

    <dependencies>
        ...
    </dependencies>
</project>

As a side note, my coworkers have the same project, but with different IntelliJ version, and they have no problem with it.

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật