Skip to content

Commit

Permalink
fix build.clj; add pom.xml template
Browse files Browse the repository at this point in the history
  • Loading branch information
dimovich committed Jul 13, 2022
1 parent 0cb313c commit 632442b
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 18 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ __Roll__ makes it easy for your project to include a ___Webserver___ ([Http-kit]
`roll` is published on [Clojars](https://clojars.org/dimovich/roll).
Add the following to your `project.clj`'s `:dependencies`:

[dimovich/roll "0.3.2"]
[dimovich/roll "0.3.337"]


## Clojure CLI/deps.edn

dimovich/roll {:mvn/version "0.3.2"}
dimovich/roll {:mvn/version "0.3.337"}


## Example
Expand All @@ -36,7 +36,7 @@ __deps.edn__
``` clojure
{:paths ["src"]

:deps {dimovich/roll {:mvn/version "0.3.2"}}}
:deps {dimovich/roll {:mvn/version "0.3.337"}}}
```


Expand Down
10 changes: 8 additions & 2 deletions build.clj
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,18 @@
(b/delete {:path "target"}))

(defn jar [_]
(b/write-pom {:class-dir class-dir
(b/write-pom {:src-pom "template/pom.xml"
:class-dir class-dir
:lib lib
:version version
:basis basis
:src-dirs ["src"]})
(b/copy-dir {:src-dirs ["src"]

(b/copy-dir {:src-dirs ["src/clj" "src/cljc" "src/cljs"]
:target-dir class-dir})

(b/copy-file {:src "src/data_readers.clj"
:target (str class-dir "/data_readers.clj")})

(b/jar {:class-dir class-dir
:jar-file jar-file}))
24 changes: 11 additions & 13 deletions example/deps.edn
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
{:paths ["src"]

:deps {org.clojure/clojure {:mvn/version "1.10.1"}
org.clojure/clojurescript {:mvn/version "1.10.773"}
hiccup {:mvn/version "2.0.0-alpha1"}
reagent {:mvn/version "0.10.0"}
dimovich/roll {:mvn/version "0.3.2"}}
:deps {org.clojure/clojure {:mvn/version "1.11.1"}
org.clojure/clojurescript {:mvn/version "1.11.60"}
hiccup/hiccup {:mvn/version "2.0.0-alpha2"}
reagent/reagent {:mvn/version "1.1.1"}
cljsjs/react {:mvn/version "17.0.2-0"}
cljsjs/react-dom {:mvn/version "17.0.2-0"}
dimovich/roll {:mvn/version "0.3.337"}}


:aliases
Expand All @@ -14,16 +16,12 @@

:frontend
{:extra-paths ["resources"]
:extra-deps {com.bhauman/figwheel-main {:mvn/version "0.2.11"}}
:main-opts ["-m figwheel.main" "-b dev"]}
:extra-deps {com.bhauman/figwheel-main {:mvn/version "0.2.18"}}
:main-opts ["-m" "figwheel.main" "-b" "dev"]}

:prod
{:main-opts ["-m cljs.main -co prod.cljs.edn -c example.client"]}
{:main-opts ["-m" "cljs.main" "-co" "prod.cljs.edn" "-c" "example.client"]}

:cider
{:extra-paths ["resources"]
:extra-deps {com.bhauman/figwheel-main {:mvn/version "0.2.11"}}}

:uberjar
{:extra-deps {seancorfield/depstar {:mvn/version "1.0.94"}}
:main-opts ["-m hf.depstar.uberjar example.jar"]}}}
:extra-deps {com.bhauman/figwheel-main {:mvn/version "0.2.18"}}}}}
14 changes: 14 additions & 0 deletions template/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<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>
<groupId>dimovich</groupId>
<artifactId>roll</artifactId>
<name>roll</name>
<description>Simple backend for Clojure.</description>
<url>https://github.com/dimovich/roll</url>
<scm>
<connection>scm:git:git://github.com/dimovich/roll.git</connection>
<developerConnection>scm:git:ssh://[email protected]/dimovich/roll.git</developerConnection>
<url>https://github.com/dimovich/roll</url>
</scm>
</project>

0 comments on commit 632442b

Please sign in to comment.