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

Scott Cantor cantor.2 at osu.edu
Thu Mar 14 14:48:34 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=391c8d9f610f9aca99054f43af1987cacc8904dc

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

commit 391c8d9f610f9aca99054f43af1987cacc8904dc
Author: Scott Cantor <cantor.2 at osu.edu>
AuthorDate: Thu Mar 14 10:48:31 2024 -0400

    JSMD-8 - Wrong syntax for User-Agent
    
    https://shibboleth.atlassian.net/browse/JSMD-8
    
    Redo the Version additions properly and relocate to -api module.
    Fix User Agent builders to rely on Version class.
---
 shib-metadata-api/pom.xml                          | 28 +++++++++++++++++++++-
 .../net/shibboleth/saml/metadata}/Version.java     |  2 +-
 .../net/shibboleth/saml/metadata/package-info.java | 18 ++++++++++++++
 shib-metadata-impl/pom.xml                         |  2 +-
 shib-metadata-spring/pom.xml                       | 28 +---------------------
 .../http/FileCachingHttpClientFactoryBean.java     |  4 +++-
 .../spring/http/HttpClientFactoryBean.java         |  4 +++-
 .../http/InMemoryCachingHttpClientFactoryBean.java |  4 +++-
 8 files changed, 57 insertions(+), 33 deletions(-)

diff --git a/shib-metadata-api/pom.xml b/shib-metadata-api/pom.xml
index 136e990e..9501f40d 100644
--- a/shib-metadata-api/pom.xml
+++ b/shib-metadata-api/pom.xml
@@ -17,7 +17,7 @@
 
     <properties>
         <checkstyle.configLocation>${project.basedir}/../resources/checkstyle/checkstyle.xml</checkstyle.configLocation>
-        <automatic.module.name>net.shibboleth.metadata.api</automatic.module.name>
+        <automatic.module.name>net.shibboleth.saml.metadata.api</automatic.module.name>
     </properties>
 
     <dependencies>
@@ -59,4 +59,30 @@
 
     </dependencies>
 
+    <build>
+        <plugins>
+            <plugin>
+                <artifactId>maven-jar-plugin</artifactId>
+                <configuration>
+                    <archive>
+                        <index>true</index>
+                        <manifestEntries>
+                            <Main-Class>net.shibboleth.saml.metadata.Version</Main-Class>
+                        </manifestEntries>
+                        <manifestSections>
+                            <manifestSection>
+                                <name>net/shibboleth/saml/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-api/src/main/java/net/shibboleth/saml/metadata/Version.java
similarity index 96%
rename from shib-metadata-spring/src/main/java/net/shibboleth/spring/Version.java
rename to shib-metadata-api/src/main/java/net/shibboleth/saml/metadata/Version.java
index ed96a078..299bd4e0 100644
--- a/shib-metadata-spring/src/main/java/net/shibboleth/spring/Version.java
+++ b/shib-metadata-api/src/main/java/net/shibboleth/saml/metadata/Version.java
@@ -12,7 +12,7 @@
  * limitations under the License.
  */
 
-package net.shibboleth.spring;
+package net.shibboleth.saml.metadata;
 
 import javax.annotation.Nullable;
 
diff --git a/shib-metadata-api/src/main/java/net/shibboleth/saml/metadata/package-info.java b/shib-metadata-api/src/main/java/net/shibboleth/saml/metadata/package-info.java
new file mode 100644
index 00000000..1d7d884c
--- /dev/null
+++ b/shib-metadata-api/src/main/java/net/shibboleth/saml/metadata/package-info.java
@@ -0,0 +1,18 @@
+/*
+ * 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.
+ */
+
+/**
+ * Any general top-level classes for the library.
+ */
+package net.shibboleth.saml.metadata;
\ No newline at end of file
diff --git a/shib-metadata-impl/pom.xml b/shib-metadata-impl/pom.xml
index 2286e6ed..d90acf2c 100644
--- a/shib-metadata-impl/pom.xml
+++ b/shib-metadata-impl/pom.xml
@@ -17,7 +17,7 @@
 
     <properties>
         <checkstyle.configLocation>${project.basedir}/../resources/checkstyle/checkstyle.xml</checkstyle.configLocation>
-        <automatic.module.name>net.shibboleth.metadata.impl</automatic.module.name>
+        <automatic.module.name>net.shibboleth.saml.metadata.impl</automatic.module.name>
     </properties>
 
     <dependencies>
diff --git a/shib-metadata-spring/pom.xml b/shib-metadata-spring/pom.xml
index 3ac6b97a..dc748dff 100644
--- a/shib-metadata-spring/pom.xml
+++ b/shib-metadata-spring/pom.xml
@@ -17,7 +17,7 @@
 
     <properties>
         <checkstyle.configLocation>${project.basedir}/../resources/checkstyle/checkstyle.xml</checkstyle.configLocation>
-        <automatic.module.name>net.shibboleth.metadata.spring</automatic.module.name>
+        <automatic.module.name>net.shibboleth.saml.metadata.spring</automatic.module.name>
     </properties>
 
     <dependencies>
@@ -160,30 +160,4 @@
 
     </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/http/FileCachingHttpClientFactoryBean.java b/shib-metadata-spring/src/main/java/net/shibboleth/spring/http/FileCachingHttpClientFactoryBean.java
index c25df20c..1f33f7c4 100644
--- a/shib-metadata-spring/src/main/java/net/shibboleth/spring/http/FileCachingHttpClientFactoryBean.java
+++ b/shib-metadata-spring/src/main/java/net/shibboleth/spring/http/FileCachingHttpClientFactoryBean.java
@@ -14,6 +14,8 @@
 
 package net.shibboleth.spring.http;
 
+import net.shibboleth.saml.metadata.Version;
+
 /**
  * Factory bean customization for the Shibboleth IdP.
  */
@@ -26,7 +28,7 @@ public class FileCachingHttpClientFactoryBean
      */
     public FileCachingHttpClientFactoryBean() {
         final StringBuilder stringBuilder = new StringBuilder("Shibboleth/");
-        stringBuilder.append(getClass().getPackage().getImplementationVersion())
+        stringBuilder.append(Version.getVersion())
             .append(" OpenSAML/")
             .append(org.opensaml.core.Version.getVersion());
         setUserAgent(stringBuilder.toString());
diff --git a/shib-metadata-spring/src/main/java/net/shibboleth/spring/http/HttpClientFactoryBean.java b/shib-metadata-spring/src/main/java/net/shibboleth/spring/http/HttpClientFactoryBean.java
index 272e5386..669ab8e5 100644
--- a/shib-metadata-spring/src/main/java/net/shibboleth/spring/http/HttpClientFactoryBean.java
+++ b/shib-metadata-spring/src/main/java/net/shibboleth/spring/http/HttpClientFactoryBean.java
@@ -14,6 +14,8 @@
 
 package net.shibboleth.spring.http;
 
+import net.shibboleth.saml.metadata.Version;
+
 /**
  * Factory bean customization for the Shibboleth IdP.
  */
@@ -25,7 +27,7 @@ public class HttpClientFactoryBean extends net.shibboleth.shared.spring.httpclie
      */
     public HttpClientFactoryBean() {
         final StringBuilder stringBuilder = new StringBuilder("Shibboleth/");
-        stringBuilder.append(getClass().getPackage().getImplementationVersion())
+        stringBuilder.append(Version.getVersion())
             .append(" OpenSAML/")
             .append(org.opensaml.core.Version.getVersion());
         setUserAgent(stringBuilder.toString());
diff --git a/shib-metadata-spring/src/main/java/net/shibboleth/spring/http/InMemoryCachingHttpClientFactoryBean.java b/shib-metadata-spring/src/main/java/net/shibboleth/spring/http/InMemoryCachingHttpClientFactoryBean.java
index 25b48d87..f0c2a16f 100644
--- a/shib-metadata-spring/src/main/java/net/shibboleth/spring/http/InMemoryCachingHttpClientFactoryBean.java
+++ b/shib-metadata-spring/src/main/java/net/shibboleth/spring/http/InMemoryCachingHttpClientFactoryBean.java
@@ -14,6 +14,8 @@
 
 package net.shibboleth.spring.http;
 
+import net.shibboleth.saml.metadata.Version;
+
 /**
  *  Factory bean customization for the Shibboleth IdP.
  */
@@ -26,7 +28,7 @@ public class InMemoryCachingHttpClientFactoryBean
      */
     public InMemoryCachingHttpClientFactoryBean() {
         final StringBuilder stringBuilder = new StringBuilder("Shibboleth/");
-        stringBuilder.append(getClass().getPackage().getImplementationVersion())
+        stringBuilder.append(Version.getVersion())
             .append(" OpenSAML/")
             .append(org.opensaml.core.Version.getVersion());
         setUserAgent(stringBuilder.toString());

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


More information about the commits mailing list