[
https://issues.apache.org/jira/browse/MENFORCER-338?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16966717#comment-16966717
]
Jeffrey Bennett commented on MENFORCER-338:
-------------------------------------------
Rationale #1: The JDKs provided by the various vendors use distinct source
code implementations, meaning that overtime, the byte code produced by each may
vary somewhat. This would be especially true for 'syntactic sugar' operations
that the JDK manufactures equivalent code. It's plausible that bugs will crop
up making one vendor better than another. A particular application may come to
rely upon, or want to ward against, one or more of these implementations.
Rationale #2: The various vendors are licensing their JDks differently. We may
wish to insure that only a properly licensed JDK is being used for building.
Presently, I am unaware of any vendor that prevents use of their JDK in
development, but that's obviously subject to change.
Rationale #2b: That said, a variant of this would be where an application in
production invokes 'mvn' in an automated way to implement some piece of
functionality. i.e. My application (running in production) invokes 'mvn' to
accomplish something - e.g. spit out a dependency tree. Because that use of
mvn is now 'production', we would want to insure proper JVM licensing for
production usage.
Rationale #3: On large development teams that want to encourage uniformity,
being able to insure the JVM utilized is consistent is a good thing. With the
recent (APR 2019) change to Oracle licensing model, we've begin to shift from
(previously freely available) Oracle JDK to (freely available) AdoptOpenJDK.
We would prefer to use enforcer to insure developers are using the approved JVM.
> Along with JavaVersion, allow enforcement of the JavaVendor
> -----------------------------------------------------------
>
> Key: MENFORCER-338
> URL: https://issues.apache.org/jira/browse/MENFORCER-338
> Project: Maven Enforcer Plugin
> Issue Type: Improvement
> Reporter: Jeffrey Bennett
> Priority: Major
>
> It would be useful to be able to ensure that a particular vendor JDK is being
> used. For example, I may need to confirm that we are using AdoptOpenJDK
> 1.8.0_232 and not Oracle JDK 1.8.0_232.
>
> I would assume that you would define a set of enums for the vendors - e.g.
> (OracleJDK, AdoptOpenJDK, JavaOpenJDK, and maybe a few others) so that it
> would look something like this to insure that either Adopt or Amazon JDK
> vendor was used.
> <requireJavaVendor>
> <vendors>
> <vendor>adpt</vendor>
> <vendor>amzn</vendor>
> </vendors>
> </requireJavaVendor>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)