I am new to IntelliJ and Maven so this is all going above my head
I'm following the DropWizard tutorial here and I only did the first step through IntelliJ where I add a Maven archetype with the following values
GroupId= io.dropwizard.archetypes
ArtifactId= java-simple
Version= 0.9.1
That's fine, I then go ahead and generate the new project and immediately in the pom.xml file there's an error with the plugin node for maven-site-plugin.
<plugin>
<artifactId>maven-site-plugin</artifactId>
<version>3.4</version>
<configuration>
<reportPlugins>
<plugin>
<artifactId>maven-project-info-reports-plugin</artifactId>
<version>2.4</version>
<configuration>
<dependencyLocationsEnabled>false</dependencyLocationsEnabled>
<dependencyDetailsEnabled>false</dependencyDetailsEnabled>
</configuration>
</plugin>
<plugin>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.10.3</version>
</plugin>
</reportPlugins>
</configuration>
</plugin>
it says the 'Element reportPlugins is not allowed here', and everything within reportPlugins gets a 'Cannot resolve symbol' error.
I have no idea what's going on. Don't even know what keywords to Google to solve this so can't find something relevant on the internet. Would somebody mind telling me what gives here? Am I not using the right version or something? Is this an IntelliJ quirk?
I believe reportsPlugin is an experimental feature and the documentations say to not use it. Though I've seen it being used in many places around the internet. It will complain inside IntelliJ, but if you run maven from the console, it will build and execute the site goal.
You should pull out those plugins from the <reportsPlugin> and put them into the <reporting> element. This works fine with Maven v3.3.9 and IntelliJ v2016.3. Maven doesn't complain and IntelliJ is happy too.
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-site-plugin</artifactId>
<version>3.4</version>
</plugin>
</plugins>
</build>
<reporting>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.10.4</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-project-info-reports-plugin</artifactId>
<version>2.9</version>
</plugin>
</plugins>
</reporting>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With