OSDN Git Service

Update checkstyle-rules.
[mikutoga/Pmd2XML.git] / pom.xml
diff --git a/pom.xml b/pom.xml
index 5557dbc..45d2c62 100644 (file)
--- a/pom.xml
+++ b/pom.xml
@@ -1,15 +1,14 @@
-<?xml version="1.0" encoding="UTF-8"?>
+<?xml version="1.0" encoding="UTF-8" ?>
 
 <!--
-    Pmd2XML
-    Maven2用プロジェクト構成定義ファイル
+    Maven3 POM definition file
 -->
 
 <project
   xmlns="http://maven.apache.org/POM/4.0.0"
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
-  http://maven.apache.org/maven-v4_0_0.xsd"
+  http://maven.apache.org/xsd/maven-4.0.0.xsd"
 >
     <modelVersion>4.0.0</modelVersion>
     <!--parent/-->
     <groupId>jp.sourceforge.mikutoga</groupId>
     <artifactId>pmd2xml</artifactId>
 
-    <version>1.102.5-SNAPSHOT</version>
+    <version>1.202.3-SNAPSHOT</version>
 
     <packaging>jar</packaging>
     <name>Pmd2XML</name>
 
     <description><!--
 -->Pmd2XML is a PMD-XML converter for MikuMikuDance.<!--
- -->
-    </description>
+ --></description>
 
-    <url>http://sourceforge.jp/projects/mikutoga/</url>
+    <url>https://ja.osdn.net/projects/mikutoga/devel/</url>
     <inceptionYear>2010</inceptionYear>
 
     <organization>
         <name>MikuToga Partners</name>
-        <url>http://sourceforge.jp/projects/mikutoga/devel/</url>
+        <url>https://ja.osdn.net/projects/mikutoga/devel/</url>
     </organization>
 
     <licenses>
         <license>
             <name>The MIT License</name>
-            <url>http://www.opensource.org/licenses/mit-license.php</url>
+            <url>https://opensource.org/licenses/MIT</url>
             <distribution>manual</distribution>
         </license>
     </licenses>
@@ -46,9 +44,9 @@
     <developers>
         <developer>
             <id>olyutorskii</id>
-            <url>http://sites.google.com/site/olyutorskiipit/</url>
+            <url>https://sites.google.com/site/olyutorskiipit/</url>
             <organization>MikuToga Partners</organization>
-            <organizationUrl>http://sourceforge.jp/projects/mikutoga/devel/</organizationUrl>
+            <organizationUrl>https://ja.osdn.net/projects/mikutoga/devel/</organizationUrl>
             <roles>
                 <role>Project Founder</role>
                 <role>Java Developer</role>
     <contributors/>
     <mailingLists/>
 
-    <prerequisites>
-        <maven>2.2</maven>
-    </prerequisites>
+    <!-- prerequisites/ -->
 
     <modules/>
 
     <scm>
-        <connection>scm:hg:http://hg.sourceforge.jp/view/mikutoga/Pmd2XML</connection>
-        <developerConnection>scm:hg:ssh://hg.sourceforge.jp//hgroot/mikutoga/Pmd2XML</developerConnection>
-        <url>http://hg.sourceforge.jp/view/mikutoga/Pmd2XML</url>
+        <connection>scm:git:git://git.osdn.net/gitroot/mikutoga/Pmd2XML.git</connection>
+        <developerConnection>scm:git:https://scm.osdn.net/gitroot/mikutoga/Pmd2XML.git</developerConnection>
+        <url>https://ja.osdn.net/projects/mikutoga/scm/git/Pmd2XML/</url>
     </scm>
 
     <issueManagement>
-        <system>SourceForge.JP</system>
-        <url>http://sourceforge.jp/projects/mikutoga/ticket/</url>
+        <system>OSDN.net</system>
+        <url>https://ja.osdn.net/projects/mikutoga/ticket/</url>
     </issueManagement>
 
     <ciManagement/>
     <distributionManagement/>
 
     <properties>
-        <maven.compiler.encoding>UTF-8</maven.compiler.encoding>
-
-        <maven.compiler.source>1.6</maven.compiler.source>
-        <maven.compiler.target>1.6</maven.compiler.target>
+        <maven.compiler.source>1.8</maven.compiler.source>
+        <maven.compiler.target>1.8</maven.compiler.target>
 
         <maven.compiler.showDeprecation>true</maven.compiler.showDeprecation>
         <maven.compiler.showWarnings>true</maven.compiler.showWarnings>
 
+        <maven.compiler.encoding>UTF-8</maven.compiler.encoding>
         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
         <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
 
-        <project.myrepoconf>${project.basedir}/src/main/config</project.myrepoconf>
+        <!-- DO NOT USE ${locale} with site-plugin -->
+        <site.locales>en</site.locales>
+        <javadoc.locale>en</javadoc.locale>
+        <spotbugs.jvmArgs>-Duser.language=en</spotbugs.jvmArgs>
 
-        <project.transformer>
-            org.apache.maven.plugins.shade.resource.ManifestResourceTransformer
-        </project.transformer>
-        <project.mainentry>jp.sourceforge.mikutoga.pmd2xml.Pmd2Xml</project.mainentry>
+        <surefire-plugin.version>3.0.0-M3</surefire-plugin.version>
+        <jacoco-plugin.version>0.8.4</jacoco-plugin.version>
 
-        <!-- Walkaround for Maven3&PMD-plugin bug -->
-        <targetJdk>${maven.compiler.source}</targetJdk>
+        <checkstyle-plugin.version>3.1.0</checkstyle-plugin.version>
+        <checkstyleruntime.version>8.22</checkstyleruntime.version>
+        <checkstyle.config.location>config/checkstyle/checkstyle.xml</checkstyle.config.location>
+        <checkstyle.suppressions.location>config/checkstyle/checkstyle-suppressions.xml</checkstyle.suppressions.location>
+        <checkstyle.enable.rss>false</checkstyle.enable.rss>
 
-        <!-- Walkaround for Maven3&checkstyle bug -->
-        <checkstyle.config.location>${project.myrepoconf}/checks.xml</checkstyle.config.location>
+        <pmd-plugin.version>3.12.0</pmd-plugin.version>
+
+        <spotbugs-plugin.version>3.1.12</spotbugs-plugin.version>
+        <spotbugs.effort>Max</spotbugs.effort>
+        <spotbugs.threshold>Low</spotbugs.threshold>
+        <!-- for Jenkins -->
+        <spotbugs.xmlOutput>true</spotbugs.xmlOutput>
+
+        <project.mainentry>jp.sfjp.mikutoga.pmd2xml.Pmd2Xml</project.mainentry>
 
     </properties>
 
         <dependency>
             <groupId>junit</groupId>
             <artifactId>junit</artifactId>
-            <version>[4.8.2,)</version>
+            <version>4.12</version>
             <scope>test</scope>
         </dependency>
 
         <dependency>
             <groupId>jp.sourceforge.mikutoga</groupId>
             <artifactId>togagem</artifactId>
-            <version>1.105.3-SNAPSHOT</version>
+            <version>3.122.2</version>
             <scope>compile</scope>
         </dependency>
 
     <pluginRepositories/>
 
     <build>
-        <pluginManagement/>
+
+        <pluginManagement>
+
+            <plugins>
+
+                <plugin>
+                    <groupId>org.apache.maven.plugins</groupId>
+                    <artifactId>maven-checkstyle-plugin</artifactId>
+                    <version>${checkstyle-plugin.version}</version>
+                    <dependencies>
+                        <dependency>
+                            <groupId>com.puppycrawl.tools</groupId>
+                            <artifactId>checkstyle</artifactId>
+                            <version>${checkstyleruntime.version}</version>
+                        </dependency>
+                    </dependencies>
+                </plugin>
+
+            </plugins>
+
+        </pluginManagement>
 
         <plugins>
 
+
+            <!-- clean lifecycle -->
+
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-clean-plugin</artifactId>
-                <version>2.4.1</version>
+                <version>3.1.0</version>
                 <configuration>
                     <filesets>
                         <fileset>
                             <directory>${project.basedir}</directory>
                             <includes>
-                                <include>**/.DS_Store</include>
+                                <include>**/*~</include>
+                                <include>**/*.swp</include>
+                                <include>**/*.DS_Store</include>
+                                <include>**/._*</include>
+                                <include>**/__MACOSX</include>
                                 <include>**/Thumbs.db</include>
+                                <include>**/desktop.ini</include>
                                 <include>**/core</include>
+                                <include>**/hs_err_pid*</include>
                             </includes>
                         </fileset>
                     </filesets>
                 </configuration>
             </plugin>
 
+
+            <!-- default lifecycle -->
+
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-enforcer-plugin</artifactId>
+                <version>3.0.0-M2</version>
+                <executions>
+                    <execution>
+                        <id>enforce-versions</id>
+                        <goals>
+                            <goal>enforce</goal>
+                        </goals>
+                        <configuration>
+                            <rules>
+                                <requireMavenVersion>
+                                    <version>[3.3.9,)</version>
+                                </requireMavenVersion>
+                                <requireJavaVersion>
+                                    <version>[1.8,)</version>
+                                </requireJavaVersion>
+                            </rules>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-resources-plugin</artifactId>
+                <version>3.1.0</version>
+            </plugin>
+
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-compiler-plugin</artifactId>
-                <version>2.3.2</version>
+                <version>3.8.1</version>
                 <configuration>
-                    <source>1.6</source>  <!-- for NetBeans IDE -->
-                    <target>1.6</target>
-                    <showDeprecation>true</showDeprecation>
-                    <showWarnings>true</showWarnings>
+                    <source>1.8</source>  <!-- for NetBeans IDE -->
+                    <target>1.8</target>
                     <compilerArguments>
                         <Xlint/>
                     </compilerArguments>
+                    <showWarnings>true</showWarnings>
+                    <showDeprecation>true</showDeprecation>
                 </configuration>
             </plugin>
 
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-jar-plugin</artifactId>
-                <version>2.3.1</version>
+                <artifactId>maven-surefire-plugin</artifactId>
+                <version>${surefire-plugin.version}</version>
                 <configuration>
-                    <archive>
-                        <manifestEntries>
-                            <Main-Class>${project.mainentry}</Main-Class>
-                            <Built-By>${project.organization.name}</Built-By>
-                        </manifestEntries>
-                    </archive>
+                    <enableAssertions>true</enableAssertions>
                 </configuration>
             </plugin>
 
             <plugin>
+                <groupId>org.jacoco</groupId>
+                <artifactId>jacoco-maven-plugin</artifactId>
+                <version>${jacoco-plugin.version}</version>
+                <executions>
+                    <execution>
+                        <id>default-prepare-agent</id>
+                        <goals>
+                            <goal>prepare-agent</goal>
+                        </goals>
+                    </execution>
+                    <execution>
+                        <id>default-report</id>
+                        <phase>prepare-package</phase>
+                        <goals>
+                            <goal>report</goal>
+                        </goals>
+                    </execution>
+                    <execution>
+                        <id>default-check</id>
+                        <goals>
+                            <goal>check</goal>
+                        </goals>
+                        <configuration>
+                            <rules>
+                                <rule implementation="org.jacoco.maven.RuleConfiguration">
+                                    <element>BUNDLE</element>
+                                    <limits>
+                                        <limit implementation="org.jacoco.report.check.Limit">
+                                            <counter>COMPLEXITY</counter>
+                                            <value>COVEREDRATIO</value>
+                                            <minimum>0.0</minimum>
+                                        </limit>
+                                    </limits>
+                                </rule>
+                            </rules>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+
+            <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-assembly-plugin</artifactId>
-                <version>2.2.1</version>
+                <artifactId>maven-jar-plugin</artifactId>
+                <version>3.1.2</version>
                 <configuration>
-                    <descriptors>
-                        <descriptor>src/main/assembly/descriptor.xml</descriptor>
-                    </descriptors>
+                    <archive>
+                        <manifest>
+                            <mainClass>${project.mainentry}</mainClass>
+                            <addDefaultImplementationEntries>
+                                true
+                            </addDefaultImplementationEntries>
+                        </manifest>
+                        <manifestEntries>
+                            <Built-By>${project.organization.name}</Built-By>
+                        </manifestEntries>
+                    </archive>
                 </configuration>
             </plugin>
 
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-shade-plugin</artifactId>
-                <version>1.4</version>
+                <version>3.2.1</version>
                 <executions>
                     <execution>
                         <phase>package</phase>
                         <goals>
-                          <goal>shade</goal>
+                            <goal>shade</goal>
                         </goals>
                         <configuration>
+                            <createDependencyReducedPom>false</createDependencyReducedPom>
                             <artifactSet>
                                 <includes>
                                     <include>jp.sourceforge.mikutoga:togagem</include>
 
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-enforcer-plugin</artifactId>
-                <version>1.0</version>
-                <configuration>
-                    <rules>
-                        <requireMavenVersion>
-                            <version>[2.2,3)</version>
-                        </requireMavenVersion>
-                        <requireJavaVersion>
-                            <version>[1.6,)</version>
-                        </requireJavaVersion>
-                    </rules>
-                </configuration>
-            </plugin>
-
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-source-plugin</artifactId>
-                <version>2.1.2</version>
+                <version>3.1.0</version>
                 <configuration>
                     <includePom>true</includePom>
                     <archive>
                         <id>attach-sources</id>
                         <phase>verify</phase>
                         <goals>
-                          <goal>jar-no-fork</goal>
+                            <goal>jar-no-fork</goal>
                         </goals>
                     </execution>
                 </executions>
             </plugin>
 
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-install-plugin</artifactId>
+                <version>3.0.0-M1</version>
+            </plugin>
+
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-deploy-plugin</artifactId>
+                <version>3.0.0-M1</version>
+            </plugin>
+
+
+            <!-- site lifecycle -->
+
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-site-plugin</artifactId>
+                <version>3.7.1</version>
+                <configuration>
+                    <locales>${site.locales}</locales>
+                </configuration>
+            </plugin>
+
+
+            <!-- goals without lifecycle -->
+
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-assembly-plugin</artifactId>
+                <version>3.1.1</version>
+                <configuration>
+                    <descriptors>
+                        <descriptor>src/assembly/src.xml</descriptor>
+                    </descriptors>
+                </configuration>
+            </plugin>
+
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-checkstyle-plugin</artifactId>
+                <version>${checkstyle-plugin.version}</version>
+            </plugin>
+
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-pmd-plugin</artifactId>
+                <version>${pmd-plugin.version}</version>
+                <configuration>
+                    <rulesets>
+                        <ruleset>${project.basedir}/config/pmd/pmdrules.xml</ruleset>
+                    </rulesets>
+                </configuration>
+            </plugin>
+
+            <plugin>
+                <groupId>com.github.spotbugs</groupId>
+                <artifactId>spotbugs-maven-plugin</artifactId>
+                <version>${spotbugs-plugin.version}</version>
+            </plugin>
+
         </plugins>
 
         <resources>
             <resource>
                 <directory>src/main/resources</directory>
                 <includes>
-                    <include>**/*.css</include>
-                    <include>**/*.html</include>
-                    <include>**/*.png</include>
-                    <include>**/*.properties</include>
                     <include>**/*.txt</include>
+
+                    <include>**/*.properties</include>
+
                     <include>**/*.xml</include>
                     <include>**/*.xsd</include>
                     <include>**/*.dtd</include>
+
+                    <include>**/*.html</include>
+                    <include>**/*.htm</include>
+                    <include>**/*.css</include>
+
+                    <include>**/*.png</include>
+                    <include>**/*.gif</include>
+                    <include>**/*.jpeg</include>
+                    <include>**/*.jpg</include>
                 </includes>
                 <excludes>
                     <exclude>**/version.properties</exclude>
+
+                    <exclude>**/.DS_Store</exclude>
+                    <exclude>**/__MACOSX</exclude>
+                    <exclude>**/Thumbs.db</exclude>
+                    <exclude>**/thumbs.db</exclude>
+                    <exclude>**/Desktop.ini</exclude>
+                    <exclude>**/desktop.ini</exclude>
+                    <exclude>**/core</exclude>
                 </excludes>
             </resource>
 
 
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-site-plugin</artifactId>
-                <version>2.2</version>
+                <artifactId>maven-project-info-reports-plugin</artifactId>
+                <version>3.0.0</version>
                 <configuration>
-                    <locales>ja</locales>
-                    <generateReports>true</generateReports>
-                    <generateSitemap>true</generateSitemap>
-                    <inputEncoding>${project.build.sourceEncoding}</inputEncoding>
-                    <outputEncoding>${project.reporting.outputEncoding}</outputEncoding>
+                    <linkOnly>true</linkOnly>
+                    <offline>true</offline>
                 </configuration>
+                <reportSets>
+                    <reportSet>
+                        <reports>
+                            <report>index</report>
+                            <report>summary</report>
+                            <report>licenses</report>
+                            <report>dependency-info</report>
+                            <report>dependencies</report>
+                            <report>dependency-convergence</report>
+                            <report>plugins</report>
+                            <report>plugin-management</report>
+                            <report>team</report>
+                            <report>issue-management</report>
+                            <report>scm</report>
+<!--
+                            <report>dependency-management</report>
+                            <report>distribution-management</report>
+                            <report>ci-management</report>
+                            <report>mailing-lists</report>
+                            <report>modules</report>
+-->
+                        </reports>
+                    </reportSet>
+                </reportSets>
             </plugin>
 
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-javadoc-plugin</artifactId>
-                <version>2.8</version>
+                <version>3.1.0</version>
                 <configuration>
+                    <locale>${javadoc.locale}</locale>
+                    <source>${maven.compiler.source}</source>
+                    <author>false</author>
+                    <notimestamp>true</notimestamp>
+                    <quiet>true</quiet>
                     <show>protected</show>
+                    <header>${project.name} ${project.version} API</header>
+                    <version>true</version>
+                    <!-- for JDK11 javadoc -->
+                    <additionalJOption>-J-Duser.language=${javadoc.locale}</additionalJOption>
                 </configuration>
+                <reportSets>
+                    <reportSet>
+                        <reports>
+                            <report>javadoc</report>
+                        </reports>
+                    </reportSet>
+                </reportSets>
+            </plugin>
+
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-jxr-plugin</artifactId>
+                <version>3.0.0</version>
+            </plugin>
+
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-surefire-report-plugin</artifactId>
+                <version>${surefire-plugin.version}</version>
+            </plugin>
+
+            <plugin>
+                <groupId>org.jacoco</groupId>
+                <artifactId>jacoco-maven-plugin</artifactId>
+                <version>${jacoco-plugin.version}</version>
+                <reportSets>
+                    <reportSet>
+                        <reports>
+                            <report>report</report>
+                        </reports>
+                    </reportSet>
+                </reportSets>
             </plugin>
 
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-checkstyle-plugin</artifactId>
-                <version>2.6</version>
-                <configuration>
-                    <configLocation>${checkstyle.config.location}</configLocation>
-                    <encoding>UTF-8</encoding>
-                </configuration>
+                <version>${checkstyle-plugin.version}</version>
+                <reportSets>
+                    <reportSet>
+                        <reports>
+                            <report>checkstyle</report>
+                        </reports>
+                    </reportSet>
+                </reportSets>
             </plugin>
 
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-pmd-plugin</artifactId>
-                <version>2.5</version>
+                <version>${pmd-plugin.version}</version>
                 <configuration>
-                    <targetJdk>${maven.compiler.target}</targetJdk>
                     <rulesets>
-                        <ruleset>${project.myrepoconf}/pmdrules.xml</ruleset>
+                        <ruleset>config/pmd/pmdrules.xml</ruleset>
                     </rulesets>
                 </configuration>
                 <reportSets>
             </plugin>
 
             <plugin>
-                <groupId>org.codehaus.mojo</groupId>
-                <artifactId>findbugs-maven-plugin</artifactId>
-                <version>2.3.2</version>
-                <configuration>
-                    <effort>Max</effort>
-                    <threshold>Low</threshold>
-                    <inputEncoding>${project.build.sourceEncoding}</inputEncoding>
-                    <outputEncoding>${project.reporting.outputEncoding}</outputEncoding>
-                    <!--excludeFilterFile/-->
-                </configuration>
-            </plugin>
-
-            <plugin>
-                <groupId>org.codehaus.mojo</groupId>
-                <artifactId>cobertura-maven-plugin</artifactId>
-                <version>2.4</version>
-            </plugin>
-
-            <plugin>
-                <groupId>org.codehaus.mojo</groupId>
-                <artifactId>javancss-maven-plugin</artifactId>
-                <version>2.0</version>
-            </plugin>
-
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-jxr-plugin</artifactId>
-                <version>2.2</version>
+                <groupId>com.github.spotbugs</groupId>
+                <artifactId>spotbugs-maven-plugin</artifactId>
+                <version>${spotbugs-plugin.version}</version>
             </plugin>
 
         </plugins>