Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Made a new project, environments are still using example values... #1

Open
xicubed opened this issue Mar 30, 2022 · 2 comments
Open

Comments

@xicubed
Copy link

xicubed commented Mar 30, 2022

I followed the example and it worked great. Used this method.
clojure -Sdeps '{:deps {org.rssys/apptemplate {:git/tag "0.1.1" :git/sha "215be27" :git/url "https://github.com/redstarssystems/apptemplate.git"}}}' -Tnew create :template org.rssys/apptemplate :name com.example/app01

But when I created another project with my own project name and namespace...

clojure -Sdeps '{:deps {org.rssys/apptemplate {:git/tag "0.1.1" :git/sha "215be27" :git/url "https://github.com/redstarssystems/apptemplate.git"}}}' -Tnew create :template org.rssys/apptemplate :name edu.myown.name/myownproject

and go to bb build I somehow get the old com.example.app01 and app01

Project settings:
{:java-src-folders ["java-src"],
 :main-ns com.example.app01,
 :group-id "com.example",
 :release? false,
 :artifact-id "app01",
...
:artifact com.example/app01,

Writing pom.xml...
Copying src, resources...
Compiling com.example.app01...
Execution error (FileNotFoundException) at user/eval136 (compile.clj:6).
Could not locate com/example/app01__init.class, com/example/app01.clj or com/example/app01.cljc on classpath.

Which makes sense because there's nothing there its in the new location.

@xicubed
Copy link
Author

xicubed commented Apr 1, 2022

For now I've just over-ridden certain values in the build.clj. My repo uses main instead of master. I also looked at adding a template/pom.xml template at the root level and added a reference to it in the defn uberjar in the build.cjl (as described in https://github.com/seancorfield/build-clj)
(assoc :lib (:artifact project-env) :version (:artifact-version project-env) :src-pom "template/pom.xml" :main (:main-ns project-env)) that got me further but not all the way maybe.

;:group-id              (System/getenv "group-id")
:group-id              (clojure.edn/read-string (str "edu.myown.name"))
;:artifact-id           (System/getenv "artifact-id")
:artifact-id           (clojure.edn/read-string (str "myownproject"))
;:artifact              (symbol (System/getenv "artifact"))
:artifact              (clojure.edn/read-string (str "edu.myown.name/myownproject"))
;:main-ns               (symbol (System/getenv "main-ns"))
:main-ns               (clojure.edn/read-string (str "edu.myown.name.myownproject"))
;:release-branches      (System/getenv "release-branches")
:release-branches      (clojure.edn/read-string "\"#{\\\"main\\\"}\"")
;:deployable-branches   (System/getenv "deployable-branches")
:deployable-branches   (clojure.edn/read-string "\"#{\\\"develop\\\" \\\"main\\\"}\"")

@mikeananev
Copy link
Contributor

Hello.
Sorry for the late answer.

I've tried the command you described:
clojure -Sdeps '{:deps {org.rssys/apptemplate {:git/tag "0.1.1" :git/sha "215be27" :git/url "https://github.com/redstarssystems/apptemplate.git"}}}' -Tnew create :template org.rssys/apptemplate :name edu.myown.name/myownproject
I can't reproduce the error. Did you create new project in the same folder?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants