leiningen

N.B. The maintainers are on #leiningen on Libera chat IRC. Go there for direct support/bug reports.
antono 2019-09-20T08:26:47.013Z

Hey, I am having a problem with leiningen, where I defined a custom profile with its own resource path, but when I run lein with profile custom_profile test, the resource path of the test profile is used

antono 2019-09-20T08:36:29.013400Z

Ok I think I fixed it

antono 2019-09-20T08:36:48.013900Z

What is the difference between resource-paths and test-paths?

2019-09-20T12:34:39.014500Z

@aoellerer the test task automatically adds the test profile

metame 2019-09-20T13:35:07.014600Z

The project actually shows up in lein monolith info but when running lein monolith each :in my-service test I get the "Could not resolve" err.

metame 2019-09-20T18:57:40.014800Z

any thoughts on what could cause this @greg316? Assumptions about what it should find when running?

greglook 2019-09-20T18:59:12.015Z

:thinking_face: might be good to make an issue for this on https://github.com/amperity/lein-monolith with some more of the context - let me peek at the code real quick

metame 2019-09-20T19:00:34.015300Z

Okay will do

greglook 2019-09-20T19:01:26.015500Z

out of curiosity, do your subprojects use artifact groups?

metame 2019-09-20T19:02:19.015700Z

checking

greglook 2019-09-20T19:04:25.015900Z

the lookup logic is basically: - does the selector explicitly match a subproject group/name? - does the ‘condensed’ version of the name explicitly match a subproject group/name? (e.g. a bare (defproject foo ... is actually foo/foo but can be represented in the short form) - if the target has no group, does it match exactly one subproject name? - if not, unresolved

greglook 2019-09-20T19:04:43.016100Z

step two seems like the highest probability for something odd happening

metame 2019-09-20T19:07:45.016300Z

ok great questions. Let me do some homework and get back to you

metame 2019-09-20T19:11:40.016500Z

so had the subproject name set as com.org.my-service changed it to <http://com.org/my-service|com.org/my-service> and now it works

metame 2019-09-20T19:13:16.016700Z

Same fix for all 3 services.

metame 2019-09-20T19:14:50.016900Z

Is there a short explanation of what the difference between these are?

antono 2019-09-20T19:23:00.017100Z

Yeah, but it should not overwrite values sets by selected profiles, no?

2019-09-20T19:32:09.017600Z

Profiles will merge.

2019-09-20T19:32:32.018400Z

You may be able to do :replace metadata on the vector of resource-paths

greglook 2019-09-20T19:33:54.018600Z

@michaeljameserwin the short version is that the “group-id” is a shared namespace for many projects, while the “artifact-id” is the name of a specific project (or rather, the JAR and other artifacts produced for a project) - I don’t know if periods are legal name characters for artifact ids, which may have been part of the problem.

greglook 2019-09-20T19:34:49.018800Z

In most cases the subprojects in a monorepo should probably all share the same group-id, though that’s not something that lein-monolith currently checks or enforces.

metame 2019-09-20T19:36:01.019Z

This is very helpful. Many thanks!!

2019-09-20T22:01:40.019700Z

You can show me an example of your project.clj and I could help