maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Hervé BOUTEMY <herve.bout...@free.fr>
Subject Re: Maven 3.0.5: site plugin or documentation broken?
Date Wed, 10 Apr 2013 00:41:40 GMT
1. warning if you don't define plugin version
you can believe Maven 3 doc, version is taken from pluginManagement: coded 
here [1]
But I must confess I never tried with CLI, since we use to continue defining 
plugin version directly to keep Maven 2.x compatibility
I just tried and confirm this warning happens, but it is wrong: please open a 
Jira issue


2. report inheritence
I just tried the corresponding "inheritedReports" IT from m-site-p, which I 
had to skip with Maven 3 in MSITE-595 [2] /r1148517 [3]

and you're right: now, m-site-p with Maven 3 seems to behave like Maven 2, 
then the doc is now wrong
I don't know when/how it has changed: m-site-p or Maven?

Please open another Jira issue


BTW, thanks for these precise reports: this really helps us keep Maven as good 
as possible

Regards,

Hervé


[1] http://maven.apache.org/shared/maven-reporting-
exec/apidocs/org/apache/maven/reporting/exec/DefaultMavenReportExecutor.html#getPluginVersion(org.apache.maven.reporting.exec.ReportPlugin,

org.apache.maven.artifact.repository.RepositoryRequest, 
org.apache.maven.reporting.exec.MavenReportExecutorRequest)

[2] http://jira.codehaus.org/browse/MSITE-595

[3] http://svn.apache.org/viewvc?view=revision&revision=r1148517

Le mardi 9 avril 2013 18:38:41 Wolf Geldmacher a écrit :
> I'm trying to get the maven site plugin to do my bidding but have gotten
> lost...
> 
> Given the following simple POM's
> 
> pom.xml:
> 
> <project>
>      <modelVersion>4.0.0</modelVersion>
> 
>      <groupId>ch.pecunifex</groupId>
>      <artifactId>parent</artifactId>
>      <version>1.0-SNAPSHOT</version>
>      <packaging>pom</packaging>
>      <url>http://localhost/parent</url>
> 
>      <modules>
>          <module>child</module>
>      </modules>
> 
>      <properties>
>          <version.site.plugin>3.2</version.site.plugin>
>          <version.info.plugin>2.6</version.info.plugin>
>      </properties>
> 
>      <build>
>          <pluginManagement>
>              <plugins>
>                  <plugin>
>                      <groupId>org.apache.maven.plugins</groupId>
>                      <artifactId>maven-site-plugin</artifactId>
>                      <version>${version.site.plugin}</version>
>                  </plugin>
>                  <plugin>
>                      <groupId>org.apache.maven.plugins</groupId>
>                     
> <artifactId>maven-project-info-reports-plugin</artifactId>
> <version>${version.info.plugin}</version>
>                  </plugin>
>              </plugins>
>          </pluginManagement>
>      </build>
> 
>      <reporting>
>          <plugins>
>              <plugin>
>                  <groupId>org.apache.maven.plugins</groupId>
>                  <artifactId>maven-project-info-reports-plugin</artifactId>
>                  <reportSets>
>                      <reportSet>
>                          <reports>
>                              <report>index</report>
>                              <report>summary</report>
>                              <report>project-team</report>
>                              <report>modules</report>
>                              <report>plugins</report>
>                              <report>plugin-management</report>
>                          </reports>
>                      </reportSet>
>                  </reportSets>
>              </plugin>
>          </plugins>
>      </reporting>
> 
> </project>
> 
> and child/pom.xml:
> 
> <project>
>      <modelVersion>4.0.0</modelVersion>
> 
>      <parent>
>          <groupId>ch.pecunifex</groupId>
>          <artifactId>parent</artifactId>
>          <version>1.0-SNAPSHOT</version>
>      </parent>
> 
>      <groupId>ch.pecunifex</groupId>
>      <artifactId>child</artifactId>
>      <url>http://localhost/child</url>
> 
>      <reporting>
>          <plugins>
>              <plugin>
>                  <groupId>org.apache.maven.plugins</groupId>
>                  <artifactId>maven-project-info-reports-plugin</artifactId>
>                  <reportSets>
>                      <reportSet>
>                          <reports>
>                              <report>index</report>
>                          </reports>
>                      </reportSet>
>                  </reportSets>
>              </plugin>
>          </plugins>
>      </reporting>
> 
> </project>
> 
> and the documentation on:
> 
>      http://maven.apache.org/plugins/maven-site-plugin/maven-3.html
> 
> I get the following when I call "mvn site":
> 
> [INFO] Scanning for projects...
> [WARNING]
> [WARNING] Some problems were encountered while building the effective model
> for ch.pecunifex:child:jar:1.0-SNAPSHOT [WARNING]
> 'reporting.plugins.plugin.version' for
> org.apache.maven.plugins:maven-project-info-reports-plugin is missing. @
> line 16, column 21 [WARNING]
> [WARNING] Some problems were encountered while building the effective model
> for ch.pecunifex:parent:pom:1.0-SNAPSHOT [WARNING]
> 'reporting.plugins.plugin.version' for
> org.apache.maven.plugins:maven-project-info-reports-plugin is missing. @
> line 38, column 21 [WARNING]
> [WARNING] It is highly recommended to fix these problems because they
> threaten the stability of your build. [WARNING]
> [WARNING] For this reason, future Maven versions might no longer support
> building such malformed projects. [WARNING]
> 
> while the documentation clearly states that:
> 
> When used with Maven 3, a report plugin version can be empty (like build
> plugins).
> 
> The following order/strategy will be used to find/resolve a version:
> 
>     - search the same groupId/artifactId in the build.plugins section
>     - search the same groupId/artifactId in the
> build.pluginManagement.plugins section - resolve with current repositories
> (can include automatic SNAPSHOT resolution)
> 
> Why do I get the warning? And on the wrong line to boot?
> 
> And, worse yet, a little later I get:
> 
> ...
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Building parent 1.0-SNAPSHOT
> [INFO]
> ------------------------------------------------------------------------
> [INFO]
> [INFO] --- maven-site-plugin:3.2:site (default-site) @ parent ---
> [INFO] configuring report plugin
> org.apache.maven.plugins:maven-project-info-reports-plugin:2.6 [INFO]
> Relativizing decoration links with respect to project URL:
> http://localhost/parent [INFO] Rendering site with
> org.apache.maven.skins:maven-default-skin:jar:1.0 skin. [INFO] Generating
> "About" report    --- maven-project-info-reports-plugin:2.6 [INFO]
> Generating "Project Summary" report    ---
> maven-project-info-reports-plugin:2.6 [INFO] Generating "Project Team"
> report    --- maven-project-info-reports-plugin:2.6 [INFO] Generating
> "Project Modules" report    --- maven-project-info-reports-plugin:2.6
> [INFO] Generating "Project Plugins" report    ---
> maven-project-info-reports-plugin:2.6 [INFO] Generating "Plugin Management"
> report    --- maven-project-info-reports-plugin:2.6 [INFO]
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Building child 1.0-SNAPSHOT
> [INFO]
> ------------------------------------------------------------------------
> [INFO]
> [INFO] --- maven-site-plugin:3.2:site (default-site) @ child ---
> [INFO] configuring report plugin
> org.apache.maven.plugins:maven-project-info-reports-plugin:2.6 [INFO]
> Relativizing decoration links with respect to project URL:
> http://localhost/child [INFO] Rendering site with
> org.apache.maven.skins:maven-default-skin:jar:1.0 skin. [INFO] Generating
> "About" report    --- maven-project-info-reports-plugin:2.6 [INFO]
> Generating "Project Summary" report    ---
> maven-project-info-reports-plugin:2.6 [INFO] Generating "Project Team"
> report    --- maven-project-info-reports-plugin:2.6 [INFO] Generating
> "Project Plugins" report    --- maven-project-info-reports-plugin:2.6
> [INFO] Generating "Plugin Management" report    ---
> maven-project-info-reports-plugin:2.6 [INFO]
> ------------------------------------------------------------------------
> ...
> 
> whereas the documentation clearly states:
> 
> Maven 2 and Maven 3 work differently when dealing with inheritance of
> reports: given a plugin providing multiple report goals, in Maven 2,
> reports configured in child pom are added to reports from parent, whereas
> in Maven 3 reports from child replace reports from parent.
> 
> For example, given a multi module build where the parent POM has the index
> report configured and the child POM has the summary report configured for
> maven-project-info-reports-plugin plugin:
> 
>      with Maven 2, the child site will have both the index and summary
> reports, with Maven 3, the child site will have only the summary report.
> 
> For more info see MSITE-596
> 
> ... and just to verify that I'm running the latest and greatest:
> 
> $ mvn -version
> Apache Maven 3.0.5 (r01de14724cdef164cd33c7c8c2fe155faf9602da; 2013-02-19
> 14:51:28+0100) Maven home: /home/xxxxx/.lib/apache-maven-3.0.5
> Java version: 1.7.0_17, vendor: Oracle Corporation
> Java home: /usr/lib/jvm/jdk1.7.0_17/jre
> Default locale: en_US, platform encoding: UTF-8
> OS name: "linux", version: "3.2.0-39-generic", arch: "amd64", family: "unix"
> 
> So what am I supposed to believe?
> Is the documentation that obviously was updated for Maven-3 incorrect?
> Is the current behaviour (which seems to be what Maven-2 did) correct?
> Can I somehow get the documented behaviour (because that is what I want)?
> 
> Cheers,
> Wolf
> 
> P.S.: The POMs given are simplified versions of the POMs I really have,
> so please ignore that the reduced set of reports does not really make
> sense. I also have similar problems with other reporting plugins (trying
> to suppress reports inherited from a parent that do not make sense in a
> few special cases) but the other way round (i.e. adding the same reports
> to >90% of the POMs because I can't suppress them in a few places) does
> not really appeal to me - after all I was hoping to *reduce* the amount
> of scaffolding required to build these applications...
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Mime
View raw message