无法执行 com.github.eirslett

cja*_*475 5 java spring intellij-idea reactjs

我最近开始学习https://spring.io/guides/tutorials/react-and-spring-data-rest/教程,但我陷入了“加载 JavaScript 模块示例 8”。当我添加:

<plugin>
    <groupId>com.github.eirslett</groupId>
    <artifactId>frontend-maven-plugin</artifactId>
</plugin> 
Run Code Online (Sandbox Code Playgroud)

对于 pom.xml,它将其突出显示为红色,并显示Plugin 'com.github.eirslett:frontend-maven-plugin:' not found。我希望有人能提供帮助。谢谢。

Sve*_*nov 3

将其添加到插件中解决了我的问题。

        <plugin>
        <groupId>com.github.eirslett</groupId>
        <artifactId>frontend-maven-plugin</artifactId>
        <configuration>
            <installDirectory>target</installDirectory>
        </configuration>
        <executions>
            <execution>
                <id>install node and npm</id>
                <goals>
                    <goal>install-node-and-npm</goal>
                </goals>
                <configuration>
                    <nodeVersion>v12.19.0</nodeVersion>
                    <npmVersion>6.14.8</npmVersion>
                </configuration>
            </execution>
            <execution>
                <id>npm install</id>
                <goals>
                    <goal>npm</goal>
                </goals>
                <configuration>
                    <arguments>install</arguments>
                </configuration>
            </execution>
            <execution>
                <id>webpack build</id>
                <goals>
                    <goal>webpack</goal>
                </goals>
            </execution>
        </executions>
    </plugin>
Run Code Online (Sandbox Code Playgroud)