Is it possible to define the mapping from the mave...
# community-support
m
Is it possible to define the mapping from the maven coordinates to project name as part of the
includeBuild()
context? this to keep the mapping from module to project at its origin
l
Are you looking for something like this?
Copy code
includeBuild("my-lib")  {
    dependencySubstitution {
        substitute(module("com.acme:my-lib"))
            .using(project(":my-lib"))
    }
}
m
not really I am rather looking to define in
my-lib
context the mapping from module to project name. this mapping information is rather known within
my-lib
context
v
If you don't do bad things in
my-lib
it will just work
Usually, if you for example change group and / or name on the publication instead of setting the group on the project and naming the project like the artifact should be named, this happens as then no automatic substitution can be done anymore.
So the way to solve it at
my-lib
is to not manipulate that publication but set up the project so that the right result comes out, then the composite build will simply work. If you did the manipulation, then you need the manual substitution at usage-site.
m
thanks for the recommendation! so to be clear you can't use any mapping from my-lib if needed?
v
Not that I'm aware of. You either best-practice-y set up
my-lib
properly so that it just works, or you need to do manual substitution at usage side.