| <?xml version="1.0"?> |
| |
| <!-- |
| Licensed to the Apache Software Foundation (ASF) under one |
| or more contributor license agreements. See the NOTICE file |
| distributed with this work for additional information |
| regarding copyright ownership. The ASF licenses this file |
| to you under the Apache License, Version 2.0 (the |
| "License"); you may not use this file except in compliance |
| with the License. You may obtain a copy of the License at |
| |
| http://www.apache.org/licenses/LICENSE-2.0 |
| |
| Unless required by applicable law or agreed to in writing, |
| software distributed under the License is distributed on an |
| "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| KIND, either express or implied. See the License for the |
| specific language governing permissions and limitations |
| under the License. |
| --> |
| |
| <faqs id="FAQ" title="Frequently Asked Questions"> |
| <part id="General"> |
| <faq id="How do I integrate static (x)html pages into my Maven site"> |
| <question>How do I integrate static (x)html pages into my Maven site?</question> |
| <answer> |
| <p> |
| You can integrate your static pages by following these steps: |
| </p> |
| <ul> |
| <li>Put your static pages in the resources directory, <code>${basedir}/src/site/resources</code></li> |
| <li>Create your <code>site.xml</code> and put it in <code>${basedir}/src/site</code></li> |
| <li>Link to the static pages by modifying the menu section, create items and map them to the filenames of the static pages</li> |
| </ul> |
| </answer> |
| </faq> |
| <faq id="Why do my absolute links get translated into relative links"> |
| <question>Why do my absolute links get translated into relative links?</question> |
| <answer> |
| <p> |
| This happens because the site plugin tries to make all URLs relative, |
| when possible. If you have something like this defined in your |
| <code>pom.xml</code>: |
| <source> |
| <url>http://www.your.site.com/</url></source> |
| and create links in your <code>site.xml</code> (just an example) like |
| this: |
| <source> |
| <links> |
| <item name="Your Site" href="http://www.your.site.com/"/> |
| <item name="Maven 2" href="http://maven.apache.org/maven2/"/> |
| </links></source> |
| You will see that the link to 'Your site' will be a relative one, but |
| that the link to 'Maven 2' will be an absolute link. |
| </p> |
| <p> |
| There is an |
| <a href="http://jira.codehaus.org/browse/MSITE-159">issue for this in JIRA</a>, |
| where you can read more about this. |
| </p> |
| </answer> |
| </faq> |
| <faq id="Why doesn't the links between parent and child modules work when I run 'mvn site'?"> |
| <question>Why doesn't the links between parent and child modules work when I run 'mvn site'?</question> |
| <answer> |
| <p> |
| What <code>'mvn site'</code> will do for you, in a multi-project |
| build, is to run <code>'mvn site'</code> for the parent and all its |
| modules <b>individually</b>. The links between parent and child will |
| <b>not</b> work here. They <b>will</b> however work when you deploy |
| the site. |
| </p> |
| <p> |
| If you want to test this, prior to deplyment, you can run |
| <code>'mvn site:stage'</code> instead. This will produce the complete |
| site, including the parent and its modules, in the |
| <code>/target/staging/</code> directory of the parent. The site can |
| be found a couple of directory levels down from the there, because |
| the <i>hostname</i> and <i>path</i>, as specified in the |
| <code><distributionManagement>/<site>/<url></code> |
| element of your <code>pom.xml</code>, will each get their own |
| directory. |
| </p> |
| </answer> |
| </faq> |
| </part> |
| </faqs> |