[Git][clojure-team/java-classpath-clojure][upstream] New upstream version 1.0.0

Louis-Philippe Véronneau gitlab at salsa.debian.org
Thu Dec 17 22:18:24 GMT 2020



Louis-Philippe Véronneau pushed to branch upstream at Debian Clojure Maintainers / java-classpath-clojure


Commits:
39d24ad8 by Louis-Philippe Véronneau at 2020-12-14T11:12:44-05:00
New upstream version 1.0.0
- - - - -


8 changed files:

- + .gitattributes
- .gitignore
- CHANGES.md
- CONTRIBUTING.md
- README.md
- + deps.edn
- pom.xml
- src/main/clojure/clojure/java/classpath.clj


Changes:

=====================================
.gitattributes
=====================================
@@ -0,0 +1 @@
+epl.html linguist-documentation


=====================================
.gitignore
=====================================
@@ -1 +1,2 @@
 target
+.cpcache/


=====================================
CHANGES.md
=====================================
@@ -1,9 +1,26 @@
 # java.classpath Change Log
 
+## 0.3.x series
 
-## 0.2.x series
+### Release [0.3.0] on 2018-May-06
+
+* Fix [CLASSPATH-8]: empty classpath returned on Java 9.
+
+Starting with Java 9, the default class loader is no longer an
+instance of URLClassLoader, so `classpath` returned an empty sequence.
+The strategy of using URLClassLoader started with release [0.2.0] to
+accommodate Java application containers (see [CLASSPATH-1] and
+[CLASSPATH-2]). After this change, application containers based on
+URLClassLoader should still work as expected.
 
-Latest development version is 0.2.4-SNAPSHOT, current Git `master` branch
+On Java 9 without an application container, it appears that the
+`java.class.path` system property is the only way to get the
+classpath. While this is essentially a bugfix for Java 9
+compatibility, it is a change in behavior, hence the version change
+from 0.2 to 0.3.
+
+
+## 0.2.x series
 
 ### Release [0.2.3] on 2015-Nov-06
 
@@ -42,6 +59,7 @@ Latest development version is 0.2.4-SNAPSHOT, current Git `master` branch
 
 
 
+[CLASSPATH-8]: http://dev.clojure.org/jira/browse/CLASSPATH-8
 [CLASSPATH-7]: http://dev.clojure.org/jira/browse/CLASSPATH-7
 [CLASSPATH-6]: http://dev.clojure.org/jira/browse/CLASSPATH-6
 [CLASSPATH-5]: http://dev.clojure.org/jira/browse/CLASSPATH-5
@@ -50,6 +68,7 @@ Latest development version is 0.2.4-SNAPSHOT, current Git `master` branch
 [CLASSPATH-2]: http://dev.clojure.org/jira/browse/CLASSPATH-2
 [CLASSPATH-1]: http://dev.clojure.org/jira/browse/CLASSPATH-1
 
+[0.3.0]: https://github.com/clojure/java.classpath/tree/java.classpath-0.3.0
 [0.2.3]: https://github.com/clojure/java.classpath/tree/java.classpath-0.2.3
 [0.2.2]: https://github.com/clojure/java.classpath/tree/java.classpath-0.2.2
 [0.2.1]: https://github.com/clojure/java.classpath/tree/java.classpath-0.2.1


=====================================
CONTRIBUTING.md
=====================================
@@ -3,12 +3,10 @@ This is a [Clojure contrib] project.
 Under the Clojure contrib [guidelines], this project cannot accept
 pull requests. All patches must be submitted via [JIRA].
 
-See [Contributing] and the [FAQ] on the Clojure development [wiki] for
+See [Contributing] on the Clojure website for
 more information on how to contribute.
 
-[Clojure contrib]: http://dev.clojure.org/display/doc/Clojure+Contrib
-[Contributing]: http://dev.clojure.org/display/community/Contributing
-[FAQ]: http://dev.clojure.org/display/community/Contributing+FAQ
+[Clojure contrib]: https://clojure.org/community/contrib_libs
+[Contributing]: https://clojure.org/community/contributing
 [JIRA]: http://dev.clojure.org/jira/browse/CLASSPATH
-[guidelines]: http://dev.clojure.org/display/community/Guidelines+for+Clojure+Contrib+committers
-[wiki]: http://dev.clojure.org/
+[guidelines]: https://clojure.org/community/contrib_howto


=====================================
README.md
=====================================
@@ -5,23 +5,23 @@ Examine the Java classpath from Clojure programs.
 
 ## Releases and Dependency Information
 
-Latest stable release is 0.2.3
+Latest stable release is 0.3.0
 
 [Leiningen] dependency information:
 
-    [org.clojure/java.classpath "0.2.3"]
+    [org.clojure/java.classpath "0.3.0"]
 
 [Maven] dependency information:
 
     <dependency>
       <groupId>org.clojure</groupId>
       <artifactId>java.classpath</artifactId>
-      <version>0.2.3</version>
+      <version>0.3.0</version>
     </dependency>
 
 [Gradle] dependency information:
 
-    compile "org.clojure:java.classpath:0.2.3"
+    compile "org.clojure:java.classpath:0.3.0"
 
 [Leiningen]: http://leiningen.org/
 [Maven]: http://maven.apache.org/
@@ -69,6 +69,11 @@ implementation, such as a Java application server, you can extend the
 protocol `URLClasspath` to support it. Refer to the source for
 details.
 
+**Starting with version 0.3.0**, the `classpath` function will fall
+back to the `java.class.path` system property if the parent
+ClassLoader is not an instance of [URLClassLoader](https://docs.oracle.com/javase/9/docs/api/java/net/URLClassLoader.html),
+which is true for Java 9 and later.
+
 
 ## Developer Information
 


=====================================
deps.edn
=====================================
@@ -0,0 +1 @@
+{:paths ["src/main/clojure"]}


=====================================
pom.xml
=====================================
@@ -1,13 +1,13 @@
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
   <modelVersion>4.0.0</modelVersion>
   <artifactId>java.classpath</artifactId>
-  <version>0.2.3</version>
-  <name>${project.artifactId}</name>
+  <version>1.0.0</version>
+  <name>java.classpath</name>
 
   <parent>
     <groupId>org.clojure</groupId>
     <artifactId>pom.contrib</artifactId>
-    <version>0.1.2</version>
+    <version>0.2.2</version>
   </parent>
 
   <developers>
@@ -20,6 +20,6 @@
     <connection>scm:git:git at github.com:clojure/java.classpath.git</connection>
     <developerConnection>scm:git:git at github.com:clojure/java.classpath.git</developerConnection>
     <url>git at github.com:clojure/java.classpath.git</url>
-    <tag>java.classpath-0.2.3</tag>
+    <tag>java.classpath-1.0.0</tag>
   </scm>
 </project>


=====================================
src/main/clojure/clojure/java/classpath.clj
=====================================
@@ -69,7 +69,12 @@
   (map io/as-file (get-urls loader)))
 
 (defn classpath
-  "Returns a sequence of File objects of the elements on the classpath."
+  "Returns a sequence of File objects of the elements on the
+  classpath. Defaults to searching for instances of
+  java.net.URLClassLoader in the classloader hierarchy above
+  clojure.lang.RT/baseLoader or the given classloader. If no
+  URLClassloader can be found, as on Java 9, falls back to the
+  'java.class'path' system property."
   ([classloader]
      (distinct
       (mapcat
@@ -77,7 +82,9 @@
        (take-while
         identity
         (iterate #(.getParent ^ClassLoader %) classloader)))))
-  ([] (classpath (clojure.lang.RT/baseLoader))))
+  ([]
+   (or (seq (classpath (clojure.lang.RT/baseLoader)))
+       (system-classpath))))
 
 (defn classpath-directories
   "Returns a sequence of File objects for the directories on classpath."



View it on GitLab: https://salsa.debian.org/clojure-team/java-classpath-clojure/-/commit/39d24ad86bcc9888bc29bde7e33d6d603a1908c7

-- 
View it on GitLab: https://salsa.debian.org/clojure-team/java-classpath-clojure/-/commit/39d24ad86bcc9888bc29bde7e33d6d603a1908c7
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-java-commits/attachments/20201217/cb47ff1e/attachment.html>


More information about the pkg-java-commits mailing list