[ 
https://issues.apache.org/jira/browse/XMLBEANS-651?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17861101#comment-17861101
 ] 

Reto Hoehener commented on XMLBEANS-651:
----------------------------------------

[~fanningpj] After reading 
[https://stackoverflow.com/questions/11677572/dealing-with-xerces-hell-in-java-maven,]
 my current understanding is that Java 8 contains xml-apis:1.3.01, and Java 9 
contains xml-apis:1.4.01. For example {{org.w3c.dom.ElementTraversal}} exists 
in Java 9, but not in Java 8.

So I guess that profile for Java 8 is correct after all. Maybe a comment in the 
pom referencing this issue?

I was investigating xercesImpl and xml-apis dependencies in our Java 8 
application. We went full circle in 20 years: In Java 1.4 times the 
state-of-the art libs required a xercesImpl/xml-apis combination that was not 
included in 1.4, so we had to provide/package them. In the past decade between 
1.5 and 1.8 we internalized that xml-apis was now part of the jdk and 
exclusions for xercesImpl+xml-apis were sprinkled everywhere in the poms. Now - 
because of vulnerability scanning - old libraries start to release new versions 
with xercesImpl 2.12.2, which again needs xml-apis not yet included in Java 8. 
So we probably have to undo all those exclusions and package those apis again.

I realize now that Apache POI does it really nice with this profile, because 
when we finally switch to Java 17, we will not have to re-add the exclusions 
for xml-apis.

> xml-apis dependency clarification
> ---------------------------------
>
>                 Key: XMLBEANS-651
>                 URL: https://issues.apache.org/jira/browse/XMLBEANS-651
>             Project: XMLBeans
>          Issue Type: Wish
>            Reporter: Reto Hoehener
>            Assignee: PJ Fanning
>            Priority: Major
>             Fix For: Version 5.2.2
>
>
> Could you please explain the reason for the xml-apis dependency in the jdk 
> 1.8 profile? Are these classes not already part of Java 8?
> If there is no specific reason, can this dependency and profile be removed?
> POM v5.2.1: 
> https://repo1.maven.org/maven2/org/apache/xmlbeans/xmlbeans/5.2.1/xmlbeans-5.2.1.pom
> {code:java}
> <profiles>
>   <profile>
>     <id>java8</id>
>     <activation>
>       <jdk>1.8</jdk>
>     </activation>
>     <dependencies>
>       <dependency>
>         <groupId>xml-apis</groupId>
>         <artifactId>xml-apis</artifactId>
>         <version>1.4.01</version>
>       </dependency>
>     </dependencies>
>   </profile>
> </profiles>{code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org
For additional commands, e-mail: dev-h...@poi.apache.org

Reply via email to