juneau-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jamesbog...@apache.org
Subject [juneau] branch juneau-7.2.2-branch updated: Fix issue resolving files/htdocs when located in classpath.
Date Wed, 12 Dec 2018 23:34:31 GMT
This is an automated email from the ASF dual-hosted git repository.

jamesbognar pushed a commit to branch juneau-7.2.2-branch
in repository https://gitbox.apache.org/repos/asf/juneau.git


The following commit(s) were added to refs/heads/juneau-7.2.2-branch by this push:
     new 4bd6f55  Fix issue resolving files/htdocs when located in classpath.
4bd6f55 is described below

commit 4bd6f55e9575b90f252d3c0ec27faf2f9912114d
Author: JamesBognar <jamesbognar@apache.org>
AuthorDate: Wed Dec 12 18:33:57 2018 -0500

    Fix issue resolving files/htdocs when located in classpath.
---
 juneau-core/juneau-config/pom.xml                    |   2 +-
 juneau-core/juneau-core-test/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/utils/ClasspathResourceFinderSimple.java  |  19 ++++++++++++++++---
 juneau-core/juneau-svl/pom.xml                       |   2 +-
 juneau-core/pom.xml                                  |   2 +-
 juneau-doc/pom.xml                                   |   2 +-
 juneau-examples/juneau-examples-core/pom.xml         |   2 +-
 juneau-examples/juneau-examples-rest/pom.xml         |   2 +-
 juneau-examples/pom.xml                              |   2 +-
 .../juneau-microservice-server/pom.xml               |   2 +-
 .../juneau-microservice-template/.classpath          |   3 ++-
 .../juneau-microservice-template/pom.xml             |   4 ++--
 .../main/resources}/files/htdocs/images/asf.png      | Bin
 .../main/resources}/files/htdocs/images/juneau.png   | Bin
 .../resources}/files/htdocs/styles/SwaggerUI.css     |   0
 .../main/resources}/files/htdocs/themes/dark.css     |   0
 .../main/resources}/files/htdocs/themes/devops.css   |   0
 .../main/resources}/files/htdocs/themes/light.css    |   0
 .../main/resources}/files/htdocs/themes/original.css |   0
 juneau-microservice/juneau-microservice-test/pom.xml |   2 +-
 juneau-microservice/pom.xml                          |   2 +-
 juneau-releng/juneau-all/pom.xml                     |   2 +-
 juneau-releng/juneau-distrib/pom.xml                 |   2 +-
 juneau-releng/pom.xml                                |   2 +-
 juneau-rest/juneau-rest-client/pom.xml               |   2 +-
 juneau-rest/juneau-rest-server-jaxrs/pom.xml         |   2 +-
 juneau-rest/juneau-rest-server/pom.xml               |   2 +-
 juneau-rest/pom.xml                                  |   2 +-
 pom.xml                                              |   8 +++++---
 32 files changed, 46 insertions(+), 30 deletions(-)

diff --git a/juneau-core/juneau-config/pom.xml b/juneau-core/juneau-config/pom.xml
index 280473d..484be0c 100644
--- a/juneau-core/juneau-config/pom.xml
+++ b/juneau-core/juneau-config/pom.xml
@@ -20,7 +20,7 @@
 	<parent>
 		<groupId>org.apache.juneau</groupId>
 		<artifactId>juneau-core</artifactId>
-		<version>7.2.2</version>
+		<version>7.2.3-SNAPSHOT</version>
 	</parent>
 
 	<artifactId>juneau-config</artifactId>
diff --git a/juneau-core/juneau-core-test/pom.xml b/juneau-core/juneau-core-test/pom.xml
index 1eca918..3109311 100644
--- a/juneau-core/juneau-core-test/pom.xml
+++ b/juneau-core/juneau-core-test/pom.xml
@@ -20,7 +20,7 @@
 	<parent>
 		<groupId>org.apache.juneau</groupId>
 		<artifactId>juneau-core</artifactId>
-		<version>7.2.2</version>
+		<version>7.2.3-SNAPSHOT</version>
 	</parent>
 
 	<artifactId>juneau-core-test</artifactId>
diff --git a/juneau-core/juneau-dto/pom.xml b/juneau-core/juneau-dto/pom.xml
index 3c39576..0336032 100644
--- a/juneau-core/juneau-dto/pom.xml
+++ b/juneau-core/juneau-dto/pom.xml
@@ -20,7 +20,7 @@
 	<parent>
 		<groupId>org.apache.juneau</groupId>
 		<artifactId>juneau-core</artifactId>
-		<version>7.2.2</version>
+		<version>7.2.3-SNAPSHOT</version>
 	</parent>
 
 	<artifactId>juneau-dto</artifactId>
diff --git a/juneau-core/juneau-marshall-rdf/pom.xml b/juneau-core/juneau-marshall-rdf/pom.xml
index c33eb65..8da8fad 100644
--- a/juneau-core/juneau-marshall-rdf/pom.xml
+++ b/juneau-core/juneau-marshall-rdf/pom.xml
@@ -20,7 +20,7 @@
 	<parent>
 		<groupId>org.apache.juneau</groupId>
 		<artifactId>juneau-core</artifactId>
-		<version>7.2.2</version>
+		<version>7.2.3-SNAPSHOT</version>
 	</parent>
 
 	<artifactId>juneau-marshall-rdf</artifactId>
diff --git a/juneau-core/juneau-marshall/pom.xml b/juneau-core/juneau-marshall/pom.xml
index 7ea7085..bd65a88 100644
--- a/juneau-core/juneau-marshall/pom.xml
+++ b/juneau-core/juneau-marshall/pom.xml
@@ -20,7 +20,7 @@
 	<parent>
 		<groupId>org.apache.juneau</groupId>
 		<artifactId>juneau-core</artifactId>
-		<version>7.2.2</version>
+		<version>7.2.3-SNAPSHOT</version>
 	</parent>
 
 	<artifactId>juneau-marshall</artifactId>
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/utils/ClasspathResourceFinderSimple.java
b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/utils/ClasspathResourceFinderSimple.java
index 410bfa4..3de00c5 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/utils/ClasspathResourceFinderSimple.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/utils/ClasspathResourceFinderSimple.java
@@ -65,16 +65,29 @@ public class ClasspathResourceFinderSimple implements ClasspathResourceFinder
{
 	 * @throws IOException
 	 */
 	protected InputStream findClasspathResource(Class<?> baseClass, String name, Locale
locale) throws IOException {
-		if (locale == null)
-			return baseClass.getResourceAsStream(name);
+		
+		if (locale == null) 
+			return getResourceAsStream(baseClass, name);
+		
 		for (String n : getCandidateFileNames(name, locale)) {
-			InputStream is = baseClass.getResourceAsStream(n);
+			InputStream is = getResourceAsStream(baseClass, n);
 			if (is != null)
 				return is;
 		}
 		return null;
 	}
 
+	private InputStream getResourceAsStream(Class<?> baseClass, String name) {
+		InputStream is = baseClass.getResourceAsStream(name);
+		if (is != null)
+			return is;
+		if (! name.startsWith("/"))
+			is = baseClass.getResourceAsStream("/" + name);
+		if (is != null)
+			return is;
+		return null;
+	}
+
 	/**
 	 * Returns the candidate file names for the specified file name in the specified locale.
 	 *
diff --git a/juneau-core/juneau-svl/pom.xml b/juneau-core/juneau-svl/pom.xml
index 97468b6..17b8585 100644
--- a/juneau-core/juneau-svl/pom.xml
+++ b/juneau-core/juneau-svl/pom.xml
@@ -20,7 +20,7 @@
 	<parent>
 		<groupId>org.apache.juneau</groupId>
 		<artifactId>juneau-core</artifactId>
-		<version>7.2.2</version>
+		<version>7.2.3-SNAPSHOT</version>
 	</parent>
 
 	<artifactId>juneau-svl</artifactId>
diff --git a/juneau-core/pom.xml b/juneau-core/pom.xml
index 0ae8aa7..65310b6 100644
--- a/juneau-core/pom.xml
+++ b/juneau-core/pom.xml
@@ -20,7 +20,7 @@
 	<parent>
 		<groupId>org.apache.juneau</groupId>
 		<artifactId>juneau</artifactId>
-		<version>7.2.2</version>
+		<version>7.2.3-SNAPSHOT</version>
 	</parent>
 
 	<artifactId>juneau-core</artifactId>
diff --git a/juneau-doc/pom.xml b/juneau-doc/pom.xml
index a2ae1e5..928b788 100644
--- a/juneau-doc/pom.xml
+++ b/juneau-doc/pom.xml
@@ -20,7 +20,7 @@
 	<parent>
 		<groupId>org.apache.juneau</groupId>
 		<artifactId>juneau</artifactId>
-		<version>7.2.2</version>
+		<version>7.2.3-SNAPSHOT</version>
 	</parent>
 
 	<artifactId>juneau-doc</artifactId>
diff --git a/juneau-examples/juneau-examples-core/pom.xml b/juneau-examples/juneau-examples-core/pom.xml
index e8df74e..2c5ee20 100644
--- a/juneau-examples/juneau-examples-core/pom.xml
+++ b/juneau-examples/juneau-examples-core/pom.xml
@@ -20,7 +20,7 @@
 	<parent>
 		<artifactId>juneau-examples</artifactId>
 		<groupId>org.apache.juneau</groupId>
-		<version>7.2.2</version>
+		<version>7.2.3-SNAPSHOT</version>
 	</parent>
 
 	<artifactId>juneau-examples-core</artifactId>
diff --git a/juneau-examples/juneau-examples-rest/pom.xml b/juneau-examples/juneau-examples-rest/pom.xml
index 063823e..2286571 100644
--- a/juneau-examples/juneau-examples-rest/pom.xml
+++ b/juneau-examples/juneau-examples-rest/pom.xml
@@ -20,7 +20,7 @@
 	<parent>
 		<groupId>org.apache.juneau</groupId>
 		<artifactId>juneau-examples</artifactId>
-		<version>7.2.2</version>
+		<version>7.2.3-SNAPSHOT</version>
 	</parent>
 
 	<artifactId>juneau-examples-rest</artifactId>
diff --git a/juneau-examples/pom.xml b/juneau-examples/pom.xml
index 7b4f118..4fa08a3 100644
--- a/juneau-examples/pom.xml
+++ b/juneau-examples/pom.xml
@@ -20,7 +20,7 @@
 	<parent>
 		<groupId>org.apache.juneau</groupId>
 		<artifactId>juneau</artifactId>
-		<version>7.2.2</version>
+		<version>7.2.3-SNAPSHOT</version>
 	</parent>
 
 	<artifactId>juneau-examples</artifactId>
diff --git a/juneau-microservice/juneau-microservice-server/pom.xml b/juneau-microservice/juneau-microservice-server/pom.xml
index 2cb3851..3900203 100644
--- a/juneau-microservice/juneau-microservice-server/pom.xml
+++ b/juneau-microservice/juneau-microservice-server/pom.xml
@@ -20,7 +20,7 @@
 	<parent>
 		<groupId>org.apache.juneau</groupId>
 		<artifactId>juneau-microservice</artifactId>
-		<version>7.2.2</version>
+		<version>7.2.3-SNAPSHOT</version>
 	</parent>
 
 	<artifactId>juneau-microservice-server</artifactId>
diff --git a/juneau-microservice/juneau-microservice-template/.classpath b/juneau-microservice/juneau-microservice-template/.classpath
index 8906d38..b0ef2d1 100755
--- a/juneau-microservice/juneau-microservice-template/.classpath
+++ b/juneau-microservice/juneau-microservice-template/.classpath
@@ -13,7 +13,8 @@
 			<attribute name="maven.pomderived" value="true"/>
 		</attributes>
 	</classpathentry>
-	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
+	<classpathentry kind="src" path="src/main/resources"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7">
 		<attributes>
 			<attribute name="maven.pomderived" value="true"/>
 		</attributes>
diff --git a/juneau-microservice/juneau-microservice-template/pom.xml b/juneau-microservice/juneau-microservice-template/pom.xml
index 624a8b3..bb13e88 100644
--- a/juneau-microservice/juneau-microservice-template/pom.xml
+++ b/juneau-microservice/juneau-microservice-template/pom.xml
@@ -28,7 +28,7 @@
 	<parent>
 		<groupId>org.apache.juneau</groupId>
 		<artifactId>juneau-microservice</artifactId>
-		<version>7.2.2</version>
+		<version>7.2.3-SNAPSHOT</version>
 	</parent>
 
 	<artifactId>juneau-microservice-template</artifactId>
@@ -36,7 +36,7 @@
 	<description>A template project developers use to start with to create a microservice.</description>
 	
 	<properties>
-		<juneau.version>7.2.2</juneau.version>
+		<juneau.version>7.2.3-SNAPSHOT</juneau.version>
 		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
 	</properties>
 	
diff --git a/juneau-microservice/juneau-microservice-template/files/htdocs/images/asf.png
b/juneau-microservice/juneau-microservice-template/src/main/resources/files/htdocs/images/asf.png
similarity index 100%
rename from juneau-microservice/juneau-microservice-template/files/htdocs/images/asf.png
rename to juneau-microservice/juneau-microservice-template/src/main/resources/files/htdocs/images/asf.png
diff --git a/juneau-microservice/juneau-microservice-template/files/htdocs/images/juneau.png
b/juneau-microservice/juneau-microservice-template/src/main/resources/files/htdocs/images/juneau.png
similarity index 100%
rename from juneau-microservice/juneau-microservice-template/files/htdocs/images/juneau.png
rename to juneau-microservice/juneau-microservice-template/src/main/resources/files/htdocs/images/juneau.png
diff --git a/juneau-microservice/juneau-microservice-template/files/htdocs/styles/SwaggerUI.css
b/juneau-microservice/juneau-microservice-template/src/main/resources/files/htdocs/styles/SwaggerUI.css
similarity index 100%
rename from juneau-microservice/juneau-microservice-template/files/htdocs/styles/SwaggerUI.css
rename to juneau-microservice/juneau-microservice-template/src/main/resources/files/htdocs/styles/SwaggerUI.css
diff --git a/juneau-microservice/juneau-microservice-template/files/htdocs/themes/dark.css
b/juneau-microservice/juneau-microservice-template/src/main/resources/files/htdocs/themes/dark.css
similarity index 100%
rename from juneau-microservice/juneau-microservice-template/files/htdocs/themes/dark.css
rename to juneau-microservice/juneau-microservice-template/src/main/resources/files/htdocs/themes/dark.css
diff --git a/juneau-microservice/juneau-microservice-template/files/htdocs/themes/devops.css
b/juneau-microservice/juneau-microservice-template/src/main/resources/files/htdocs/themes/devops.css
similarity index 100%
rename from juneau-microservice/juneau-microservice-template/files/htdocs/themes/devops.css
rename to juneau-microservice/juneau-microservice-template/src/main/resources/files/htdocs/themes/devops.css
diff --git a/juneau-microservice/juneau-microservice-template/files/htdocs/themes/light.css
b/juneau-microservice/juneau-microservice-template/src/main/resources/files/htdocs/themes/light.css
similarity index 100%
rename from juneau-microservice/juneau-microservice-template/files/htdocs/themes/light.css
rename to juneau-microservice/juneau-microservice-template/src/main/resources/files/htdocs/themes/light.css
diff --git a/juneau-microservice/juneau-microservice-template/files/htdocs/themes/original.css
b/juneau-microservice/juneau-microservice-template/src/main/resources/files/htdocs/themes/original.css
similarity index 100%
rename from juneau-microservice/juneau-microservice-template/files/htdocs/themes/original.css
rename to juneau-microservice/juneau-microservice-template/src/main/resources/files/htdocs/themes/original.css
diff --git a/juneau-microservice/juneau-microservice-test/pom.xml b/juneau-microservice/juneau-microservice-test/pom.xml
index 0f746cf..58a7614 100644
--- a/juneau-microservice/juneau-microservice-test/pom.xml
+++ b/juneau-microservice/juneau-microservice-test/pom.xml
@@ -20,7 +20,7 @@
 	<parent>
 		<groupId>org.apache.juneau</groupId>
 		<artifactId>juneau-microservice</artifactId>
-		<version>7.2.2</version>
+		<version>7.2.3-SNAPSHOT</version>
 	</parent>
 
 	<artifactId>juneau-microservice-test</artifactId>
diff --git a/juneau-microservice/pom.xml b/juneau-microservice/pom.xml
index ec731a6..94dd2c8 100644
--- a/juneau-microservice/pom.xml
+++ b/juneau-microservice/pom.xml
@@ -20,7 +20,7 @@
 	<parent>
 		<groupId>org.apache.juneau</groupId>
 		<artifactId>juneau</artifactId>
-		<version>7.2.2</version>
+		<version>7.2.3-SNAPSHOT</version>
 	</parent>
 
 	<artifactId>juneau-microservice</artifactId>
diff --git a/juneau-releng/juneau-all/pom.xml b/juneau-releng/juneau-all/pom.xml
index 53cccd9..e142722 100644
--- a/juneau-releng/juneau-all/pom.xml
+++ b/juneau-releng/juneau-all/pom.xml
@@ -20,7 +20,7 @@
 	<parent>
 		<groupId>org.apache.juneau</groupId>
 		<artifactId>juneau-releng</artifactId>
-		<version>7.2.2</version>
+		<version>7.2.3-SNAPSHOT</version>
 	</parent>
 
 	<artifactId>juneau-all</artifactId>
diff --git a/juneau-releng/juneau-distrib/pom.xml b/juneau-releng/juneau-distrib/pom.xml
index 9bc44ed..793cc07 100644
--- a/juneau-releng/juneau-distrib/pom.xml
+++ b/juneau-releng/juneau-distrib/pom.xml
@@ -20,7 +20,7 @@
 	<parent>
 		<groupId>org.apache.juneau</groupId>
 		<artifactId>juneau-releng</artifactId>
-		<version>7.2.2</version>
+		<version>7.2.3-SNAPSHOT</version>
 	</parent>
 
 	<artifactId>juneau-distrib</artifactId>
diff --git a/juneau-releng/pom.xml b/juneau-releng/pom.xml
index 6547df6..ed30077 100644
--- a/juneau-releng/pom.xml
+++ b/juneau-releng/pom.xml
@@ -20,7 +20,7 @@
 	<parent>
 		<groupId>org.apache.juneau</groupId>
 		<artifactId>juneau</artifactId>
-		<version>7.2.2</version>
+		<version>7.2.3-SNAPSHOT</version>
 	</parent>
 
 	<artifactId>juneau-releng</artifactId>
diff --git a/juneau-rest/juneau-rest-client/pom.xml b/juneau-rest/juneau-rest-client/pom.xml
index 4ff3ee2..8425b32 100644
--- a/juneau-rest/juneau-rest-client/pom.xml
+++ b/juneau-rest/juneau-rest-client/pom.xml
@@ -20,7 +20,7 @@
 	<parent>
 		<groupId>org.apache.juneau</groupId>
 		<artifactId>juneau-rest</artifactId>
-		<version>7.2.2</version>
+		<version>7.2.3-SNAPSHOT</version>
 	</parent>
 
 	<artifactId>juneau-rest-client</artifactId>
diff --git a/juneau-rest/juneau-rest-server-jaxrs/pom.xml b/juneau-rest/juneau-rest-server-jaxrs/pom.xml
index 05c2135..64d534a 100644
--- a/juneau-rest/juneau-rest-server-jaxrs/pom.xml
+++ b/juneau-rest/juneau-rest-server-jaxrs/pom.xml
@@ -20,7 +20,7 @@
 	<parent>
 		<groupId>org.apache.juneau</groupId>
 		<artifactId>juneau-rest</artifactId>
-		<version>7.2.2</version>
+		<version>7.2.3-SNAPSHOT</version>
 	</parent>
 
 	<artifactId>juneau-rest-server-jaxrs</artifactId>
diff --git a/juneau-rest/juneau-rest-server/pom.xml b/juneau-rest/juneau-rest-server/pom.xml
index bec11c3..00f48fc 100644
--- a/juneau-rest/juneau-rest-server/pom.xml
+++ b/juneau-rest/juneau-rest-server/pom.xml
@@ -20,7 +20,7 @@
 	<parent>
 		<groupId>org.apache.juneau</groupId>
 		<artifactId>juneau-rest</artifactId>
-		<version>7.2.2</version>
+		<version>7.2.3-SNAPSHOT</version>
 	</parent>
 
 	<artifactId>juneau-rest-server</artifactId>
diff --git a/juneau-rest/pom.xml b/juneau-rest/pom.xml
index 26c2513..62e199f 100644
--- a/juneau-rest/pom.xml
+++ b/juneau-rest/pom.xml
@@ -20,7 +20,7 @@
 	<parent>
 		<groupId>org.apache.juneau</groupId>
 		<artifactId>juneau</artifactId>
-		<version>7.2.2</version>
+		<version>7.2.3-SNAPSHOT</version>
 	</parent>
 
 	<artifactId>juneau-rest</artifactId>
diff --git a/pom.xml b/pom.xml
index 422a6ae..f0700f8 100644
--- a/pom.xml
+++ b/pom.xml
@@ -19,7 +19,7 @@
 
 	<groupId>org.apache.juneau</groupId>
 	<artifactId>juneau</artifactId>
-	<version>7.2.2</version>
+	<version>7.2.3-SNAPSHOT</version>
 	<packaging>pom</packaging>
 	<name>Apache Juneau</name>
 	<description>All the Apache Juneau content in one convenient package.</description>
@@ -40,8 +40,8 @@
 		<jetty.version>9.4.12.v20180830</jetty.version>
 		<juneau.compare.version>7.2.0</juneau.compare.version>
 		<javadoc.juneau.version>7.2.1</javadoc.juneau.version>
-		<juneauVersion>7.2.2</juneauVersion>
-		<juneauVersionNext>7.2.3</juneauVersionNext>
+		<juneauVersion>7.2.3-SNAPSHOT</juneauVersion>
+		<juneauVersionNext>7.2.4</juneauVersionNext>
 	</properties>
 
 	<dependencyManagement>
@@ -138,6 +138,8 @@
 					<excludes>
 						<exclude>**/DEPENDENCIES</exclude>
 						<exclude>**/target/**</exclude>
+						<exclude>**/*.log</exclude>
+						<exclude>**/*.log.*</exclude>
 						
 						<!-- Eclipse metadata files -->
 						<exclude>**/.settings/**</exclude>


Mime
View raw message