This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-01-02
Channels
- # babashka (37)
- # beginners (19)
- # calva (5)
- # cider (14)
- # clojure (21)
- # clojure-europe (2)
- # clojurescript (16)
- # conjure (11)
- # datalog (78)
- # deps-new (3)
- # gratitude (2)
- # introduce-yourself (1)
- # joker (1)
- # jvm (4)
- # lsp (17)
- # malli (5)
- # meander (6)
- # minecraft (3)
- # off-topic (17)
- # other-languages (25)
- # practicalli (1)
- # quil (12)
- # reveal (6)
- # spacemacs (19)
maven versions are generally prefixes of major.minor.increment-qualifier
but there are a lot of special rules about how qualifiers work and are compared, and they changed a bit from maven 2 to 3 to fix some problems. some useful links:
• https://books.sonatype.com/mvnref-book/reference/pom-relationships-sect-pom-syntax.html#pom-reationships-sect-versions
• https://cwiki.apache.org/confluence/display/MAVENOLD/Versioning
• https://issues.apache.org/jira/browse/MNG-3010
not just versions, but like when i declare a/b {:mvn/version "1.2.3"}
what is the procedure for fetching it?
like from the perspective of if i wanted to make a ring server that worked as a maven repository i guess
The main protocol this happens over is http(s) and the main API call wagons provide is just "download this file"
Here is a maven wagon for s3 written in clojure https://github.com/clojure/tools.deps.alpha/blob/master/src/main/clojure/clojure/tools/deps/alpha/util/s3_transporter.clj there is some stub java code in the main repo that calls into it
wagons are the old protocol, the newer protocol are transporters
that one above is only a partial impl (the full protocol does uploads too)
/**
* Create zip file containing contents of src dirs.
*
* @param srcDirs coll of source directories to include in zip
* @param zipFile zip file to create
*/
public void zip(List<String> srcDirs, String zipFile) {
API_ZIP.invoke(HASH_MAP.invoke(
Clojure.read(":src-dirs"), SEQ.invoke(srcDirs),
Clojure.read(":zip-file"), zipFile
));
}
Hi Everyone. I have a small question. Is this https://github.com/unbounce/clojure-dogstatsd-client the best library to integrate datadog with a clojure web application?
I like to use Java clients directly most of the time, since it gives you mor control and has no limitations. Where as a wrapper might not have wrapped everything yet and so might not expose all options. But it means you need a bit more familiarity with Clojure interop and Java APIs.
/**
* Copy the contents of the src-dirs to the target-dir, optionally do text replacement.
* @param targetDir dir to write files, will be created if it doesn't exist
* @param srcDirs coll of dirs to copy from
* @param options options
*/
public void copyDir(String targetDir, List<String> srcDirs, CopyDirOptions options) {
Objects.requireNonNull(targetDir);
Objects.requireNonNull(srcDirs);
var args = HASH_MAP.invoke(
Clojure.read(":target-dir"), targetDir,
Clojure.read(":src-dirs"), SEQ.invoke(srcDirs)
);
if (options.include != null) {
args = ASSOC.invoke(args, Clojure.read(":include"), options.include);
}
if (options.ignores != null) {
args = ASSOC.invoke(args, Clojure.read(":ignores"), SEQ.invoke(options.ignores));
}
if (options.replace != null) {
args = ASSOC.invoke(args, Clojure.read(":replace"), INTO.invoke(Clojure.read("{}"), options.replace));
}
if (options.nonReplacedExts != null) {
args = ASSOC.invoke(args, Clojure.read(":non-replaced-exts"), SEQ.invoke(options.nonReplacedExts));
}
API_COPY_DIR.invoke(args);
}