2013/09/03 10:24

maven을 이용한 javadoc 생성 및 pmd 실행. Architect



프레임워크 개선 중.. 
이클립스를 이용해서 간단히 처리 가능하나,
maven을 이용한다면, 아래 내용을 pom.xml에 삽입.
maven 빌드시에 동시 처리..
mvn site 명령어로는 모든 메이븐을 이용한 레포트 가능.
pmd만 실행시키고자 할 경우에는 mvn pmd:pmd

http://maven.apache.org/plugins/maven-pmd-plugin/ 참고


<reporting>

       <plugins>

             <plugin>

                    <groupId>org.apache.maven.plugins</groupId>

                    <artifactId>maven-javadoc-plugin</artifactId>

                    <version>2.8.1</version>

                    <reportSets>

                           <reportSet>

                                 <reports>

                                        <report>javadoc</report>

                                 </reports>

                           </reportSet>

                    </reportSets>

                    </plugin>

                    <plugin>

                           <groupId>org.apache.maven.plugins</groupId>

                           <artifactId>maven-pmd-plugin</artifactId>

                           <version>3.0.1</version>

                           <configuration>

                                 <targetJdk>1.6</targetJdk>

                                 <linkXref>true</linkXref>

                                 <sourceEncoding>utf-8</sourceEncoding>

                                 <minimumTokens>100</minimumTokens>

                                 <failOnViolation>true</failOnViolation>

                                 <failurePriority>1</failurePriority>

                                 <rulesets>

<!-- Two rule sets that come bundled with PMD <ruleset>/rulesets/braces.xml</ruleset>

                                              <ruleset>/rulesets/naming.xml</ruleset> -->

<!-- Custom remote rule set accessed via a URL <ruleset>http://localhost/design.xml</ruleset> -->

                                 </rulesets>

                           </configuration>

                    </plugin>

                    <plugin>

                <groupId>org.apache.maven.plugins</groupId>

                <artifactId>maven-jxr-plugin</artifactId>

                <version>2.3</version>

            </plugin>

       </plugins>

</reporting>


덧글

댓글 입력 영역