Skip to content

Commit 0967d7e

Browse files
committed
refactoring
1 parent c4b5d56 commit 0967d7e

3 files changed

Lines changed: 9 additions & 6 deletions

File tree

jcp/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@
289289
<directory>src/main/resources</directory>
290290
<filtering>true</filtering>
291291
<includes>
292-
<include>**/*.prop</include>
292+
<include>**/*.props</include>
293293
</includes>
294294
</resource>
295295
</resources>

jcp/src/main/java/com/igormaznitsa/jcp/InfoHelper.java

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,14 +43,16 @@ public final class InfoHelper {
4343
public static final String DELIMITER = "-------------------------------------------------";
4444
public static final String SHORT_DELIMITER = "----------------------";
4545

46-
private static final String version;
46+
public static final String VERSION;
47+
public static final String URL;
4748

4849
static {
49-
final String path = "/jcpversion.properties";
50+
final String path = "/jcpversion.props";
5051
try (final InputStream stream = InfoHelper.class.getResourceAsStream(path)) {
5152
final Properties props = new Properties();
5253
props.load(stream);
53-
version = Objects.requireNonNull(props.getProperty("version"));
54+
VERSION = Objects.requireNonNull(props.getProperty("version"));
55+
URL = Objects.requireNonNull(props.getProperty("url"));
5456
} catch (IOException ex) {
5557
throw new Error("Can't read resource: " + path, ex);
5658
}
@@ -60,7 +62,7 @@ private InfoHelper() {
6062
}
6163

6264
public static String getVersion() {
63-
return "v" + version;
65+
return "v" + VERSION;
6466
}
6567

6668

@@ -70,7 +72,7 @@ public static String getCopyright() {
7072

7173

7274
public static String getSite() {
73-
return "Project page: https://github.com/raydac/java-comment-preprocessor";
75+
return "Project page: " + URL;
7476
}
7577

7678

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
version=${project.version}
2+
url=${project.url}

0 commit comments

Comments
 (0)