gpt4 book ai didi

maven - IntelliJ IDEA 表示 中不允许使用 元素

转载 作者:行者123 更新时间:2023-12-03 03:24:06 25 4
gpt4 key购买 nike

我在 maven 中使用一个使用 Jetty 的插件。

在这个插件中,我需要进行配置来设置maxFormContentSize:

<plugin>
<groupId>com.organization.example</groupId>
<artifactId>maven-example-plugin</artifactId>
<version>${example.version}</version>
<dependencies>
<!-- -->
</dependencies>
<configuration>
<systemProperties>
<systemProperty>
<name>org.mortbay.jetty.Request.maxFormContentSize</name>
<value>500000</value>
</systemProperty>
</systemProperties>
<script>${example.script}</script>
</configuration>
</plugin>

问题是 Intellij IDEA 表示此处不允许使用 systemProperties 元素:

Element systemProperties is not allowed here

IntelliJ IDEA 不显示此错误的正确配置是什么?我已经做了research about this subject但似乎这是唯一可能的配置。

我使用的是maven 2.2.1和IntelliJ IDEA 2017.1.4。 Jetty版本是7.6.8.v20121106。

最佳答案

<configuration> Maven 插件的部分只能包含该特定插件在其各种目标中支持的内容。

并非所有 Maven 插件都支持 <systemProperties>只有某些人这样做。

由于您删除了您正在使用的实际插件,因此我无法将您链接到特定插件的文档页面以了解其目标和配置。

寻找这样的东西......

http://maven.apache.org/plugins/maven-javadoc-plugin/javadoc-mojo.html

...但是对于您的特定插件

询问 Maven

您还可以在命令行上要求 maven 描述插件,甚至插件中的特定目标。

Note: the below example command lines work with maven-help-plugin v2.2 or better.

描述所有目标:

$ mvn help:describe -DgroupId=org.eclipse.jetty \
-DartifactId=jetty-maven-plugin \
-Dversion=9.4.6.v20170531

详细描述具体目标(带参数):

$ mvn help:describe -DgroupId=org.eclipse.jetty \
-DartifactId=jetty-maven-plugin \
-Dversion=9.4.6.v20170531 \
-Dgoal=start \
-Ddetail=true

关于maven - IntelliJ IDEA 表示 <configuration/> 中不允许使用 <systemProperties/> 元素,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44726283/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com