首页 > 解决方案 > 带有 Kotlin 类和 Lombok 的 Spring Boot 项目的包不存在

问题描述

我不确定 Lombok 是否与此有关,因为我没有在任何 Kotlin 文件中使用它们的注释。

聚甲醛

<?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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>2.5.3</version>
        <relativePath/> <!-- lookup parent from repository -->
    </parent>
    <groupId>org.cas.eo.contentacq</groupId>
    <artifactId>content-acq-copper-manifest-writer</artifactId>
    <version>0.0.1-SNAPSHOT</version>
    <name>content-acq-copper-manifest-writer</name>
    <properties>
        <java.version>11</java.version>
        <kotlin.version>1.5.30-M1</kotlin.version>
    </properties>

    <dependencies>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter</artifactId>
        </dependency>

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-devtools</artifactId>
            <scope>runtime</scope>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>com.h2database</groupId>
            <artifactId>h2</artifactId>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-configuration-processor</artifactId>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>org.projectlombok</groupId>
            <artifactId>lombok</artifactId>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-test</artifactId>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-jdbc</artifactId>
        </dependency>

        <dependency>
            <groupId>org.cas.eo.contentacq.dbresources</groupId>
            <artifactId>dbresources-client</artifactId>
            <version>2.8.1</version>
        </dependency>

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-validation</artifactId>
        </dependency>

        <dependency>
            <groupId>com.oracle</groupId>
            <artifactId>ojdbc6</artifactId>
            <version>11.2.0.2.0</version>
        </dependency>
        <dependency>
            <groupId>org.jetbrains.kotlin</groupId>
            <artifactId>kotlin-stdlib-jdk8</artifactId>
            <version>${kotlin.version}</version>
        </dependency>
        <dependency>
            <groupId>org.jetbrains.kotlin</groupId>
            <artifactId>kotlin-test</artifactId>
            <version>${kotlin.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.jetbrains.kotlin</groupId>
            <artifactId>kotlin-stdlib-jdk8</artifactId>
            <version>${kotlin.version}</version>
        </dependency>
        
        <dependency>
            <groupId>com.fasterxml.jackson.module</groupId>
            <artifactId>jackson-module-kotlin</artifactId>
            <version>2.13.0-rc1</version>
        </dependency>
        
    </dependencies>

    <build>
        <plugins>

            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
                <configuration>
                    <excludes>
                        <exclude>
                            <groupId>org.projectlombok</groupId>
                            <artifactId>lombok</artifactId>
                        </exclude>
                    </excludes>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.jetbrains.kotlin</groupId>
                <artifactId>kotlin-maven-plugin</artifactId>
                <version>${kotlin.version}</version>
                <executions>
                    <execution>
                        <id>compile</id>
                        <phase>compile</phase>
                        <goals>
                            <goal>compile</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>test-compile</id>
                        <phase>test-compile</phase>
                        <goals>
                            <goal>test-compile</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <jvmTarget>1.8</jvmTarget>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <executions>
                    <execution>
                        <id>compile</id>
                        <phase>compile</phase>
                        <goals>
                            <goal>compile</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>testCompile</id>
                        <phase>test-compile</phase>
                        <goals>
                            <goal>testCompile</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

</project>

mvn package输出

[INFO] Scanning for projects...
[INFO]
[INFO] ------< org.cas.eo.contentacq:content-acq-copper-manifest-writer >------
[INFO] Building content-acq-copper-manifest-writer 0.0.1-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- maven-resources-plugin:3.2.0:resources (default-resources) @ content-acq-copper-manifest-writer ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Using 'UTF-8' encoding to copy filtered properties files.
[INFO] Copying 1 resource
[INFO] Copying 2 resources
[INFO]
[INFO] --- maven-compiler-plugin:3.8.1:compile (default-compile) @ content-acq-copper-manifest-writer ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 6 source files to C:\Users\mxf63\gitrepo\content-acq-copper-manifest-writer\target\classes
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] /C:/Users/mxf63/gitrepo/content-acq-copper-manifest-writer/src/main/java/org/cas/eo/contentacq/contentacqcoppermanifestwriter/Controller.java:[5,66] package org.cas.eo.contentacq.contentacqcoppermanifestwriter.model does not exist
[ERROR] /C:/Users/mxf63/gitrepo/content-acq-copper-manifest-writer/src/main/java/org/cas/eo/contentacq/contentacqcoppermanifestwriter/Controller.java:[6,66] package org.cas.eo.contentacq.contentacqcoppermanifestwriter.model does not exist
[ERROR] /C:/Users/mxf63/gitrepo/content-acq-copper-manifest-writer/src/main/java/org/cas/eo/contentacq/contentacqcoppermanifestwriter/Controller.java:[7,66] package org.cas.eo.contentacq.contentacqcoppermanifestwriter.props does not exist
[ERROR] /C:/Users/mxf63/gitrepo/content-acq-copper-manifest-writer/src/main/java/org/cas/eo/contentacq/contentacqcoppermanifestwriter/Controller.java:[8,66] package org.cas.eo.contentacq.contentacqcoppermanifestwriter.props does not exist
[ERROR] /C:/Users/mxf63/gitrepo/content-acq-copper-manifest-writer/src/main/java/org/cas/eo/contentacq/contentacqcoppermanifestwriter/Controller.java:[10,68] package org.cas.eo.contentacq.contentacqcoppermanifestwriter.service does not exist
[ERROR] /C:/Users/mxf63/gitrepo/content-acq-copper-manifest-writer/src/main/java/org/cas/eo/contentacq/contentacqcoppermanifestwriter/Controller.java:[11,68] package org.cas.eo.contentacq.contentacqcoppermanifestwriter.service does not exist
[ERROR] /C:/Users/mxf63/gitrepo/content-acq-copper-manifest-writer/src/main/java/org/cas/eo/contentacq/contentacqcoppermanifestwriter/utils/Logging.java:[4,66] package org.cas.eo.contentacq.contentacqcoppermanifestwriter.model does not exist
[ERROR] /C:/Users/mxf63/gitrepo/content-acq-copper-manifest-writer/src/main/java/org/cas/eo/contentacq/contentacqcoppermanifestwriter/Controller.java:[25,19] cannot find symbol
  symbol:   class ProcessProps
  location: class org.cas.eo.contentacq.contentacqcoppermanifestwriter.Controller
[ERROR] /C:/Users/mxf63/gitrepo/content-acq-copper-manifest-writer/src/main/java/org/cas/eo/contentacq/contentacqcoppermanifestwriter/Controller.java:[26,19] cannot find symbol
  symbol:   class AltRunProps
  location: class org.cas.eo.contentacq.contentacqcoppermanifestwriter.Controller
[ERROR] /C:/Users/mxf63/gitrepo/content-acq-copper-manifest-writer/src/main/java/org/cas/eo/contentacq/contentacqcoppermanifestwriter/Controller.java:[27,19] cannot find symbol
  symbol:   class JSONWriter
  location: class org.cas.eo.contentacq.contentacqcoppermanifestwriter.Controller
[ERROR] /C:/Users/mxf63/gitrepo/content-acq-copper-manifest-writer/src/main/java/org/cas/eo/contentacq/contentacqcoppermanifestwriter/repo/CopperRepository.java:[5,66] package org.cas.eo.contentacq.contentacqcoppermanifestwriter.model does not exist
[ERROR] /C:/Users/mxf63/gitrepo/content-acq-copper-manifest-writer/src/main/java/org/cas/eo/contentacq/contentacqcoppermanifestwriter/repo/CopperRepository.java:[6,66] package org.cas.eo.contentacq.contentacqcoppermanifestwriter.model does not exist
[ERROR] /C:/Users/mxf63/gitrepo/content-acq-copper-manifest-writer/src/main/java/org/cas/eo/contentacq/contentacqcoppermanifestwriter/repo/CopperRepository.java:[7,66] package org.cas.eo.contentacq.contentacqcoppermanifestwriter.model does not exist
[ERROR] /C:/Users/mxf63/gitrepo/content-acq-copper-manifest-writer/src/main/java/org/cas/eo/contentacq/contentacqcoppermanifestwriter/repo/CopperRepository.java:[8,66] package org.cas.eo.contentacq.contentacqcoppermanifestwriter.model does not exist
[ERROR] /C:/Users/mxf63/gitrepo/content-acq-copper-manifest-writer/src/main/java/org/cas/eo/contentacq/contentacqcoppermanifestwriter/repo/CopperRepository.java:[9,66] package org.cas.eo.contentacq.contentacqcoppermanifestwriter.props does not exist
[ERROR] /C:/Users/mxf63/gitrepo/content-acq-copper-manifest-writer/src/main/java/org/cas/eo/contentacq/contentacqcoppermanifestwriter/repo/CopperRepository.java:[10,66] package org.cas.eo.contentacq.contentacqcoppermanifestwriter.props does not exist
[ERROR] /C:/Users/mxf63/gitrepo/content-acq-copper-manifest-writer/src/main/java/org/cas/eo/contentacq/contentacqcoppermanifestwriter/Controller.java:[30,19] cannot find symbol
  symbol:   class TANProcessor
  location: class org.cas.eo.contentacq.contentacqcoppermanifestwriter.Controller
[ERROR] /C:/Users/mxf63/gitrepo/content-acq-copper-manifest-writer/src/main/java/org/cas/eo/contentacq/contentacqcoppermanifestwriter/Controller.java:[69,58] cannot find symbol
  symbol:   class EndInfo
  location: class org.cas.eo.contentacq.contentacqcoppermanifestwriter.Controller
[ERROR] /C:/Users/mxf63/gitrepo/content-acq-copper-manifest-writer/src/main/java/org/cas/eo/contentacq/contentacqcoppermanifestwriter/Controller.java:[21,1] cannot find symbol
  symbol:   class ProcessProps
  location: class org.cas.eo.contentacq.contentacqcoppermanifestwriter.Controller
[ERROR] /C:/Users/mxf63/gitrepo/content-acq-copper-manifest-writer/src/main/java/org/cas/eo/contentacq/contentacqcoppermanifestwriter/repo/CopperRepository.java:[28,19] cannot find symbol
  symbol:   class ProcessProps
  location: class org.cas.eo.contentacq.contentacqcoppermanifestwriter.repo.CopperRepository
[ERROR] /C:/Users/mxf63/gitrepo/content-acq-copper-manifest-writer/src/main/java/org/cas/eo/contentacq/contentacqcoppermanifestwriter/repo/CopperRepository.java:[29,19] cannot find symbol
  symbol:   class ManifestProps
  location: class org.cas.eo.contentacq.contentacqcoppermanifestwriter.repo.CopperRepository
[ERROR] /C:/Users/mxf63/gitrepo/content-acq-copper-manifest-writer/src/main/java/org/cas/eo/contentacq/contentacqcoppermanifestwriter/repo/CopperRepository.java:[31,17] cannot find symbol
  symbol:   class StartInfo
  location: class org.cas.eo.contentacq.contentacqcoppermanifestwriter.repo.CopperRepository
[ERROR] /C:/Users/mxf63/gitrepo/content-acq-copper-manifest-writer/src/main/java/org/cas/eo/contentacq/contentacqcoppermanifestwriter/repo/CopperRepository.java:[70,17] cannot find symbol
  symbol:   class StartInfo
  location: class org.cas.eo.contentacq.contentacqcoppermanifestwriter.repo.CopperRepository
[ERROR] /C:/Users/mxf63/gitrepo/content-acq-copper-manifest-writer/src/main/java/org/cas/eo/contentacq/contentacqcoppermanifestwriter/repo/CopperRepository.java:[111,13] cannot find symbol
  symbol:   class StartInfo
  location: class org.cas.eo.contentacq.contentacqcoppermanifestwriter.repo.CopperRepository
[ERROR] /C:/Users/mxf63/gitrepo/content-acq-copper-manifest-writer/src/main/java/org/cas/eo/contentacq/contentacqcoppermanifestwriter/repo/CopperRepository.java:[132,49] cannot find symbol
  symbol:   class StartInfo
  location: class org.cas.eo.contentacq.contentacqcoppermanifestwriter.repo.CopperRepository
[ERROR] /C:/Users/mxf63/gitrepo/content-acq-copper-manifest-writer/src/main/java/org/cas/eo/contentacq/contentacqcoppermanifestwriter/repo/CopperRepository.java:[152,55] cannot find symbol
  symbol:   class EndInfo
  location: class org.cas.eo.contentacq.contentacqcoppermanifestwriter.repo.CopperRepository
[ERROR] /C:/Users/mxf63/gitrepo/content-acq-copper-manifest-writer/src/main/java/org/cas/eo/contentacq/contentacqcoppermanifestwriter/repo/CopperRepository.java:[166,55] cannot find symbol
  symbol:   class EndInfo
  location: class org.cas.eo.contentacq.contentacqcoppermanifestwriter.repo.CopperRepository
[ERROR] /C:/Users/mxf63/gitrepo/content-acq-copper-manifest-writer/src/main/java/org/cas/eo/contentacq/contentacqcoppermanifestwriter/repo/CopperRepository.java:[180,55] cannot find symbol
  symbol:   class EndInfo
  location: class org.cas.eo.contentacq.contentacqcoppermanifestwriter.repo.CopperRepository
[ERROR] /C:/Users/mxf63/gitrepo/content-acq-copper-manifest-writer/src/main/java/org/cas/eo/contentacq/contentacqcoppermanifestwriter/repo/CopperRepository.java:[25,1] cannot find symbol
  symbol:   class ProcessProps
  location: class org.cas.eo.contentacq.contentacqcoppermanifestwriter.repo.CopperRepository
[ERROR] /C:/Users/mxf63/gitrepo/content-acq-copper-manifest-writer/src/main/java/org/cas/eo/contentacq/contentacqcoppermanifestwriter/utils/Logging.java:[24,40] cannot find symbol
  symbol:   class EndInfo
  location: class org.cas.eo.contentacq.contentacqcoppermanifestwriter.utils.Logging
[ERROR] /C:/Users/mxf63/gitrepo/content-acq-copper-manifest-writer/src/main/java/org/cas/eo/contentacq/contentacqcoppermanifestwriter/Application.java:[4,66] package org.cas.eo.contentacq.contentacqcoppermanifestwriter.props does not exist
[ERROR] /C:/Users/mxf63/gitrepo/content-acq-copper-manifest-writer/src/main/java/org/cas/eo/contentacq/contentacqcoppermanifestwriter/Application.java:[5,66] package org.cas.eo.contentacq.contentacqcoppermanifestwriter.props does not exist
[ERROR] /C:/Users/mxf63/gitrepo/content-acq-copper-manifest-writer/src/main/java/org/cas/eo/contentacq/contentacqcoppermanifestwriter/utils/ManifestSerializer.java:[7,66] package org.cas.eo.contentacq.contentacqcoppermanifestwriter.model does not exist
[ERROR] /C:/Users/mxf63/gitrepo/content-acq-copper-manifest-writer/src/main/java/org/cas/eo/contentacq/contentacqcoppermanifestwriter/utils/ManifestSerializer.java:[11,55] cannot find symbol
  symbol: class Manifest
[ERROR] /C:/Users/mxf63/gitrepo/content-acq-copper-manifest-writer/src/main/java/org/cas/eo/contentacq/contentacqcoppermanifestwriter/utils/ManifestSerializer.java:[16,37] cannot find symbol
  symbol:   class Manifest
  location: class org.cas.eo.contentacq.contentacqcoppermanifestwriter.utils.ManifestSerializer
[ERROR] /C:/Users/mxf63/gitrepo/content-acq-copper-manifest-writer/src/main/java/org/cas/eo/contentacq/contentacqcoppermanifestwriter/utils/ManifestSerializer.java:[21,27] cannot find symbol
  symbol:   class Manifest
  location: class org.cas.eo.contentacq.contentacqcoppermanifestwriter.utils.ManifestSerializer
[INFO] 36 errors
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  5.606 s
[INFO] Finished at: 2021-07-30T08:56:35-04:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile) on project content-acq-copper-manifest-writer: Compilation failure: Compilation failure:
[ERROR] /C:/Users/mxf63/gitrepo/content-acq-copper-manifest-writer/src/main/java/org/cas/eo/contentacq/contentacqcoppermanifestwriter/Controller.java:[5,66] package org.cas.eo.contentacq.contentacqcoppermanifestwriter.model does not exist
[ERROR] /C:/Users/mxf63/gitrepo/content-acq-copper-manifest-writer/src/main/java/org/cas/eo/contentacq/contentacqcoppermanifestwriter/Controller.java:[6,66] package org.cas.eo.contentacq.contentacqcoppermanifestwriter.model does not exist
[ERROR] /C:/Users/mxf63/gitrepo/content-acq-copper-manifest-writer/src/main/java/org/cas/eo/contentacq/contentacqcoppermanifestwriter/Controller.java:[7,66] package org.cas.eo.contentacq.contentacqcoppermanifestwriter.props does not exist
[ERROR] /C:/Users/mxf63/gitrepo/content-acq-copper-manifest-writer/src/main/java/org/cas/eo/contentacq/contentacqcoppermanifestwriter/Controller.java:[8,66] package org.cas.eo.contentacq.contentacqcoppermanifestwriter.props does not exist
[ERROR] /C:/Users/mxf63/gitrepo/content-acq-copper-manifest-writer/src/main/java/org/cas/eo/contentacq/contentacqcoppermanifestwriter/Controller.java:[10,68] package org.cas.eo.contentacq.contentacqcoppermanifestwriter.service does not exist
[ERROR] /C:/Users/mxf63/gitrepo/content-acq-copper-manifest-writer/src/main/java/org/cas/eo/contentacq/contentacqcoppermanifestwriter/Controller.java:[11,68] package org.cas.eo.contentacq.contentacqcoppermanifestwriter.service does not exist
[ERROR] /C:/Users/mxf63/gitrepo/content-acq-copper-manifest-writer/src/main/java/org/cas/eo/contentacq/contentacqcoppermanifestwriter/utils/Logging.java:[4,66] package org.cas.eo.contentacq.contentacqcoppermanifestwriter.model does not exist
[ERROR] /C:/Users/mxf63/gitrepo/content-acq-copper-manifest-writer/src/main/java/org/cas/eo/contentacq/contentacqcoppermanifestwriter/Controller.java:[25,19] cannot find symbol
[ERROR]   symbol:   class ProcessProps
[ERROR]   location: class org.cas.eo.contentacq.contentacqcoppermanifestwriter.Controller
[ERROR] /C:/Users/mxf63/gitrepo/content-acq-copper-manifest-writer/src/main/java/org/cas/eo/contentacq/contentacqcoppermanifestwriter/Controller.java:[26,19] cannot find symbol
[ERROR]   symbol:   class AltRunProps
[ERROR]   location: class org.cas.eo.contentacq.contentacqcoppermanifestwriter.Controller
[ERROR] /C:/Users/mxf63/gitrepo/content-acq-copper-manifest-writer/src/main/java/org/cas/eo/contentacq/contentacqcoppermanifestwriter/Controller.java:[27,19] cannot find symbol
[ERROR]   symbol:   class JSONWriter
[ERROR]   location: class org.cas.eo.contentacq.contentacqcoppermanifestwriter.Controller
[ERROR] /C:/Users/mxf63/gitrepo/content-acq-copper-manifest-writer/src/main/java/org/cas/eo/contentacq/contentacqcoppermanifestwriter/repo/CopperRepository.java:[5,66] package org.cas.eo.contentacq.contentacqcoppermanifestwriter.model does not exist
[ERROR] /C:/Users/mxf63/gitrepo/content-acq-copper-manifest-writer/src/main/java/org/cas/eo/contentacq/contentacqcoppermanifestwriter/repo/CopperRepository.java:[6,66] package org.cas.eo.contentacq.contentacqcoppermanifestwriter.model does not exist
[ERROR] /C:/Users/mxf63/gitrepo/content-acq-copper-manifest-writer/src/main/java/org/cas/eo/contentacq/contentacqcoppermanifestwriter/repo/CopperRepository.java:[7,66] package org.cas.eo.contentacq.contentacqcoppermanifestwriter.model does not exist
[ERROR] /C:/Users/mxf63/gitrepo/content-acq-copper-manifest-writer/src/main/java/org/cas/eo/contentacq/contentacqcoppermanifestwriter/repo/CopperRepository.java:[8,66] package org.cas.eo.contentacq.contentacqcoppermanifestwriter.model does not exist
[ERROR] /C:/Users/mxf63/gitrepo/content-acq-copper-manifest-writer/src/main/java/org/cas/eo/contentacq/contentacqcoppermanifestwriter/repo/CopperRepository.java:[9,66] package org.cas.eo.contentacq.contentacqcoppermanifestwriter.props does not exist
[ERROR] /C:/Users/mxf63/gitrepo/content-acq-copper-manifest-writer/src/main/java/org/cas/eo/contentacq/contentacqcoppermanifestwriter/repo/CopperRepository.java:[10,66] package org.cas.eo.contentacq.contentacqcoppermanifestwriter.props does not exist
[ERROR] /C:/Users/mxf63/gitrepo/content-acq-copper-manifest-writer/src/main/java/org/cas/eo/contentacq/contentacqcoppermanifestwriter/Controller.java:[30,19] cannot find symbol
[ERROR]   symbol:   class TANProcessor
[ERROR]   location: class org.cas.eo.contentacq.contentacqcoppermanifestwriter.Controller
[ERROR] /C:/Users/mxf63/gitrepo/content-acq-copper-manifest-writer/src/main/java/org/cas/eo/contentacq/contentacqcoppermanifestwriter/Controller.java:[69,58] cannot find symbol
[ERROR]   symbol:   class EndInfo
[ERROR]   location: class org.cas.eo.contentacq.contentacqcoppermanifestwriter.Controller
[ERROR] /C:/Users/mxf63/gitrepo/content-acq-copper-manifest-writer/src/main/java/org/cas/eo/contentacq/contentacqcoppermanifestwriter/Controller.java:[21,1] cannot find symbol
[ERROR]   symbol:   class ProcessProps
[ERROR]   location: class org.cas.eo.contentacq.contentacqcoppermanifestwriter.Controller
[ERROR] /C:/Users/mxf63/gitrepo/content-acq-copper-manifest-writer/src/main/java/org/cas/eo/contentacq/contentacqcoppermanifestwriter/repo/CopperRepository.java:[28,19] cannot find symbol
[ERROR]   symbol:   class ProcessProps
[ERROR]   location: class org.cas.eo.contentacq.contentacqcoppermanifestwriter.repo.CopperRepository
[ERROR] /C:/Users/mxf63/gitrepo/content-acq-copper-manifest-writer/src/main/java/org/cas/eo/contentacq/contentacqcoppermanifestwriter/repo/CopperRepository.java:[29,19] cannot find symbol
[ERROR]   symbol:   class ManifestProps
[ERROR]   location: class org.cas.eo.contentacq.contentacqcoppermanifestwriter.repo.CopperRepository
[ERROR] /C:/Users/mxf63/gitrepo/content-acq-copper-manifest-writer/src/main/java/org/cas/eo/contentacq/contentacqcoppermanifestwriter/repo/CopperRepository.java:[31,17] cannot find symbol
[ERROR]   symbol:   class StartInfo
[ERROR]   location: class org.cas.eo.contentacq.contentacqcoppermanifestwriter.repo.CopperRepository
[ERROR] /C:/Users/mxf63/gitrepo/content-acq-copper-manifest-writer/src/main/java/org/cas/eo/contentacq/contentacqcoppermanifestwriter/repo/CopperRepository.java:[70,17] cannot find symbol
[ERROR]   symbol:   class StartInfo
[ERROR]   location: class org.cas.eo.contentacq.contentacqcoppermanifestwriter.repo.CopperRepository
[ERROR] /C:/Users/mxf63/gitrepo/content-acq-copper-manifest-writer/src/main/java/org/cas/eo/contentacq/contentacqcoppermanifestwriter/repo/CopperRepository.java:[111,13] cannot find symbol
[ERROR]   symbol:   class StartInfo
[ERROR]   location: class org.cas.eo.contentacq.contentacqcoppermanifestwriter.repo.CopperRepository
[ERROR] /C:/Users/mxf63/gitrepo/content-acq-copper-manifest-writer/src/main/java/org/cas/eo/contentacq/contentacqcoppermanifestwriter/repo/CopperRepository.java:[132,49] cannot find symbol
[ERROR]   symbol:   class StartInfo
[ERROR]   location: class org.cas.eo.contentacq.contentacqcoppermanifestwriter.repo.CopperRepository
[ERROR] /C:/Users/mxf63/gitrepo/content-acq-copper-manifest-writer/src/main/java/org/cas/eo/contentacq/contentacqcoppermanifestwriter/repo/CopperRepository.java:[152,55] cannot find symbol
[ERROR]   symbol:   class EndInfo
[ERROR]   location: class org.cas.eo.contentacq.contentacqcoppermanifestwriter.repo.CopperRepository
[ERROR] /C:/Users/mxf63/gitrepo/content-acq-copper-manifest-writer/src/main/java/org/cas/eo/contentacq/contentacqcoppermanifestwriter/repo/CopperRepository.java:[166,55] cannot find symbol
[ERROR]   symbol:   class EndInfo
[ERROR]   location: class org.cas.eo.contentacq.contentacqcoppermanifestwriter.repo.CopperRepository
[ERROR] /C:/Users/mxf63/gitrepo/content-acq-copper-manifest-writer/src/main/java/org/cas/eo/contentacq/contentacqcoppermanifestwriter/repo/CopperRepository.java:[180,55] cannot find symbol
[ERROR]   symbol:   class EndInfo
[ERROR]   location: class org.cas.eo.contentacq.contentacqcoppermanifestwriter.repo.CopperRepository
[ERROR] /C:/Users/mxf63/gitrepo/content-acq-copper-manifest-writer/src/main/java/org/cas/eo/contentacq/contentacqcoppermanifestwriter/repo/CopperRepository.java:[25,1] cannot find symbol
[ERROR]   symbol:   class ProcessProps
[ERROR]   location: class org.cas.eo.contentacq.contentacqcoppermanifestwriter.repo.CopperRepository
[ERROR] /C:/Users/mxf63/gitrepo/content-acq-copper-manifest-writer/src/main/java/org/cas/eo/contentacq/contentacqcoppermanifestwriter/utils/Logging.java:[24,40] cannot find symbol
[ERROR]   symbol:   class EndInfo
[ERROR]   location: class org.cas.eo.contentacq.contentacqcoppermanifestwriter.utils.Logging
[ERROR] /C:/Users/mxf63/gitrepo/content-acq-copper-manifest-writer/src/main/java/org/cas/eo/contentacq/contentacqcoppermanifestwriter/Application.java:[4,66] package org.cas.eo.contentacq.contentacqcoppermanifestwriter.props does not exist
[ERROR] /C:/Users/mxf63/gitrepo/content-acq-copper-manifest-writer/src/main/java/org/cas/eo/contentacq/contentacqcoppermanifestwriter/Application.java:[5,66] package org.cas.eo.contentacq.contentacqcoppermanifestwriter.props does not exist
[ERROR] /C:/Users/mxf63/gitrepo/content-acq-copper-manifest-writer/src/main/java/org/cas/eo/contentacq/contentacqcoppermanifestwriter/utils/ManifestSerializer.java:[7,66] package org.cas.eo.contentacq.contentacqcoppermanifestwriter.model does not exist
[ERROR] /C:/Users/mxf63/gitrepo/content-acq-copper-manifest-writer/src/main/java/org/cas/eo/contentacq/contentacqcoppermanifestwriter/utils/ManifestSerializer.java:[11,55] cannot find symbol
[ERROR]   symbol: class Manifest
[ERROR] /C:/Users/mxf63/gitrepo/content-acq-copper-manifest-writer/src/main/java/org/cas/eo/contentacq/contentacqcoppermanifestwriter/utils/ManifestSerializer.java:[16,37] cannot find symbol
[ERROR]   symbol:   class Manifest
[ERROR]   location: class org.cas.eo.contentacq.contentacqcoppermanifestwriter.utils.ManifestSerializer
[ERROR] /C:/Users/mxf63/gitrepo/content-acq-copper-manifest-writer/src/main/java/org/cas/eo/contentacq/contentacqcoppermanifestwriter/utils/ManifestSerializer.java:[21,27] cannot find symbol
[ERROR]   symbol:   class Manifest
[ERROR]   location: class org.cas.eo.contentacq.contentacqcoppermanifestwriter.utils.ManifestSerializer
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException

每个找不到的“符号”都是一个 Kotlin 文件,而找不到的位置是常规的 Java 文件。在 Kotlin 文件引用其他 Kotlin 文件的情况下,不会出现明显错误。请注意,代码在 IntelliJ 中运行良好。我注意到 IntelliJ 中的符号在某些 Kotlin 文件之间有所不同,有些以“.kt”为后缀,而另一些则没有:

IntelliJ 项目结构

标签: javaspring-bootmavenkotlinlombok

解决方案


推荐阅读