Skip to content

Commit 3580533

Browse files
committed
add version info
1 parent a180fcc commit 3580533

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,16 @@
44

55
Maven proxy to download NodeJS binaries as Maven artifacts.
66

7+
This is a Maven Artifact Proxy for NodeJS binaries located at: https://nodejs.org/dist. Every call to this repository is routed directly to this URL, so it should not be used directly as Maven Repository, but cached by your own Maven Artifact Manager.
8+
79
Steps to build and start the proxy:
810

911
- Go to maven-nodejs-proxy directory
1012
- Build server with `mvn clean install`
1113
- Start server with<br/>
1214
`java -jar target/io.wcm.devops.maven.nodejs-proxy-<version>.jar server config.yml`
1315
- Go to [http://localhost:8080](http://localhost:8080) for further instructions
16+
17+
---
18+
19+
A public instance of this proxy is available at: https://maven-nodejs-proxy.pvtool.org/

maven-nodejs-proxy/src/main/java/io/wcm/devops/maven/nodejsproxy/resource/IndexPageBuilder.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,9 @@ public static String build(MavenProxyConfiguration config) {
5757
exampleUrlsMarkup.append("<li><a href=\"").append(url).append("\">").append(url).append("</a></li>");
5858

5959
}
60+
61+
String serviceVersion = IndexPageBuilder.class.getPackage().getImplementationVersion();
62+
6063
return "<html>"
6164
+ "<head><title>Maven NodeJS Proxy</title></head>"
6265
+ "<body>"
@@ -74,6 +77,7 @@ public static String build(MavenProxyConfiguration config) {
7477
+ exampleUrlsMarkup
7578
+ "</ul>"
7679
+ "<p>For all files SHA1 checksums are supported (.sha1 suffix). MD5 checksums are not supported.</p>"
80+
+ (serviceVersion != null ? "<hr/><p>Version " + IndexPageBuilder.class.getPackage().getImplementationVersion() + ".</p>" : "")
7781
+ "</body>"
7882
+ "</html>";
7983
}

0 commit comments

Comments
 (0)