建立有效模型时遇到的一些问题
Some problems were encountered while building the effective model for
项目的 Maven 构建 https://github.com/BITPlan/com.bitplan.antlr
给出警告信息:
[WARNING]
[WARNING] Some problems were encountered while building the effective model for com.bitplan.antlr:com.bitplan.antlr:jar:0.0.1
[WARNING] Reporting configuration should be done in <reporting> section, not in maven-site-plugin <configuration> as reportPlugins parameter. @ line 213, column 20
[WARNING]
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING]
由于以下行中的 maven-site-plugin 配置。不幸的是,没有指向如何正确执行此操作的示例的指针,我在 Whosebug 或通过搜索引擎中找不到。
我找到的链接是:
但我无法弄清楚这对于消除警告意味着什么。
原问题:
要使警告消失,需要进行哪些修改?
在第一个答案后添加评论:
当我移动
<plugins>
...
</plugins>
部分来自配置节点内部
的:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-site-plugin</artifactId>
<version>3.0</version>
<configuration>
...
</configuration>
</plugin>
到一个单独的
<reporting>
...
</reporting>
节点
我收到错误消息:
Execution default-site of goal org.apache.maven.plugins:maven-site-plugin:3.0:site failed:
A required class was missing while executing org.apache.maven.plugins:maven-site-plugin:3.0:site:
org/sonatype/aether/graph/DependencyFilter
将站点插件版本更新到 3.6 可以解决此问题。
相关pom.xml行
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-site-plugin</artifactId>
<version>3.0</version>
<configuration>
<!-- configuration of reports to be included in site -->
<reportPlugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-project-info-reports-plugin</artifactId>
<version>2.2</version>
<configuration>
<dependencyDetailsEnabled>true</dependencyDetailsEnabled>
<dependencyLocationsEnabled>true</dependencyLocationsEnabled>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.9</version>
<configuration>
<overview>${basedir}\src\main\java\overview.html</overview>
<verbose>true</verbose>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-report-plugin</artifactId>
<version>2.6</version>
</plugin>
<!-- http://maven.apache.org/plugins/maven-checkstyle-plugin/usage.html -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>2.13</version>
</plugin>
</reportPlugins>
</configuration>
</plugin>
好的,我发现我没有解释清楚"what to do":我会看看我是否可以改进下一个 Maven 版本的消息
您需要使用 "classic configuration (Maven 2 & 3)" 而不是 "new configuration (Maven 3 only)":请参阅 http://maven.apache.org/plugins/maven-site-plugin/maven-3.html#Configuration_formats
您需要移动
<reportPlugins>
...
</reportPlugins>
来自以下配置节点的部分:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-site-plugin</artifactId>
<version>3.0</version>
<configuration>
...
</configuration>
</plugin>
到一个单独的
<reporting>
<plugins>
...
</plugins>
</reporting>
node 并将 maven-site-plugin 更新为新版本 - 此时为 3.6
再次尝试从 springboot 项目的主要 class(由@SpringbootApplication 注释的应用程序 Class)运行 您的项目。
在我的案例中它奏效了
项目的 Maven 构建 https://github.com/BITPlan/com.bitplan.antlr 给出警告信息:
[WARNING]
[WARNING] Some problems were encountered while building the effective model for com.bitplan.antlr:com.bitplan.antlr:jar:0.0.1
[WARNING] Reporting configuration should be done in <reporting> section, not in maven-site-plugin <configuration> as reportPlugins parameter. @ line 213, column 20
[WARNING]
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING]
由于以下行中的 maven-site-plugin 配置。不幸的是,没有指向如何正确执行此操作的示例的指针,我在 Whosebug 或通过搜索引擎中找不到。
我找到的链接是:
但我无法弄清楚这对于消除警告意味着什么。
原问题:
要使警告消失,需要进行哪些修改?
在第一个答案后添加评论:
当我移动
<plugins>
...
</plugins>
部分来自配置节点内部 的:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-site-plugin</artifactId>
<version>3.0</version>
<configuration>
...
</configuration>
</plugin>
到一个单独的
<reporting>
...
</reporting>
节点
我收到错误消息:
Execution default-site of goal org.apache.maven.plugins:maven-site-plugin:3.0:site failed:
A required class was missing while executing org.apache.maven.plugins:maven-site-plugin:3.0:site:
org/sonatype/aether/graph/DependencyFilter
将站点插件版本更新到 3.6 可以解决此问题。
相关pom.xml行
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-site-plugin</artifactId>
<version>3.0</version>
<configuration>
<!-- configuration of reports to be included in site -->
<reportPlugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-project-info-reports-plugin</artifactId>
<version>2.2</version>
<configuration>
<dependencyDetailsEnabled>true</dependencyDetailsEnabled>
<dependencyLocationsEnabled>true</dependencyLocationsEnabled>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.9</version>
<configuration>
<overview>${basedir}\src\main\java\overview.html</overview>
<verbose>true</verbose>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-report-plugin</artifactId>
<version>2.6</version>
</plugin>
<!-- http://maven.apache.org/plugins/maven-checkstyle-plugin/usage.html -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>2.13</version>
</plugin>
</reportPlugins>
</configuration>
</plugin>
好的,我发现我没有解释清楚"what to do":我会看看我是否可以改进下一个 Maven 版本的消息
您需要使用 "classic configuration (Maven 2 & 3)" 而不是 "new configuration (Maven 3 only)":请参阅 http://maven.apache.org/plugins/maven-site-plugin/maven-3.html#Configuration_formats
您需要移动
<reportPlugins>
...
</reportPlugins>
来自以下配置节点的部分:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-site-plugin</artifactId>
<version>3.0</version>
<configuration>
...
</configuration>
</plugin>
到一个单独的
<reporting>
<plugins>
...
</plugins>
</reporting>
node 并将 maven-site-plugin 更新为新版本 - 此时为 3.6
再次尝试从 springboot 项目的主要 class(由@SpringbootApplication 注释的应用程序 Class)运行 您的项目。
在我的案例中它奏效了