[java-shib-metadata] branch main updated: JSMD-8 - Wrong syntax for User-Agent

Scott Cantor cantor.2 at osu.edu
Wed Feb 28 13:21:48 UTC 2024


This is an automated email from the git hooks/post-receive script.

scantor pushed a commit to branch main
in repository java-shib-metadata.

View the commit online:
http://git.shibboleth.net/view/?p=java-shib-metadata.git;a=commit;h=a9e716bac9a44756ce8b03864f74136059c2e257

The following commit(s) were added to refs/heads/main by this push:
     new a9e716ba JSMD-8 - Wrong syntax for User-Agent
a9e716ba is described below

commit a9e716bac9a44756ce8b03864f74136059c2e257
Author: Scott Cantor <cantor.2 at osu.edu>
AuthorDate: Wed Feb 28 08:21:45 2024 -0500

    JSMD-8 - Wrong syntax for User-Agent
    
    https://shibboleth.atlassian.net/browse/JSMD-8
    
    Added Version class and POM change to add version into jar.
---
 shib-metadata-spring/pom.xml                       | 26 ++++++++++++
 .../main/java/net/shibboleth/spring/Version.java   | 47 ++++++++++++++++++++++
 2 files changed, 73 insertions(+)

diff --git a/shib-metadata-spring/pom.xml b/shib-metadata-spring/pom.xml
index b80ef67d..abf2a536 100644
--- a/shib-metadata-spring/pom.xml
+++ b/shib-metadata-spring/pom.xml
@@ -160,4 +160,30 @@
 
     </dependencies>
 
+    <build>
+        <plugins>
+            <plugin>
+                <artifactId>maven-jar-plugin</artifactId>
+                <configuration>
+                    <archive>
+                        <index>true</index>
+                        <manifestEntries>
+                            <Main-Class>net.shibboleth.spring.Version</Main-Class>
+                        </manifestEntries>
+                        <manifestSections>
+                            <manifestSection>
+                                <name>net/shibboleth/metadata/</name>
+                                <manifestEntries>
+                                    <Implementation-Title>${project.artifactId}</Implementation-Title>
+                                    <Implementation-Version>${project.version}</Implementation-Version>
+                                    <Implementation-Vendor>shibboleth.net</Implementation-Vendor>
+                                </manifestEntries>
+                            </manifestSection>
+                        </manifestSections>
+                    </archive>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+
 </project>
diff --git a/shib-metadata-spring/src/main/java/net/shibboleth/spring/Version.java b/shib-metadata-spring/src/main/java/net/shibboleth/spring/Version.java
new file mode 100644
index 00000000..ed96a078
--- /dev/null
+++ b/shib-metadata-spring/src/main/java/net/shibboleth/spring/Version.java
@@ -0,0 +1,47 @@
+/*
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package net.shibboleth.spring;
+
+import javax.annotation.Nullable;
+
+/** Class for printing the version of this library. */
+public final class Version {
+
+    /** IdP version. */
+    @Nullable private static final String VERSION = Version.class.getPackage().getImplementationVersion();
+
+    /** Constructor. */
+    private Version() {
+    }
+
+    /**
+     * Main entry point to program.
+     * 
+     * @param args command line arguments
+     */
+    public static void main(final String[] args) {
+        System.out.println(VERSION);
+    }
+
+    /**
+     * Get the version of the library.
+     * 
+     * @return version of the library
+     */
+    @Nullable public static String getVersion() {
+        return VERSION;
+    }
+    
+}
\ No newline at end of file

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the commits mailing list