Codebase list java-classpath-clojure / upstream/1.0.0
New upstream version 1.0.0 Louis-Philippe VĂ©ronneau 3 years ago
8 changed file(s) with 50 addition(s) and 18 deletion(s). Raw diff Collapse all Expand all
0 epl.html linguist-documentation
00 target
1 .cpcache/
00 # java.classpath Change Log
1
2 ## 0.3.x series
3
4 ### Release [0.3.0] on 2018-May-06
5
6 * Fix [CLASSPATH-8]: empty classpath returned on Java 9.
7
8 Starting with Java 9, the default class loader is no longer an
9 instance of URLClassLoader, so `classpath` returned an empty sequence.
10 The strategy of using URLClassLoader started with release [0.2.0] to
11 accommodate Java application containers (see [CLASSPATH-1] and
12 [CLASSPATH-2]). After this change, application containers based on
13 URLClassLoader should still work as expected.
14
15 On Java 9 without an application container, it appears that the
16 `java.class.path` system property is the only way to get the
17 classpath. While this is essentially a bugfix for Java 9
18 compatibility, it is a change in behavior, hence the version change
19 from 0.2 to 0.3.
120
221
322 ## 0.2.x series
4
5 Latest development version is 0.2.4-SNAPSHOT, current Git `master` branch
623
724 ### Release [0.2.3] on 2015-Nov-06
825
4158
4259
4360
61 [CLASSPATH-8]: http://dev.clojure.org/jira/browse/CLASSPATH-8
4462 [CLASSPATH-7]: http://dev.clojure.org/jira/browse/CLASSPATH-7
4563 [CLASSPATH-6]: http://dev.clojure.org/jira/browse/CLASSPATH-6
4664 [CLASSPATH-5]: http://dev.clojure.org/jira/browse/CLASSPATH-5
4967 [CLASSPATH-2]: http://dev.clojure.org/jira/browse/CLASSPATH-2
5068 [CLASSPATH-1]: http://dev.clojure.org/jira/browse/CLASSPATH-1
5169
70 [0.3.0]: https://github.com/clojure/java.classpath/tree/java.classpath-0.3.0
5271 [0.2.3]: https://github.com/clojure/java.classpath/tree/java.classpath-0.2.3
5372 [0.2.2]: https://github.com/clojure/java.classpath/tree/java.classpath-0.2.2
5473 [0.2.1]: https://github.com/clojure/java.classpath/tree/java.classpath-0.2.1
22 Under the Clojure contrib [guidelines], this project cannot accept
33 pull requests. All patches must be submitted via [JIRA].
44
5 See [Contributing] and the [FAQ] on the Clojure development [wiki] for
5 See [Contributing] on the Clojure website for
66 more information on how to contribute.
77
8 [Clojure contrib]: http://dev.clojure.org/display/doc/Clojure+Contrib
9 [Contributing]: http://dev.clojure.org/display/community/Contributing
10 [FAQ]: http://dev.clojure.org/display/community/Contributing+FAQ
8 [Clojure contrib]: https://clojure.org/community/contrib_libs
9 [Contributing]: https://clojure.org/community/contributing
1110 [JIRA]: http://dev.clojure.org/jira/browse/CLASSPATH
12 [guidelines]: http://dev.clojure.org/display/community/Guidelines+for+Clojure+Contrib+committers
13 [wiki]: http://dev.clojure.org/
11 [guidelines]: https://clojure.org/community/contrib_howto
44
55 ## Releases and Dependency Information
66
7 Latest stable release is 0.2.3
7 Latest stable release is 0.3.0
88
99 [Leiningen] dependency information:
1010
11 [org.clojure/java.classpath "0.2.3"]
11 [org.clojure/java.classpath "0.3.0"]
1212
1313 [Maven] dependency information:
1414
1515 <dependency>
1616 <groupId>org.clojure</groupId>
1717 <artifactId>java.classpath</artifactId>
18 <version>0.2.3</version>
18 <version>0.3.0</version>
1919 </dependency>
2020
2121 [Gradle] dependency information:
2222
23 compile "org.clojure:java.classpath:0.2.3"
23 compile "org.clojure:java.classpath:0.3.0"
2424
2525 [Leiningen]: http://leiningen.org/
2626 [Maven]: http://maven.apache.org/
6868 protocol `URLClasspath` to support it. Refer to the source for
6969 details.
7070
71 **Starting with version 0.3.0**, the `classpath` function will fall
72 back to the `java.class.path` system property if the parent
73 ClassLoader is not an instance of [URLClassLoader](https://docs.oracle.com/javase/9/docs/api/java/net/URLClassLoader.html),
74 which is true for Java 9 and later.
75
7176
7277 ## Developer Information
7378
0 {:paths ["src/main/clojure"]}
00 <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">
11 <modelVersion>4.0.0</modelVersion>
22 <artifactId>java.classpath</artifactId>
3 <version>0.2.3</version>
4 <name>${project.artifactId}</name>
3 <version>1.0.0</version>
4 <name>java.classpath</name>
55
66 <parent>
77 <groupId>org.clojure</groupId>
88 <artifactId>pom.contrib</artifactId>
9 <version>0.1.2</version>
9 <version>0.2.2</version>
1010 </parent>
1111
1212 <developers>
1919 <connection>scm:git:git@github.com:clojure/java.classpath.git</connection>
2020 <developerConnection>scm:git:git@github.com:clojure/java.classpath.git</developerConnection>
2121 <url>git@github.com:clojure/java.classpath.git</url>
22 <tag>java.classpath-0.2.3</tag>
22 <tag>java.classpath-1.0.0</tag>
2323 </scm>
2424 </project>
6868 (map io/as-file (get-urls loader)))
6969
7070 (defn classpath
71 "Returns a sequence of File objects of the elements on the classpath."
71 "Returns a sequence of File objects of the elements on the
72 classpath. Defaults to searching for instances of
73 java.net.URLClassLoader in the classloader hierarchy above
74 clojure.lang.RT/baseLoader or the given classloader. If no
75 URLClassloader can be found, as on Java 9, falls back to the
76 'java.class'path' system property."
7277 ([classloader]
7378 (distinct
7479 (mapcat
7681 (take-while
7782 identity
7883 (iterate #(.getParent ^ClassLoader %) classloader)))))
79 ([] (classpath (clojure.lang.RT/baseLoader))))
84 ([]
85 (or (seq (classpath (clojure.lang.RT/baseLoader)))
86 (system-classpath))))
8087
8188 (defn classpath-directories
8289 "Returns a sequence of File objects for the directories on classpath."