Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Some problems were encountered while building the effective model for

The maven build for the project https://github.com/BITPlan/com.bitplan.antlr gives the warning message:

[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] 

Due to the maven-site-plugin configuration in the lines below. Unfortunately there is no pointer to an example how to do this correctly and I could not find one yet here in stackoverflow or via a search-engine.

The links I found were:

  • https://issues.apache.org/jira/browse/MNG-6189
  • https://github.com/jcabi/jcabi-parent/issues/69

But I could not figure out what this meant in respect to getting rid of the warning.

Original question:

What would be the necessary modification to make the warning go away?

Added comment after first answer:

When i move the

<plugins>
...
</plugins> 

part from inside the configuration node of:

  <plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-site-plugin</artifactId>
    <version>3.0</version>
    <configuration>
    ...
    </configuration>
 </plugin>

to a separate

 <reporting>
 ...
 </reporting> 

node

I get the error message:

 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

Updating the site plugin version to 3.6 fixes this.

relevant pom.xml lines

<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>
like image 778
Wolfgang Fahl Avatar asked Oct 14 '17 08:10

Wolfgang Fahl


1 Answers

ok, I see I did not clearly explain "what to do": I'll see if I can improve the message for next Maven version

you need to use the "classic configuration (Maven 2 & 3)" instead of the "new configuration (Maven 3 only)": see http://maven.apache.org/plugins/maven-site-plugin/maven-3.html#Configuration_formats

You need to move the

<reportPlugins>
...
</reportPlugins> 

part from inside configuration node of:

  <plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-site-plugin</artifactId>
    <version>3.0</version>
    <configuration>
    ...
    </configuration>
 </plugin>

to a separate

 <reporting>
   <plugins>
   ...
   </plugins>
 </reporting> 

node and also update the maven-site-plugin to a a new version - at this time 3.6

like image 91
hboutemy Avatar answered Nov 19 '22 07:11

hboutemy