Hello,

I'm working on a multi-module Maven project where part of the artifact ID
includes the Scala version it is built against (2.12, 2.13, ...), as it is
common with Scala projects, since Scala minor version bumps often break (or
so I read).

I'm currently trying to fix the project setup, since it relies on dynamic
expressions in some of the module artifact IDs to achieve the above effect
and that does not really work (and litters the build with warnings,
rightfully so).

My current approach is to script the whole thing, something like
"./build-for-scala.sh 2.12" or "./build-for-scala-2.13". Sprinkle some sed
and it kinda works.

However, it is very fragile. Not only must the module artifact IDs change,
but so must any reference to the parent POM and the artifact ID of each
dependency sibling.

Reading about this problem led me to
https://stackoverflow.com/a/35023562/277128 but the solution is not very
compelling.

And of course, since that's an established project, I cannot afford to
change the artifact IDs before the next major version.

I would not even mind writing my own plugin or extension if that could
solve this particular dynamic artifact ID resolution.

Has anyone faced this before? How did you manage to solve this problem "the
Maven way"?

Best regards,
Florent

Reply via email to