This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2015-07-02
Channels
- # admin-announcements (11)
- # beginners (183)
- # boot (139)
- # cider (37)
- # clojure (134)
- # clojure-germany (23)
- # clojure-italy (28)
- # clojure-japan (24)
- # clojure-russia (12)
- # clojurebridge (17)
- # clojurescript (222)
- # code-reviews (6)
- # core-async (9)
- # core-matrix (4)
- # datomic (13)
- # editors (2)
- # euroclojure (13)
- # ldnclj (69)
- # off-topic (32)
- # om (3)
- # onyx (24)
- # reagent (10)
- # yada (31)
Is there any documentation on using boot for a cljs library, rather than an app? I've got one that I'm moving out of my cljs application into a standalone library namespace and I want to be able to install it locally as well as on clojars.
I'm just wondering if the standard boot pom jar install
pipeline for clj libraries is different for cljs.
@meow: no because the cljs files go in the jar uncompiled as resources (compilation is done by the consuming application)
@alandipert: Aha! That makes sense.
on the boot page on github it says:
This sets up the build environment. Then we constructed a pipeline of tasks:
The pom task with options to set the project ID and version, (by default only compiled artifacts end up in the fileset),
files with the input
role are files that can be input to build type tasks, like compilers for instance
files with the output
role are files that can be packaged by packaging type tasks, like jar for instance
output files are files that can be packaged in the final artifact (i.e. end up in the jar or the target dir)
the way you assign roles is by adding the files to the fileset via :source-paths
, :resource-paths
, and :asset-paths
so when you put it in the pipeline and try to compose (poly)
with other things you get a NPE
couldn't his poly task end with identity
the "profile pattern": https://github.com/boot-clj/boot/wiki/Boot-for-Leiningen-Users#profiles-middleware
so that's fixed: https://github.com/decomplect/ion/blob/master/build.boot
This seems to be the meat of it:
org.sonatype.aether.resolution.ArtifactDescriptorException: Failed to read artifact descriptor for ion.poly.core:ion.p
oly.core:jar:LATEST
result: #object[org.sonatype.aether.resolution.ArtifactDescriptorResult 0x865dd6 "ion.poly.core:ion.poly.core:jar:LA
TEST -> []"]
org.sonatype.aether.resolution.VersionResolutionException: Failed to resolve version for ion.poly.core:ion.poly.core:
jar:LATEST: Could not find metadata ion.poly.core:ion.poly.core/maven-metadata.xml in local (C:\Users\Patrick\.m2\reposi
tory)
result: #object[org.sonatype.aether.resolution.VersionResult 0x3d687a "null @ null"]
org.sonatype.aether.transfer.MetadataNotFoundException: Could not find metadata ion.poly.core:ion.poly.core/maven-
metadata.xml in local (C:\Users\Patrick\.m2\repository)
metadata: #object[org.sonatype.aether.util.metadata.DefaultMetadata 0x1f116b8 "ion.poly.core:ion.poly.core/maven-met
adata.xml"]
<?xml version="1.0" encoding="UTF-8"?>
<metadata>
<groupId>cljsjs</groupId>
<artifactId>jquery</artifactId>
<versioning>
<release>1.8.2-1</release>
<versions>
<version>1.8.2-0</version>
<version>9.9.9</version>
<version>1.8.2-1</version>
</versions>
<lastUpdated>20150120004003</lastUpdated>
</versioning>
</metadata>
<?xml version="1.0" encoding="UTF-8"?>
<metadata>
<groupId>ion</groupId>
<artifactId>poly</artifactId>
<versioning>
<release>0.1.0</release>
<versions>
<version>0.1.0</version>
</versions>
<lastUpdated>20150702223409</lastUpdated>
</versioning>
</metadata>
Now I get
clojure.lang.ExceptionInfo: No such namespace: ion.poly.core, could not locate ion/poly/core.cljs, ion/poly/core.cljc, o
r Closure namespace "ion.poly.core" at line 1 /C:/Users/Patrick/.boot/cache/tmp/Users/Patrick/code/ing/informing/4eg/7o2
s6s/app/core.cljs
this line looks odd to me: https://github.com/decomplect/ion/blob/master/build.boot#L9
if you do :resource-paths #{"src"}
then the src directory will be the root of the classpath, basically
but the real question i guess is: are the projects going to be separate artifacts in maven?
I knew I was swimming against the current but figured I'd try it and see what it was like.
have all the things in "src", and sift out the ones you don't wnat to include in the jar