[
https://issues.apache.org/jira/browse/HBASE-16370?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15411848#comment-15411848
]
Sean Busbey commented on HBASE-16370:
-------------------------------------
as long as we can guarantee we're not shipping the contents of the jar (perhaps
adding a banned dependency via the enforcer plugin to modules besides
hbase-annotations?) , then I'm +0 on adding the exclusion. (I realize it's not
exactly the same problem as picking the "right" tools jar for jdk7, since we
shouldn't be shipping any of them.)
Since this change will enable cross-jdk compilation, can you file a follow-on
JIRA to add the animal-sniffer plugin or some other means of enforcing API
compatibility?
> Exclude jdk tools.jar from Bytecode Version enforcer
> ----------------------------------------------------
>
> Key: HBASE-16370
> URL: https://issues.apache.org/jira/browse/HBASE-16370
> Project: HBase
> Issue Type: Improvement
> Affects Versions: 1.2.2
> Reporter: Jerry He
> Assignee: Jerry He
> Priority: Minor
> Fix For: 2.0.0, 1.3.0, 1.4.0, 1.2.3
>
> Attachments: HBASE-16370.patch
>
>
> Getting this message trying to do a build with -Prelease:
> {noformat}
> [INFO] Restricted to JDK 1.7 yet jdk.tools:jdk.tools:jar:1.8:system contains
> org/relaxng/datatype/DatatypeLibrary.class targeted to JDK 1.8
> [WARNING] Rule 3: org.apache.maven.plugins.enforcer.EnforceBytecodeVersion
> failed with message:
> HBase has unsupported dependencies.
> HBase requires that all dependencies be compiled with version 1.7 or earlier
> of the JDK to properly build from source. You appear to be using a newer
> dependency. You can use
> either "mvn -version" or "mvn enforcer:display-info" to verify what version
> is active.
> Non-release builds can temporarily build with a newer JDK version by
> setting the
> 'compileSource' property (eg. mvn -DcompileSource=1.8 clean package).
> Found Banned Dependency: jdk.tools:jdk.tools:jar:1.8
> Use 'mvn dependency:tree' to locate the source of the banned dependencies.
> [INFO]
> ------------------------------------------------------------------------
> {noformat}
> My JDK is 1.8. But I wanted to build to target 1.7. So I didn't' have the
> -DcompileSource=1.8.
> The enforcer checks the jdk tools.jar and causes the error because the system
> JDK is 1.8.
> This is a valid build/release use case as long as we support both 1.8 and 1.7.
> We should exclude jdk tools.jar from the enforcer.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)