deps-new

Gleb Posobin 2021-01-23T22:18:30.000700Z

@posobin has joined the channel

Gleb Posobin 2021-01-23T22:19:56.001800Z

ยป clj -X:new :name posobin/eb-deployment-test
Generating a project called eb-deployment-test based on the 'app' template.
ยป cd eb-deployment-test
ยป clojure -M:uberjar
Clojure 1.10.1
user=>
Why am I getting the repl prompt and no jar?

Gleb Posobin 2021-01-23T22:21:01.002300Z

Clojure version 1.10.1.763

Gleb Posobin 2021-01-23T22:22:43.003Z

Ah, I should have run this with -X:uberjar. Readme at https://github.com/seancorfield/clj-new says to use -M.

Gleb Posobin 2021-01-23T22:23:25.003400Z

But readme inside the generated project is correct.

seancorfield 2021-01-23T22:26:49.004800Z

@posobin Good catch! I forgot the main README still said -M -- I have an open issue to update the deps-deploy stuff to use the latest version and switch to -X so I'll add a note to that to review and update the main clj-new README!

๐Ÿ‘ 1
Gleb Posobin 2021-01-23T23:17:32.005200Z

Why does clj-new generate a LICENSE file?

seancorfield 2021-01-23T23:26:15.005600Z

Because the generated README has a clause about licensing.

seancorfield 2021-01-23T23:26:46.006300Z

It's better to provide a default for folks who want to open source something -- other folks can just ignore it.

seancorfield 2021-01-23T23:27:09.006700Z

(I updated the main README for -X:jar and -X:uberjar BTW)

๐Ÿ‘ 1
seancorfield 2021-01-23T23:27:51.007500Z

The idea is that clj-new produces a "complete" starter project for you: it has a stub for tests, a stub for documentation, a complete pom.xml, etc.

seancorfield 2021-01-23T23:28:47.007900Z

The pom.xml also contains license information and SCM information.

seancorfield 2021-01-23T23:29:23.008600Z

Also: this is exactly the same behavior as boot-new and exactly the same behavior as lein -- and it's always been that way.

seancorfield 2021-01-23T23:30:10.009400Z

The project templates -- app and lib -- in clj-new came from my boot-new project, which copied a lot of stuff from Leiningen (with permission and with proper accreditation).

Gleb Posobin 2021-01-23T23:32:45.010900Z

I think there should be a note that this doesn't mean that the project has to be under EPL: I was first afraid that this is the case when I saw the LICENSE file, and only after reading the thread https://clojureverse.org/t/lein-creates-a-file-with-eclipse-gpl-license/5691 understood that there is no such obligation.

Gleb Posobin 2021-01-23T23:35:51.012500Z

Also, is pom needed only if I make a library out of my project?

seancorfield 2021-01-23T23:39:02.014Z

Currently, the app template also generates pom.xml because depstar sort of needs it -- but I'm planning to adjust depstar's behavior for uberjars. But, yes, if you generate a lib project and intend to deploy it somewhere, you'll need a pom.xml.

seancorfield 2021-01-23T23:39:45.015400Z

As for the license, I guess I sort of assumed that folks would just change the license to whatever they wanted -- but nearly all Clojure code that is open sourced uses EPL.

Gleb Posobin 2021-01-23T23:40:44.016200Z

Hmm, so I should keep pom.xml updated somehow? Or does tools.deps do it for me? I am using the app template.

seancorfield 2021-01-23T23:41:42.016600Z

depstar can do it automatically.

๐Ÿ‘ 1
seancorfield 2021-01-23T23:42:19.017200Z

:sync-pom true and you can also specify :version ... to change the version.

seancorfield 2021-01-23T23:43:12.018Z

That isn't the default, but I'll probably updated clj-new to make that the default when I next work on it.

seancorfield 2021-01-23T23:47:10.018700Z

https://github.com/seancorfield/clj-new/issues/49 to address licensing questions; https://github.com/seancorfield/clj-new/issues/50 to clarify the pom.xml usage and versioning (and have depstar keep it sync'd by default).