[英]Quarkus pom file with two errors from Getting started project
今天我開始研究 Quarkus 並關注入門項目。 使用 maven 創建項目后:
mvn io.quarkus:quarkus-maven-plugin:1.9.2.Final:create \
-DprojectGroupId=org.acme \
-DprojectArtifactId=getting-started \
-DclassName="org.acme.getting.started.GreetingResource" \
-Dpath="/hello"
並導入到 Eclipse 中,我有兩個錯誤:
說明 資源路徑 位置 類型 生命周期配置未涵蓋的插件執行:io.quarkus:quarkus-maven-plugin:1.9.2.Final:generate-code (execution: default, phase: generate-sources) pom.xml /getting-started第 57 行 Maven 項目構建生命周期映射問題
錯誤指向 pom 文件的構建部分,並且標記執行突出顯示為紅色:
<build>
<plugins>
<plugin>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-maven-plugin</artifactId>
<version>${quarkus-plugin.version}</version>
<executions>
<execution>
<goals>
<goal>generate-code</goal>
<goal>generate-code-tests</goal>
<goal>build</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>${compiler-plugin.version}</version>
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>${surefire-plugin.version}</version>
<configuration>
<systemPropertyVariables>
<java.util.logging.manager>org.jboss.logmanager.LogManager</java.util.logging.manager>
<maven.home>${maven.home}</maven.home>
</systemPropertyVariables>
</configuration>
</plugin>
</plugins>
</build>
我嘗試在 plugins 標記之間包含“pluginManagement”,如下所示,錯誤消失了:
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-maven-plugin</artifactId>
<version>${quarkus-plugin.version}</version>
<executions>
<execution>
<goals>
<goal>generate-code</goal>
<goal>generate-code-tests</goal>
<goal>build</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>${compiler-plugin.version}</version>
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>${surefire-plugin.version}</version>
<configuration>
<systemPropertyVariables>
<java.util.logging.manager>org.jboss.logmanager.LogManager</java.util.logging.manager>
<maven.home>${maven.home}</maven.home>
</systemPropertyVariables>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
但是當運行應用程序時:
./mvnw 編譯 quarkus:dev
它沒有運行。 我不得不刪除 PluginManagement 和一切恢復工作,但在紅色相同的錯誤
就我而言,出現該問題是因為端口 8080 正忙於另一台服務器。 當我將使用的端口更改為另一個時,Quarqus 成功啟動到 8080。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.