You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@juneau.apache.org by gg...@apache.org on 2025/06/06 19:21:55 UTC

(juneau) branch master updated (4fef111fc -> 9debdd613)

This is an automated email from the ASF dual-hosted git repository.

ggregory pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/juneau.git


    from 4fef111fc Tabs -> spaces
     new 311a83674 Inherit Maven properties from parent POM
     new 9debdd613 org.apache.juneau.microservice.Microservice.Builder.manifest(Object) now handles java.nio.file.Path

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 RELEASE-NOTES.txt                                  |  3 +-
 juneau-core/juneau-assertions/pom.xml              |  2 -
 juneau-core/juneau-common/pom.xml                  |  2 -
 juneau-core/juneau-config/pom.xml                  |  2 -
 juneau-core/juneau-dto/pom.xml                     |  2 -
 juneau-core/juneau-marshall-rdf/pom.xml            |  2 -
 juneau-core/juneau-marshall/pom.xml                |  2 -
 .../java/org/apache/juneau/utils/ManifestFile.java | 67 +++++++++++++++-------
 juneau-examples/juneau-examples-core/pom.xml       |  2 -
 juneau-examples/juneau-examples-rest/pom.xml       |  2 -
 .../juneau-microservice-core/pom.xml               |  2 -
 .../apache/juneau/microservice/Microservice.java   | 46 ++++++++-------
 juneau-rest/juneau-rest-client/pom.xml             |  2 -
 juneau-rest/juneau-rest-common/pom.xml             |  2 -
 juneau-rest/juneau-rest-mock/pom.xml               |  2 -
 juneau-rest/juneau-rest-server-rdf/pom.xml         |  2 -
 juneau-rest/juneau-rest-server/pom.xml             |  2 -
 juneau-utest-utils/pom.xml                         |  3 -
 juneau-utest/pom.xml                               |  3 -
 19 files changed, 72 insertions(+), 78 deletions(-)


(juneau) 01/02: Inherit Maven properties from parent POM

Posted by gg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/juneau.git

commit 311a83674e24ed9eea8eee1ac54fabbf427c8ad3
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Fri Jun 6 15:21:46 2025 -0400

    Inherit Maven properties from parent POM
    
    - maven.compiler.source
    - maven.compiler.target
---
 juneau-core/juneau-assertions/pom.xml                | 2 --
 juneau-core/juneau-common/pom.xml                    | 2 --
 juneau-core/juneau-config/pom.xml                    | 2 --
 juneau-core/juneau-dto/pom.xml                       | 2 --
 juneau-core/juneau-marshall-rdf/pom.xml              | 2 --
 juneau-core/juneau-marshall/pom.xml                  | 2 --
 juneau-examples/juneau-examples-core/pom.xml         | 2 --
 juneau-examples/juneau-examples-rest/pom.xml         | 2 --
 juneau-microservice/juneau-microservice-core/pom.xml | 2 --
 juneau-rest/juneau-rest-client/pom.xml               | 2 --
 juneau-rest/juneau-rest-common/pom.xml               | 2 --
 juneau-rest/juneau-rest-mock/pom.xml                 | 2 --
 juneau-rest/juneau-rest-server-rdf/pom.xml           | 2 --
 juneau-rest/juneau-rest-server/pom.xml               | 2 --
 juneau-utest-utils/pom.xml                           | 3 ---
 juneau-utest/pom.xml                                 | 3 ---
 16 files changed, 34 deletions(-)

diff --git a/juneau-core/juneau-assertions/pom.xml b/juneau-core/juneau-assertions/pom.xml
index 3f653f9d1..9eeb42e63 100644
--- a/juneau-core/juneau-assertions/pom.xml
+++ b/juneau-core/juneau-assertions/pom.xml
@@ -30,8 +30,6 @@
 
 	<properties>
 		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-		<maven.compiler.source>11</maven.compiler.source>
-		<maven.compiler.target>11</maven.compiler.target>
 	</properties>
 
 	<dependencies>
diff --git a/juneau-core/juneau-common/pom.xml b/juneau-core/juneau-common/pom.xml
index 6b38516ee..3e4bce916 100644
--- a/juneau-core/juneau-common/pom.xml
+++ b/juneau-core/juneau-common/pom.xml
@@ -30,8 +30,6 @@
 
 	<properties>
 		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-		<maven.compiler.source>11</maven.compiler.source>
-		<maven.compiler.target>11</maven.compiler.target>
 	</properties>
 
 	<dependencies>
diff --git a/juneau-core/juneau-config/pom.xml b/juneau-core/juneau-config/pom.xml
index dd4c0b81f..e2ca098e5 100644
--- a/juneau-core/juneau-config/pom.xml
+++ b/juneau-core/juneau-config/pom.xml
@@ -30,8 +30,6 @@
 
 	<properties>
 		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-		<maven.compiler.source>11</maven.compiler.source>
-		<maven.compiler.target>11</maven.compiler.target>
 	</properties>
 
 	<dependencies>
diff --git a/juneau-core/juneau-dto/pom.xml b/juneau-core/juneau-dto/pom.xml
index 448e98576..ffb178fee 100644
--- a/juneau-core/juneau-dto/pom.xml
+++ b/juneau-core/juneau-dto/pom.xml
@@ -30,8 +30,6 @@
 
 	<properties>
 		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-		<maven.compiler.source>11</maven.compiler.source>
-		<maven.compiler.target>11</maven.compiler.target>
 	</properties>
 
 	<dependencies>
diff --git a/juneau-core/juneau-marshall-rdf/pom.xml b/juneau-core/juneau-marshall-rdf/pom.xml
index 151ac0bde..eb42f0b30 100644
--- a/juneau-core/juneau-marshall-rdf/pom.xml
+++ b/juneau-core/juneau-marshall-rdf/pom.xml
@@ -30,8 +30,6 @@
 
 	<properties>
 		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-		<maven.compiler.source>11</maven.compiler.source>
-		<maven.compiler.target>11</maven.compiler.target>
 	</properties>
 
 	<dependencies>
diff --git a/juneau-core/juneau-marshall/pom.xml b/juneau-core/juneau-marshall/pom.xml
index 59fd76181..57383b6d7 100644
--- a/juneau-core/juneau-marshall/pom.xml
+++ b/juneau-core/juneau-marshall/pom.xml
@@ -30,8 +30,6 @@
 
 	<properties>
 		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-		<maven.compiler.source>11</maven.compiler.source>
-		<maven.compiler.target>11</maven.compiler.target>
 	</properties>
 
 	<dependencies>
diff --git a/juneau-examples/juneau-examples-core/pom.xml b/juneau-examples/juneau-examples-core/pom.xml
index cb80588a4..02018fb6c 100644
--- a/juneau-examples/juneau-examples-core/pom.xml
+++ b/juneau-examples/juneau-examples-core/pom.xml
@@ -30,8 +30,6 @@
 
 	<properties>
 		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-		<maven.compiler.source>11</maven.compiler.source>
-		<maven.compiler.target>11</maven.compiler.target>
 	</properties>
 
 	<dependencies>
diff --git a/juneau-examples/juneau-examples-rest/pom.xml b/juneau-examples/juneau-examples-rest/pom.xml
index 11ca36d57..2b8330712 100644
--- a/juneau-examples/juneau-examples-rest/pom.xml
+++ b/juneau-examples/juneau-examples-rest/pom.xml
@@ -30,8 +30,6 @@
 
 	<properties>
 		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-		<maven.compiler.source>11</maven.compiler.source>
-		<maven.compiler.target>11</maven.compiler.target>
 		<encoding>UTF-8</encoding>
 	</properties>
 
diff --git a/juneau-microservice/juneau-microservice-core/pom.xml b/juneau-microservice/juneau-microservice-core/pom.xml
index 3be5426ab..61fc59865 100644
--- a/juneau-microservice/juneau-microservice-core/pom.xml
+++ b/juneau-microservice/juneau-microservice-core/pom.xml
@@ -31,8 +31,6 @@
 
 	<properties>
 		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-		<maven.compiler.source>11</maven.compiler.source>
-		<maven.compiler.target>11</maven.compiler.target>
 	</properties>
 
 	<dependencies>
diff --git a/juneau-rest/juneau-rest-client/pom.xml b/juneau-rest/juneau-rest-client/pom.xml
index 65693a474..db4541391 100644
--- a/juneau-rest/juneau-rest-client/pom.xml
+++ b/juneau-rest/juneau-rest-client/pom.xml
@@ -30,8 +30,6 @@
 
 	<properties>
 		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-		<maven.compiler.source>11</maven.compiler.source>
-		<maven.compiler.target>11</maven.compiler.target>
 	</properties>
 
 	<dependencies>
diff --git a/juneau-rest/juneau-rest-common/pom.xml b/juneau-rest/juneau-rest-common/pom.xml
index a6730a77a..991152be2 100644
--- a/juneau-rest/juneau-rest-common/pom.xml
+++ b/juneau-rest/juneau-rest-common/pom.xml
@@ -30,8 +30,6 @@
 
 	<properties>
 		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-		<maven.compiler.source>11</maven.compiler.source>
-		<maven.compiler.target>11</maven.compiler.target>
 	</properties>
 
 	<dependencies>
diff --git a/juneau-rest/juneau-rest-mock/pom.xml b/juneau-rest/juneau-rest-mock/pom.xml
index 0aa52248d..eefb32ab7 100644
--- a/juneau-rest/juneau-rest-mock/pom.xml
+++ b/juneau-rest/juneau-rest-mock/pom.xml
@@ -30,8 +30,6 @@
 
 	<properties>
 		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-		<maven.compiler.source>11</maven.compiler.source>
-		<maven.compiler.target>11</maven.compiler.target>
 	</properties>
 
 	<dependencies>
diff --git a/juneau-rest/juneau-rest-server-rdf/pom.xml b/juneau-rest/juneau-rest-server-rdf/pom.xml
index b42e2392e..e5cfbaeff 100644
--- a/juneau-rest/juneau-rest-server-rdf/pom.xml
+++ b/juneau-rest/juneau-rest-server-rdf/pom.xml
@@ -30,8 +30,6 @@
 
 	<properties>
 		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-		<maven.compiler.source>11</maven.compiler.source>
-		<maven.compiler.target>11</maven.compiler.target>
 	</properties>
 
 	<dependencies>
diff --git a/juneau-rest/juneau-rest-server/pom.xml b/juneau-rest/juneau-rest-server/pom.xml
index 27fc98ae9..5121d60d3 100644
--- a/juneau-rest/juneau-rest-server/pom.xml
+++ b/juneau-rest/juneau-rest-server/pom.xml
@@ -30,8 +30,6 @@
 
 	<properties>
 		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-		<maven.compiler.source>11</maven.compiler.source>
-		<maven.compiler.target>11</maven.compiler.target>
 	</properties>
 
 	<dependencies>
diff --git a/juneau-utest-utils/pom.xml b/juneau-utest-utils/pom.xml
index bb9dc850e..fcd920ca2 100644
--- a/juneau-utest-utils/pom.xml
+++ b/juneau-utest-utils/pom.xml
@@ -30,9 +30,6 @@
 
 	<properties>
 		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-		<maven.compiler.source>11</maven.compiler.source>
-		<maven.compiler.target>11</maven.compiler.target>
-
 		<!-- Skip javadoc generation since we generate them in the aggregate pom -->
 		<maven.javadoc.skip>true</maven.javadoc.skip>
 	</properties>
diff --git a/juneau-utest/pom.xml b/juneau-utest/pom.xml
index ce9c15115..874e020cd 100644
--- a/juneau-utest/pom.xml
+++ b/juneau-utest/pom.xml
@@ -30,9 +30,6 @@
 
 	<properties>
 		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-		<maven.compiler.source>11</maven.compiler.source>
-		<maven.compiler.target>11</maven.compiler.target>
-
 		<!-- Skip javadoc generation since we generate them in the aggregate pom -->
 		<maven.javadoc.skip>true</maven.javadoc.skip>
 	</properties>


(juneau) 02/02: org.apache.juneau.microservice.Microservice.Builder.manifest(Object) now handles java.nio.file.Path

Posted by gg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/juneau.git

commit 9debdd613b9121803fabc67ed6a42dd3815ff139
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Fri Jun 6 15:21:49 2025 -0400

    org.apache.juneau.microservice.Microservice.Builder.manifest(Object) now
    handles java.nio.file.Path
---
 RELEASE-NOTES.txt                                  |  3 +-
 .../java/org/apache/juneau/utils/ManifestFile.java | 67 +++++++++++++++-------
 .../apache/juneau/microservice/Microservice.java   | 46 ++++++++-------
 3 files changed, 72 insertions(+), 44 deletions(-)

diff --git a/RELEASE-NOTES.txt b/RELEASE-NOTES.txt
index 3e7618739..7ebcd2707 100644
--- a/RELEASE-NOTES.txt
+++ b/RELEASE-NOTES.txt
@@ -16,6 +16,7 @@ Release Notes - Juneau - Version 9.1.0
 
 ** Changes
 
+    * Bump Java platform requirement from Java 11 to 17.
     * [JUNEAU-253] - Bump springboot.version from 3.2.2 to 3.4.4.
     * [JUNEAU-254] - Bump jetty.version from 11.0.16 to 11.0.21, #207, #208.
     * [JUNEAU-255] - Bump org.apache:apache from 29 to 31.
@@ -26,7 +27,6 @@ Release Notes - Juneau - Version 9.1.0
     * [JUNEAU-260] - Bump maven-surefire-report-plugin from 2.22.2 to 3.1.2.
     * [JUNEAU-261] - Bump org.apache.derby:derby from 10.16.1.1 to 10.17.1.0 #118.
     * [JUNEAU-263] - Remove Google Analytics from the Juneau Website.
-    * Bump Java platform requirement from Java 11 to 17.
     * [JUNEAU-262] Port Jetty from 11.0.20 to 12.0.20 #148, #156, #160, #165, #169, #175, #183, #201.
     * [JUNEAU-252] Bump org.eclipse.jgit:org.eclipse.jgit from 6.6.1.202309021850-r to 7.2.1.202505142326-r #112, #123, #137, #152, #166, #184, #191, #209.
     * [JUNEAU-253] Bump springboot.version from 3.1.3 to 3.4.5 #136, #138, #142, #146, #153, #158, #162, #167, #172, #177, #186, #187, #188, #193, #198.
@@ -51,6 +51,7 @@ Release Notes - Juneau - Version 9.1.0
     * org.apache.juneau.microservice.jetty.JettyMicroservice.Builder.jettyXml(Object, boolean) now handles java.nio.file.Path.
     * Add org.apache.juneau.common.internal.PathReaderBuilder
     * Add org.apache.juneau.common.internal.IOUtils.read(Path)
+    * org.apache.juneau.microservice.Microservice.Builder.manifest(Object) now handles java.nio.file.Path.
     
 Release Notes - Juneau - Version 9.0.1
 
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/utils/ManifestFile.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/utils/ManifestFile.java
index bbedf0ca7..c38c903b9 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/utils/ManifestFile.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/utils/ManifestFile.java
@@ -12,14 +12,23 @@
 // ***************************************************************************************************************************
 package org.apache.juneau.utils;
 
-import static org.apache.juneau.common.internal.IOUtils.*;
+import static org.apache.juneau.common.internal.IOUtils.UTF8;
+import static org.apache.juneau.common.internal.IOUtils.read;
 
-import java.io.*;
-import java.net.*;
-import java.util.jar.*;
+import java.io.ByteArrayInputStream;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.Reader;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.util.jar.Manifest;
 
-import org.apache.juneau.collections.*;
-import org.apache.juneau.common.internal.*;
+import org.apache.juneau.collections.JsonMap;
+import org.apache.juneau.common.internal.ThrowableUtils;
 
 /**
  * Utility class for working with Jar manifest files.
@@ -37,21 +46,37 @@ public class ManifestFile extends JsonMap {
 
 	private static final long serialVersionUID = 1L;
 
-	/**
-	 * Create an instance of this class from a manifest file on the file system.
-	 *
-	 * @param f The manifest file.
-	 * @throws IOException If a problem occurred while trying to read the manifest file.
-	 */
-	public ManifestFile(File f) throws IOException {
-		Manifest mf = new Manifest();
-		try (FileInputStream fis = new FileInputStream(f)) {
-			mf.read(fis);
-			load(mf);
-		} catch (IOException e) {
-			throw new IOException("Problem detected in MANIFEST.MF.  Contents below:\n"+read(f), e);
-		}
-	}
+    /**
+     * Create an instance of this class from a manifest file on the file system.
+     *
+     * @param f The manifest file.
+     * @throws IOException If a problem occurred while trying to read the manifest file.
+     */
+    public ManifestFile(File f) throws IOException {
+        Manifest mf = new Manifest();
+        try (FileInputStream fis = new FileInputStream(f)) {
+            mf.read(fis);
+            load(mf);
+        } catch (IOException e) {
+            throw new IOException("Problem detected in MANIFEST.MF.  Contents below:\n"+read(f), e);
+        }
+    }
+
+    /**
+     * Create an instance of this class from a manifest path on the file system.
+     *
+     * @param path The manifest path.
+     * @throws IOException If a problem occurred while trying to read the manifest path.
+     */
+    public ManifestFile(Path path) throws IOException {
+        Manifest mf = new Manifest();
+        try (InputStream fis = Files.newInputStream(path)) {
+            mf.read(fis);
+            load(mf);
+        } catch (IOException e) {
+            throw new IOException("Problem detected in MANIFEST.MF.  Contents below:\n"+read(path), e);
+        }
+    }
 
 	/**
 	 * Create an instance of this class from a {@link Manifest} object.
diff --git a/juneau-microservice/juneau-microservice-core/src/main/java/org/apache/juneau/microservice/Microservice.java b/juneau-microservice/juneau-microservice-core/src/main/java/org/apache/juneau/microservice/Microservice.java
index 72c2d0d8c..2277ade12 100755
--- a/juneau-microservice/juneau-microservice-core/src/main/java/org/apache/juneau/microservice/Microservice.java
+++ b/juneau-microservice/juneau-microservice-core/src/main/java/org/apache/juneau/microservice/Microservice.java
@@ -263,28 +263,30 @@ public class Microservice implements ConfigEventListener {
 		 * @return This object.
 		 * @throws IOException Thrown by underlying stream.
 		 */
-		public Builder manifest(Object value) throws IOException {
-			if (value == null)
-				this.manifest = null;
-			else if (value instanceof ManifestFile)
-				this.manifest = (ManifestFile)value;
-			else if (value instanceof Manifest)
-				this.manifest = new ManifestFile((Manifest)value);
-			else if (value instanceof Reader)
-				this.manifest = new ManifestFile((Reader)value);
-			else if (value instanceof InputStream)
-				this.manifest = new ManifestFile((InputStream)value);
-			else if (value instanceof File)
-				this.manifest = new ManifestFile((File)value);
-			else if (value instanceof String)
-				this.manifest = new ManifestFile(resolveFile((String)value));
-			else if (value instanceof Class)
-				this.manifest = new ManifestFile((Class<?>)value);
-			else
-				throw new BasicRuntimeException("Invalid type passed to Builder.manifest(Object).  Type=[{0}]", className(value));
-
-			return this;
-		}
+        public Builder manifest(Object value) throws IOException {
+            if (value == null)
+                this.manifest = null;
+            else if (value instanceof ManifestFile manifestFile)
+                this.manifest = manifestFile;
+            else if (value instanceof Manifest manifest)
+                this.manifest = new ManifestFile(manifest);
+            else if (value instanceof Reader reader)
+                this.manifest = new ManifestFile(reader);
+            else if (value instanceof InputStream inputStream)
+                this.manifest = new ManifestFile(inputStream);
+            else if (value instanceof File file)
+                this.manifest = new ManifestFile(file);
+            else if (value instanceof Path path)
+                this.manifest = new ManifestFile(path);
+            else if (value instanceof String string)
+                this.manifest = new ManifestFile(resolveFile(string));
+            else if (value instanceof Class clazz)
+                this.manifest = new ManifestFile(clazz);
+            else
+                throw new BasicRuntimeException("Invalid type passed to Builder.manifest(Object).  Type=[{0}]", className(value));
+
+            return this;
+        }
 
 		/**
 		 * Specifies the logger used by the microservice and returned by the {@link Microservice#getLogger()} method.