Всем привет, при сборке проекта мавеном возникает ...
# russian
a
Всем привет, при сборке проекта мавеном возникает ошибка
Copy code
[ERROR] Failed to execute goal org.jetbrains.kotlin:kotlin-maven-plugin:1.3.20:compile (compile) on project common: Plugin not found: spring: java.util.NoSuchElementException
[ERROR] role: org.jetbrains.kotlin.maven.KotlinMavenPluginExtension
[ERROR] roleHint: spring
Сам плагин подключаю вот так
Copy code
<build>
        <sourceDirectory>src/main/kotlin</sourceDirectory>
        <testSourceDirectory>src/test/kotlin</testSourceDirectory>

        <plugins>
            <plugin>
                <groupId>org.jetbrains.kotlin</groupId>
                <artifactId>kotlin-maven-plugin</artifactId>
                <version>${kotlin.version}</version>
                <configuration>
                    <args>
                        <arg>-Xjsr305=strict</arg>
                    </args>
                    <compilerPlugins>
                        <plugin>spring</plugin>
                    </compilerPlugins>
                </configuration>
                <executions>
                    <execution>
                        <id>compile</id>
                        <goals>
                            <goal>compile</goal>
                        </goals>
                    </execution>

                    <execution>
                        <id>test-compile</id>
                        <goals>
                            <goal>test-compile</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
           ...
        </plugins>
    </build>
В чем может быть проблема? Куда смотреть?
i
Нет dependency внутри plugin.
Copy code
<dependencies>
        <dependency>
            <groupId>org.jetbrains.kotlin</groupId>
            <artifactId>kotlin-maven-allopen</artifactId>
            <version>${kotlin.version}</version>
        </dependency>
    </dependencies>
https://kotlinlang.org/docs/reference/compiler-plugins.html
👍 1
a
Спасибо!