Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

IntelliJ IDEA says that <systemProperties/> element is not allowed inside <configuration/>

I'm using a plugin in maven that uses Jetty.

In this plugin, I need to made a configuration to set 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>

The problem is that Intellij IDEA says that systemProperties element is not allowed here:

Element systemProperties is not allowed here

What is the correct configuration for the IntelliJ IDEA not show this error? I already made a research about this subject but appears that is the only possible configuration.

I'm using maven 2.2.1 and IntelliJ IDEA 2017.1.4. The Jetty version is 7.6.8.v20121106.

like image 576
Dherik Avatar asked Sep 11 '25 19:09

Dherik


1 Answers

The <configuration> section of a maven plugin can only contain what that specific plugin supports in its various goals.

Not all maven plugins support <systemProperties> only certain ones do.

Since you stubbed out the actual plugin you are struggling with I cannot link you to the specific plugin's documentation page for its goals and configurations.

Look for something like this ...

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

... but for your specific plugin

Ask Maven

You can also ask maven, on its command line, to describe the plugin and even a specific goal in the plugin.

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

Describe all of the goals:

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

Describe a specific goal in detail (with parameters):

$ mvn help:describe -DgroupId=org.eclipse.jetty \
                    -DartifactId=jetty-maven-plugin \
                    -Dversion=9.4.6.v20170531 \
                    -Dgoal=start \
                    -Ddetail=true
like image 75
Joakim Erdfelt Avatar answered Sep 13 '25 07:09

Joakim Erdfelt