Reputation: 2041
My ~/.m2/settings.xml
file has a profile that I want to activate only when a specific vendor JDK is used. I read about <activation>
tag in maven documentation, but it seems this tag doesn't have checks by the particular vendor. Any advice on how I can do it?
Upvotes: 1
Views: 256
Reputation: 2026
You can test the java.vendor
property with something like:
<profiles>
<profile>
<id>AdoptOpenJDK</id>
<activation>
<property>
<name>java.vendor</name>
<value>AdoptOpenJDK</value>
</property>
</activation>
</profile>
...
</profiles>
Use java -XshowSettings:properties
to determine the property values for
your various JDKs:
$ java -XshowSettings:properties
Property settings:
...
java.vendor = AdoptOpenJDK
...
Upvotes: 2