You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-dev@xmlgraphics.apache.org by "Simon Steiner (Jira)" <ji...@apache.org> on 2022/08/17 11:30:00 UTC

[jira] [Resolved] (FOP-3088) Jar packaging duplicates classes on classpath

     [ https://issues.apache.org/jira/browse/FOP-3088?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Simon Steiner resolved FOP-3088.
--------------------------------
    Fix Version/s: trunk
       Resolution: Fixed

http://svn.apache.org/viewvc?view=revision&revision=1903486

> Jar packaging duplicates classes on classpath
> ---------------------------------------------
>
>                 Key: FOP-3088
>                 URL: https://issues.apache.org/jira/browse/FOP-3088
>             Project: FOP
>          Issue Type: Bug
>            Reporter: Skip de Groot
>            Assignee: Simon Steiner
>            Priority: Major
>             Fix For: trunk
>
>
> I have a gradle project where we import apache fop with the following:
> {code:java}
> implementation("org.apache.xmlgraphics:fop:2.6") {code}
> Which results in the following dependencies being loaded on the classpath (I have removed the sub dependencies for simplicity)
> {code:java}
> org.apache.xmlgraphics:fop -> 2.6
> +--- org.apache.xmlgraphics:fop-util:2.6
> +--- org.apache.xmlgraphics:fop-events:2.6
> \--- org.apache.xmlgraphics:fop-core:2.6 {code}
> So far so good and everything works most of the time. I suspect any maven project would import in the same way.
> However, most classes are duplicated in fop-2.6.jar and their respective sub module. For instance, the org.apache.fop.apps.FOUserAgent class is packaged both in fop and fop-core. 
> All classes from the fop-events module in org.apache.fop.events package are also duplicated, but not from the org.apache.fop.tools package from the fop-events module (For instance org.apache.fop.tools.EventProducerCollector), making this also inconsistent somehow.
> Luckily both implementations seem the same but it is bad practice to have duplicate classes on the classpath, and package sizes are also doubled.
>  
> Depending on the implementation choice I would either expect a fatty jar with all the classes packaged which does not import anything or an somewhat empty root fop jar with all classes imported by the sub modules. As it stands now it seems to be a combination of both and not a completely consistant one either.
> Which one is the prefered solution of this project?



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