File tree Expand file tree Collapse file tree
java/com/igormaznitsa/jcp Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -45,6 +45,7 @@ public final class InfoHelper {
4545
4646 public static final String VERSION ;
4747 public static final String URL ;
48+ public static final int YEAR ;
4849
4950 static {
5051 final String path = "/jcpversion.props" ;
@@ -53,6 +54,7 @@ public final class InfoHelper {
5354 props .load (stream );
5455 VERSION = Objects .requireNonNull (props .getProperty ("version" ));
5556 URL = Objects .requireNonNull (props .getProperty ("url" ));
57+ YEAR = Integer .parseInt (Objects .requireNonNull (props .getProperty ("year" )).trim ());
5658 } catch (IOException ex ) {
5759 throw new Error ("Can't read resource: " + path , ex );
5860 }
@@ -67,7 +69,7 @@ public static String getVersion() {
6769
6870
6971 public static String getCopyright () {
70- return "Copyright (C) 2002-2024 Igor A. Maznitsa (https://www.igormaznitsa.com)" ;
72+ return "Copyright (C) 2002-" + YEAR + " Igor A. Maznitsa (https://www.igormaznitsa.com)" ;
7173 }
7274
7375
Original file line number Diff line number Diff line change 11version=${project.version}
22url=${project.url}
3+ year=${current.year}
Original file line number Diff line number Diff line change 157157 <artifactId >maven-shade-plugin</artifactId >
158158 <version >3.3.0</version >
159159 </plugin >
160+ <plugin >
161+ <groupId >org.codehaus.mojo</groupId >
162+ <artifactId >build-helper-maven-plugin</artifactId >
163+ <version >3.0.0</version >
164+ </plugin >
160165 </plugins >
161166 </pluginManagement >
162167 <plugins >
207212 </dependency >
208213 </dependencies >
209214 </plugin >
215+ <plugin >
216+ <groupId >org.codehaus.mojo</groupId >
217+ <artifactId >build-helper-maven-plugin</artifactId >
218+ <executions >
219+ <execution >
220+ <id >timestamp-property</id >
221+ <goals >
222+ <goal >timestamp-property</goal >
223+ </goals >
224+ <phase >validate</phase >
225+ <configuration >
226+ <name >current.year</name >
227+ <pattern >yyyy</pattern >
228+ </configuration >
229+ </execution >
230+ </executions >
231+ </plugin >
210232 </plugins >
211233 </build >
212234</project >
You can’t perform that action at this time.
0 commit comments