Closed asm0dey closed 3 years ago
I don't think maven allows you to do this all in one run.
OK, thanks
I usually drop a Makefile
in the root of my projects that runs the corresponding maven command for all profiles. For example:
SCALA_VERSIONS := 2.11 2.12
deploy:
for scala_version in $(SCALA_VERSIONS); do \
mvn deploy -Pscala-$$scala_version || exit 1; \
done
Then I can run make deploy
.
There is a trouble with deploy to central, which is it sets up new tag and version on each release
Ah, that makes sense. Unfortunately I don't know of a good solution here, unless you can somehow separate out the tagging and version bumping with the actual build and deploy.
This is really ugly, but I suppose you could delete the tag and roll back the version bump after each deploy (except leave it there after the final deploy).
What is the correct way to build all profiles in one run? Say I have a project with 2.11 and 2.12 support and want to publish both versions to maven central. What is the correct way to do this?