[LIB-5] Inheritance from lib-parent pom
authorgotty <gotty@fb0bcced-7025-49ed-a12f-f98bce993226>
Fri, 2 Jun 2017 12:22:30 +0000 (12:22 +0000)
committergotty <gotty@fb0bcced-7025-49ed-a12f-f98bce993226>
Fri, 2 Jun 2017 12:22:30 +0000 (12:22 +0000)
git-svn-id: https://svn.hedgecode.org/lib/snooker-score-api/trunk@119 fb0bcced-7025-49ed-a12f-f98bce993226

pom.xml
src/main/java/org/hedgecode/snooker/api/Season.java

diff --git a/pom.xml b/pom.xml
index 71b33dd..f171311 100644 (file)
--- a/pom.xml
+++ b/pom.xml
 
     <parent>
         <groupId>org.hedgecode.maven</groupId>
-        <artifactId>maven-parent</artifactId>
-        <version>1</version>
+        <artifactId>lib-parent</artifactId>
+        <version>2</version>
+        <relativePath>../lib-parent/pom.xml</relativePath>
     </parent>
 
     <groupId>org.hedgecode.snooker</groupId>
     <artifactId>snooker-score-api</artifactId>
-    <version>0.1-SNAPSHOT</version>
+    <version>0.1</version>
     <packaging>jar</packaging>
 
     <name>Hedgecode Snooker Score API</name>
     </distributionManagement>
 
     <properties>
-        <javaVersion>8</javaVersion>
-        <maven.compiler.source>1.${javaVersion}</maven.compiler.source>
-        <maven.compiler.target>1.${javaVersion}</maven.compiler.target>
         <gsonVersion>2.8.0</gsonVersion>
         <junitVersion>4.8.2</junitVersion>
         <mavenDependencyPluginVersion>2.8</mavenDependencyPluginVersion>
-        <mavenJarPluginVersion>2.5</mavenJarPluginVersion>
         <mavenAssemblyPluginVersion>2.4.1</mavenAssemblyPluginVersion>
-        <mavenReleasePluginVersion>2.5.3</mavenReleasePluginVersion>
-        <mavenPluginToolsVersion>3.4</mavenPluginToolsVersion>
-        <mavenReportsPluginVersion>2.8.1</mavenReportsPluginVersion>
-        <mavenFindBugsPluginVersion>3.0.4</mavenFindBugsPluginVersion>
-        <wagonWebDavVersion>2.7</wagonWebDavVersion>
         <issueComponentId>10012</issueComponentId>
-        <issueKey>LIB</issueKey>
         <issueNumber>5</issueNumber>
     </properties>
 
                     <scmCommentPrefix xml:space="preserve">[${issueKey}-${issueNumber}] </scmCommentPrefix>
                 </configuration>
             </plugin>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-site-plugin</artifactId>
-                <version>${mavenPluginToolsVersion}</version>
-                <configuration>
-                    <locales>en,ru</locales>
-                </configuration>
-                <dependencies>
-                    <dependency>
-                        <groupId>org.apache.maven.wagon</groupId>
-                        <artifactId>wagon-webdav-jackrabbit</artifactId>
-                        <version>${wagonWebDavVersion}</version>
-                    </dependency>
-                </dependencies>
-            </plugin>
         </plugins>
     </build>
 
                 <plugins>
                     <plugin>
                         <groupId>org.apache.maven.plugins</groupId>
-                        <artifactId>maven-project-info-reports-plugin</artifactId>
-                        <version>${mavenReportsPluginVersion}</version>
-                    </plugin>
-                    <plugin>
-                        <groupId>org.apache.maven.plugins</groupId>
                         <artifactId>maven-javadoc-plugin</artifactId>
                         <configuration>
-                            <notimestamp>true</notimestamp>
-                            <quiet>true</quiet>
                             <sourceFileExcludes>
                                 <exclude>org//hedgecode/snooker/cache/assign/*.java</exclude>
                                 <exclude>org//hedgecode/snooker/compare/*.java</exclude>
                                 <exclude>org//hedgecode/snooker/request/*.java</exclude>
                             </sourceFileExcludes>
                         </configuration>
-                        <reportSets>
-                            <reportSet>
-                                <id>default</id>
-                                <reports>
-                                    <report>javadoc</report>
-                                </reports>
-                            </reportSet>
-                        </reportSets>
-                    </plugin>
-                    <plugin>
-                        <groupId>org.codehaus.mojo</groupId>
-                        <artifactId>findbugs-maven-plugin</artifactId>
-                        <version>${mavenFindBugsPluginVersion}</version>
                     </plugin>
                 </plugins>
             </reporting>
index f4b1cf5..3732528 100644 (file)
@@ -30,9 +30,12 @@ public class Season implements Serializable {
 
     private static final Calendar CURRENT_CALENDAR = Calendar.getInstance();
 
+    private static final int NEW_SEASON_MONTH = 5; /* June */
+
     public static final int BEGIN_YEAR = 2005;
+
     public static final int CURRENT_YEAR =
-            CURRENT_CALENDAR.get(Calendar.MONTH) >= 6
+            CURRENT_CALENDAR.get(Calendar.MONTH) >= NEW_SEASON_MONTH
                     ? CURRENT_CALENDAR.get(Calendar.YEAR)
                     : CURRENT_CALENDAR.get(Calendar.YEAR) - 1;