开发者

How to add developers list to maven generated site?

I have just started using maven and have question. My pom.xml contains tag "developer" with the full details of the team. What should I do to make this list visible on my project site? I know how to add a menu item to site.xml. But where this item should refer?

I found only one project in Jakarata that does it: the maven it开发者_如何学JAVAself. They have tag developers in pom and link "The Maven Team" on site. This link refers to team-list.html. I have downloaded the full maven source and ran "mvn site" but this file was not generated on my environment and grepping the files did not help too.

Does anyone know how to do this?


the mvn site command should work and your POM should look something like the following:

...
    <!-- List the core committers -->
    <developers>
      <developer>
        <id>karianna</id>
        <name>Martijn Verburg</name>
        <organization>Ikasan</organization>
        <organizationUrl>http://www.ikasan.org</organizationUrl>
        <roles>
          <role>developer</role>
        </roles>
        <timezone>0</timezone>
      </developer>
      ...
    </developers>

    <!-- Contributors -->
    <contributors>
        <contributor>
            <name>Cae Fernandes</name>
            <roles>
                <role>developer</role>
            </roles>
            <timezone>-3</timezone>
        </contributor>
        ...
     </contributors>
...


I'm not sure it has always been the case but it appears the Project Team report (team-list.html) should get generated by default during mvn site and be available under the Project Information. I just tested that on a sample project and it does work as expected.

If it doesn't, maybe try to configure the maven-project-info-reports-plugin explicitly to generate the report.

<project>
  ...
  <reporting>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-project-info-reports-plugin</artifactId>
        <version>2.2</version>
        <reportSets>
          <reportSet>
            <reports>
              <report>index</report>
              <report>project-team</report>
              ...
            </reports>
          </reportSet>
        </reportSets>
      </plugin>
      ...
    </plugins>
  </reporting>
  ...
</project>

Are you using a particular version of the maven site plugin? What version of Maven exactly?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜