我想建立使用彈簧啓動一個Web應用程序和反應JS(跟着教程here)。 在pom.xml中我加:無法讀取的org.apache.maven.plugins神器描述:Maven的資源 - 插件:罐子:3.0.5
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>3.0.5</version>
<executions>
<execution>
<id>Copy frontend production build to resources</id>
<phase>package</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${basedir}/target/classes</outputDirectory>
<resources>
<resource>
<directory>src/main/app/build/</directory>
<filtering>true</filtering>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
當執行MVN清潔套裝,我得到以下錯誤。 Maven版本是3.0.5。
Plugin org.apache.maven.plugins:maven-resources-plugin:3.0.5 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-resources-plugin:jar:3.0.5: Failure to find org.apache.maven.plugins:maven-resources-plugin:pom:3.0.5 in http://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced
編輯: 我已在在Maven的資源 - 插件標籤,Maven的版本改爲3.0.2,但現在我得到的錯誤:
<plugin>
<groupId>com.github.eirslett</groupId>
<artifactId>frontend-maven-plugin</artifactId>
<version>1.2</version>
<executions>
<execution>
<id>Install Node and Yarn</id>
<goals>
<goal>install-node-and-yarn</goal>
</goals>
</execution>
<execution>
<id>yarn install</id>
<goals>
<goal>yarn</goal>
</goals>
<configuration>
<arguments>install</arguments>
</configuration>
</execution>
<execution>
<id>Frontend production build</id>
<phase>package</phase>
<goals>
<goal>yarn</goal>
</goals>
<configuration>
<arguments>run build</arguments>
</configuration>
</execution>
</executions>
<configuration>
<nodeVersion>v7.2.0</nodeVersion>
<yarnVersion>v0.18.0</yarnVersion>
<installDirectory>.mvn</installDirectory>
<workingDirectory>src/main/app</workingDirectory>
</configuration>
</plugin>
錯誤:
[ERROR] Failed to execute goal com.github.eirslett:frontend-maven-plugin:1.2:install-node-and-yarn (Install Node and Yarn) on project ema: The plugin com.github.eirslett:frontend-maven-plugin:1.2 requires Maven version 3.1.0 -> [Help 1]
您需要更改版本3.0.2,因爲它是最新的。之後,你需要使用MVN包-U,例如重啓Maven構建。 -U將重新下載您的依賴關係。 – Sarief
也在教程中使用3.0.1版本,所以你可能需要該版本。 – Sarief