Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents

...

custom css 를 사용할 수 있지만 skin 을 사용하는 것을 추천한다. skin 목록은 http://maven.apache.org/skins/ 에서 볼 수 있다. 개인적으로는 Twitter's Bootstrap 을 사용하는 maven-fluido-skin가 제일 깔끔해 보인다깔끔하고 다양한 기능을 제공하고 있어서 사용한다.

 

Creating a Site Descriptor

...

Code Block
languagexml
titlesite.xml 예제
<?xml version="1.0" encoding="ISOUTF-8859-18"?>
<project name="Maven Project">
  <bannerLeft>
    <name>Maven</name>
    <src>http://maven.apache.org/images/apache-maven-project.png</src>
    <href>http://maven.apache.org/</href>
  </bannerLeft>
  <bannerRight>
    <src>http://maven.apache.org/images/maven-small.gif</src>
  </bannerRight>
  <body>
    <links>
      <item name="Apache" href="http://www.apache.org/" />
      <item name="Maven 1.x" href="http://maven.apache.org/maven-1.x/"/>
      <item name="Maven 2" href="http://maven.apache.org/"/>
    </links>

    <menu name="Maven 2.0">
      <item name="Introduction" href="index.html"/>
      <item name="Download" href="download.html"/>
      <item name="Release Notes" href="release-notes.html" />
      <item name="General Information" href="about.html"/>
      <item name="For Maven 1.x Users" href="maven1.html"/>
      <item name="Road Map" href="roadmap.html" />
    </menu>

    <menu ref="reports"/>
    <skin>
        <groupId>org.apache.maven.skins</groupId>
        <artifactId>maven-fluido-skin</artifactId>
        <version>1.3.1</version>
  </skin>
    ...
  </body>
</project>

 

<menu ref="reports"/> 부분은 mvn site 실행시 생성된 프로젝트 리포트 메뉴와 링크로 대치된다.

 

Configuring Reports

 

Usage

Generating Site

사이트는 기본적으로 target/site/ 에 생성된다.

Code Block
mvn site

생성된 site 는 site:run goal 로 jetty WAS 를 띄워서 브라우저에서 http://localhost:8080 을 통해 볼 수 있다. (또는 target/site/index.html 을 브라우저에서 읽어도 된다._

Code Block
mvn site:run

 

Deploying Site

사전에 POM 에 distributionManagement 가 설정되어 있어야 한다.

...

  1. -o 옵션으로 offline 모드로 구동

    Code Block
    mvn -o site-deploy
  2. reporting 항목의 maven-project-info-reports-plugin 에서 dependencyLocationsEnabled  를 false 로 설정

    Code Block
    languagexml
    titlepom.xml
    <reporting>
        <plugins>
     
    	<plugin>
    		<groupId>org.apache.maven.plugins</groupId>
    		<artifactId>maven-project-info-reports-plugin</artifactId>
    		<version>2.7</version>
     
    		<configuration>
    		  <dependencyLocationsEnabled>false</dependencyLocationsEnabled>
    		</configuration>
    	</plugin>
     
        </plugins>
      </reporting>

     

참고 자료

...