简体   繁体   English

Quarkus pom 文件,来自入门项目的两个错误

[英]Quarkus pom file with two errors from Getting started project

Today I started looking at Quarkus and following the Getting Started project.今天我开始研究 Quarkus 并关注入门项目。 After created the project using maven:使用 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"

and import into Eclipse, I'm having two errors as:并导入到 Eclipse 中,我有两个错误:

Description Resource Path Location Type Plugin execution not covered by lifecycle configuration: io.quarkus:quarkus-maven-plugin:1.9.2.Final:generate-code (execution: default, phase: generate-sources) pom.xml /getting-started line 57 Maven Project Build Lifecycle Mapping Problem说明 资源路径 位置 类型 生命周期配置未涵盖的插件执行:io.quarkus:quarkus-maven-plugin:1.9.2.Final:generate-code (execution: default, phase: generate-sources) pom.xml /getting-started第 57 行 Maven 项目构建生命周期映射问题

The error is pointing to the build section of the pom file and the tag execution is highlighted as red:错误指向 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>

I tried to include the 'pluginManagement' between the plugins tag as below and the error disappeared:我尝试在 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>

but when running the app as:但是当运行应用程序时:

./mvnw compile quarkus:dev ./mvnw 编译 quarkus:dev

It's not running.它没有运行。 I had to remove the PluginManagement and everything back to work but with the same error in red我不得不删除 PluginManagement 和一切恢复工作,但在红色相同的错误

in my case that issue appeared because the port 8080 was busy with another server.就我而言,出现该问题是因为端口 8080 正忙于另一台服务器。 When I had chaneged the used port to another one, then Quarqus succesfuly launched to the 8080.当我将使用的端口更改为另一个时,Quarqus 成功启动到 8080。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM