我想将Clojure库导入基于Maven的Java 11应用程序中。所使用的Clojure版本大多是1.8+,使用Boot进行构建。语言版本可以灵活调整,但Clojure必须使用Boot。
我已经阅读了一些有关此问题的资料,但没有找到任何最近的解决方案,也没有使用Boot的解决方案。考虑到它们都是JVM语言,我希望这不会太复杂,但不确定从哪里开始。
我想将Clojure库导入基于Maven的Java 11应用程序中。所使用的Clojure版本大多是1.8+,使用Boot进行构建。语言版本可以灵活调整,但Clojure必须使用Boot。
我已经阅读了一些有关此问题的资料,但没有找到任何最近的解决方案,也没有使用Boot的解决方案。考虑到它们都是JVM语言,我希望这不会太复杂,但不确定从哪里开始。
使用普通的Maven就可以获取任何Clojure依赖项,因为它支持添加不同的包源。您只需要添加一个存放Clojure包的仓库:
<repositories>
<repository> <!-- You probably have this already -->
<id>central</id>
<url>https://repo1.maven.org/maven2/</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
<releases>
<enabled>true</enabled>
</releases>
</repository>
<repository><!-- You'll need to add this -->
<id>clojars</id>
<url>https://repo.clojars.org/</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
<releases>
<enabled>true</enabled>
</releases>
</repository>
</repositories>
<dependency>
<groupId>clj-time</groupId>
<artifactId>clj-time</artifactId>
<version>0.15.1</version>
</dependency>