lhotari commented on pull request #10340: URL: https://github.com/apache/pulsar/pull/10340#issuecomment-827293465
> @lhotari A couple of things are not 100% clear to me: > > 1. If it's activeByDefault, shouldn't the profile be always active? Maven's `activeByDefault` is not very intuitive. It doesn't activate a profile if there's already some other profile activate based on a rule. ([one of many Stackoverflow questions about this](https://stackoverflow.com/questions/32627352/only-one-maven-profile-executed-when-using-activebydefault)). Since the `jdk11` profile gets activated based on the jdk version, that prevents `main` profile from activating. > 2. If we need to activate it explicitly, that would mean that a simple `mvn install` won't work anymore? It seems that explicit activation is needed in a form or another to enable a solution for a build that has different configuration for JDK11. I've been trying to find a solution to that problem without finding a good solution. It seems that it would be possible to write a custom `org.apache.maven.model.profile.ProfileSelector` implementation to handle the situation. However, I'd rather find an out-of-the-box solution if that would be available. This maven extension looks useful: https://github.com/sviperll/ozymandias/tree/master/maven-profiledep-extension . I also found https://github.com/random-maven/profile-activator-extension , which could solve the problem. It is really annoying if `mvn install` stops working. I'll revisit this PR once more to fix that. However, I don't have a solution yet. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected]
