Am 13.09.2010 18:03, schrieb Dennis Lundberg:
Hi

I'm not that I understand what it is you want to do.

When you say you don't want to specify a version, do you mean for the
Site Plugin or for the skin?

The skin is not configured in the pom.xml file, but rather in a site.xml
file. The site.xml file are inherited in the same way as pom.xml files
are. So if you want some parts of the site.xml file in all of your
projects, you put that site.xml in the same place as your corporate pom.xml.

On 2010-09-13 11:11, Thomas Scheffler wrote:
Hi,

I use the maven-site-plugin with a custom skin. I do not want to specify
the version in maven project. There is no way to store the the version
in a corporate pom.xml, as properties are not heritable. So I tent to
use the "latest release" resolving mechanism of the site plugin.
Unfortunately it does not resolve against configured repositories from
the pom.xml but always against "central".

I'm using the latest version of maven-site-plugin. Is anybody on the
list, who has a custom site skin working with several maven projects?
The best way would be to have the skin configured at one central
corporate pom and nowhere else.

For the records here is my current solution.

In the corporate pom xml I have the following:

  <build>
    <plugins>
      <plugin>
        <artifactId>maven-site-plugin</artifactId>
        <executions>
          <execution>
            <id>attach-descriptor</id>
            <goals>
              <goal>attach-descriptor</goal>
            </goals>
          </execution>
        </executions>
        <dependencies>
          <dependency>
            <groupId>org.project.skins</groupId>
            <artifactId>custom-site-skin</artifactId>
            <version>1.0</version>
          </dependency>
        </dependencies>
      </plugin>
    </plugins>

This way in every site.xml I can leave out the version number and it takes the version from the pom.xml file.

I added a site.xml for the corporate pom:

<skin>
  <groupId>org.project.skins</groupId>
  <artifactId>custom-site-skin</artifactId>
</skin>
<body>
  <menu name="Maven Projects" inherit="bottom">
    <item name="Project 1">
      <item name="Link1" href="..."/>
    </item>
  </menu>
  <menu ref="reports"/>
</body>

And for multi module projects I need additionally the following site.xml in the parent pom.xml

<skin>
  <groupId>org.project.skins</groupId>
  <artifactId>custom-site-skin</artifactId>
</skin>
<body>
  <menu ref="parent" inherit="top" />
  <menu ref="modules" />
  <menu ref="reports" inherit="bottom"/>
</body>

Maybe there is a more elegant way. But it works for now.

regards

Thomas

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to