Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Artifact org.itsallcode.openfasttrace:openfasttrace causes duplicates #428

Open
kaklakariada opened this issue Aug 11, 2024 · 0 comments
Open
Labels

Comments

@kaklakariada
Copy link
Contributor

Running the duplicate finder plugin causes errors when including OFT as a dependency:

        <dependency>
            <groupId>org.itsallcode.openfasttrace</groupId>
            <artifactId>openfasttrace</artifactId>
            <version>${oft.version}</version>
            <scope>runtime</scope>
        </dependency>
[INFO] --- duplicate-finder-maven-plugin:2.0.1:check (default-cli) @ openfasttrace-maven-plugin ---
[INFO] Checking compile classpath
[INFO] Checking runtime classpath
...
[WARNING] Found duplicate (but equal) classes in [org.itsallcode.openfasttrace:openfasttrace-api:4.1.0, org.itsallcode.openfasttrace:openfasttrace:4.1.0]:
[WARNING]   org.itsallcode.openfasttrace.api.ColorScheme
[WARNING]   org.itsallcode.openfasttrace.api.DetailsSectionDisplay
[WARNING]   org.itsallcode.openfasttrace.api.FilterSettings
[WARNING]   org.itsallcode.openfasttrace.api.ReportSettings
[WARNING]   org.itsallcode.openfasttrace.api.cli.DirectoryService
[WARNING]   org.itsallcode.openfasttrace.api.core.DeepCoverageStatus
[WARNING]   org.itsallcode.openfasttrace.api.core.ItemStatus
[WARNING]   org.itsallcode.openfasttrace.api.core.LinkStatus
[WARNING]   org.itsallcode.openfasttrace.api.core.LinkedSpecificationItem
[WARNING]   org.itsallcode.openfasttrace.api.core.Location
[WARNING]   org.itsallcode.openfasttrace.api.core.Newline
[WARNING]   org.itsallcode.openfasttrace.api.core.SpecificationItem
[WARNING]   org.itsallcode.openfasttrace.api.core.SpecificationItemId
[WARNING]   org.itsallcode.openfasttrace.api.core.Trace
[WARNING]   org.itsallcode.openfasttrace.api.core.TracedLink
[WARNING]   org.itsallcode.openfasttrace.api.core.serviceloader.Initializable
[WARNING]   org.itsallcode.openfasttrace.api.exporter.Exporter
[WARNING]   org.itsallcode.openfasttrace.api.exporter.ExporterContext
[WARNING]   org.itsallcode.openfasttrace.api.exporter.ExporterException
[WARNING]   org.itsallcode.openfasttrace.api.exporter.ExporterFactory
[WARNING]   org.itsallcode.openfasttrace.api.importer.ImportEventListener
[WARNING]   org.itsallcode.openfasttrace.api.importer.ImportSettings
[WARNING]   org.itsallcode.openfasttrace.api.importer.Importer
[WARNING]   org.itsallcode.openfasttrace.api.importer.ImporterContext
[WARNING]   org.itsallcode.openfasttrace.api.importer.ImporterException
[WARNING]   org.itsallcode.openfasttrace.api.importer.ImporterFactory
[WARNING]   org.itsallcode.openfasttrace.api.importer.ImporterService
[WARNING]   org.itsallcode.openfasttrace.api.importer.MultiFileImporter
[WARNING]   org.itsallcode.openfasttrace.api.importer.RegexMatchingImporterFactory
[WARNING]   org.itsallcode.openfasttrace.api.importer.SpecificationListBuilder
[WARNING]   org.itsallcode.openfasttrace.api.importer.input.InputFile
[WARNING]   org.itsallcode.openfasttrace.api.importer.input.RealFileInput
[WARNING]   org.itsallcode.openfasttrace.api.importer.tag.config.DescribedPathMatcher
[WARNING]   org.itsallcode.openfasttrace.api.importer.tag.config.PathConfig
[WARNING]   org.itsallcode.openfasttrace.api.report.ReportConstants
[WARNING]   org.itsallcode.openfasttrace.api.report.ReportException
[WARNING]   org.itsallcode.openfasttrace.api.report.ReportVerbosity
[WARNING]   org.itsallcode.openfasttrace.api.report.Reportable
[WARNING]   org.itsallcode.openfasttrace.api.report.ReporterContext
[WARNING]   org.itsallcode.openfasttrace.api.report.ReporterFactory
[WARNING] Found duplicate (but equal) classes in [org.itsallcode.openfasttrace:openfasttrace-core:4.1.0, org.itsallcode.openfasttrace:openfasttrace:4.1.0]:
[WARNING]   org.itsallcode.openfasttrace.core.ExportSettings
[WARNING]   org.itsallcode.openfasttrace.core.LinkedItemIndex
[WARNING]   org.itsallcode.openfasttrace.core.Linker
[WARNING]   org.itsallcode.openfasttrace.core.Oft
[WARNING]   org.itsallcode.openfasttrace.core.OftRunner
[WARNING]   org.itsallcode.openfasttrace.core.ServiceFactory
[WARNING]   org.itsallcode.openfasttrace.core.Tracer
[WARNING]   org.itsallcode.openfasttrace.core.cli.ArgumentValidator
[WARNING]   org.itsallcode.openfasttrace.core.cli.CliArguments
[WARNING]   org.itsallcode.openfasttrace.core.cli.CliException
[WARNING]   org.itsallcode.openfasttrace.core.cli.CliStarter
[WARNING]   org.itsallcode.openfasttrace.core.cli.CommandLineInterpreter
[WARNING]   org.itsallcode.openfasttrace.core.cli.ExitStatus
[WARNING]   org.itsallcode.openfasttrace.core.cli.MissingArgumentException
[WARNING]   org.itsallcode.openfasttrace.core.cli.StandardDirectoryService
[WARNING]   org.itsallcode.openfasttrace.core.cli.commands.AbstractCommand
[WARNING]   org.itsallcode.openfasttrace.core.cli.commands.ConvertCommand
[WARNING]   org.itsallcode.openfasttrace.core.cli.commands.HelpCommand
[WARNING]   org.itsallcode.openfasttrace.core.cli.commands.Performable
[WARNING]   org.itsallcode.openfasttrace.core.cli.commands.TraceCommand
[WARNING]   org.itsallcode.openfasttrace.core.cli.logging.LogLevel
[WARNING]   org.itsallcode.openfasttrace.core.cli.logging.LoggingConfigurator
[WARNING]   org.itsallcode.openfasttrace.core.exporter.ExporterConstants
[WARNING]   org.itsallcode.openfasttrace.core.exporter.ExporterFactoryLoader
[WARNING]   org.itsallcode.openfasttrace.core.exporter.ExporterService
[WARNING]   org.itsallcode.openfasttrace.core.importer.ImporterFactoryLoader
[WARNING]   org.itsallcode.openfasttrace.core.importer.ImporterServiceImpl
[WARNING]   org.itsallcode.openfasttrace.core.importer.MultiFileImporterImpl
[WARNING]   org.itsallcode.openfasttrace.core.report.ReportService
[WARNING]   org.itsallcode.openfasttrace.core.report.ReporterFactoryLoader
[WARNING]   org.itsallcode.openfasttrace.core.serviceloader.ChildFirstClassLoader
[WARNING]   org.itsallcode.openfasttrace.core.serviceloader.ClassPathServiceLoader
[WARNING]   org.itsallcode.openfasttrace.core.serviceloader.DelegatingLoader
[WARNING]   org.itsallcode.openfasttrace.core.serviceloader.InitializingServiceLoader
[WARNING]   org.itsallcode.openfasttrace.core.serviceloader.Loader
[WARNING]   org.itsallcode.openfasttrace.core.serviceloader.ServiceLoaderFactory
[WARNING]   org.itsallcode.openfasttrace.core.serviceloader.ServiceOrigin
[WARNING] Found duplicate (but equal) classes in [org.itsallcode.openfasttrace:openfasttrace-exporter-common:4.1.0, org.itsallcode.openfasttrace:openfasttrace:4.1.0]:
[WARNING]   org.itsallcode.openfasttrace.exporter.common.DelegatingXMLStreamWriter
[WARNING]   org.itsallcode.openfasttrace.exporter.common.IndentingXMLStreamWriter
[WARNING] Found duplicate (but equal) classes in [org.itsallcode.openfasttrace:openfasttrace-exporter-specobject:4.1.0, org.itsallcode.openfasttrace:openfasttrace:4.1.0]:
[WARNING]   org.itsallcode.openfasttrace.exporter.specobject.SpecobjectExporter
[WARNING]   org.itsallcode.openfasttrace.exporter.specobject.SpecobjectExporterFactory
[WARNING] Found duplicate (but equal) classes in [org.itsallcode.openfasttrace:openfasttrace-importer-lightweightmarkup:4.1.0, org.itsallcode.openfasttrace:openfasttrace:4.1.0]:
[WARNING]   org.itsallcode.openfasttrace.importer.lightweightmarkup.ForwardingSpecificationItem
[WARNING]   org.itsallcode.openfasttrace.importer.lightweightmarkup.LightWeightMarkupImporter
[WARNING]   org.itsallcode.openfasttrace.importer.lightweightmarkup.linereader.LineContext
[WARNING]   org.itsallcode.openfasttrace.importer.lightweightmarkup.linereader.LineReader
[WARNING]   org.itsallcode.openfasttrace.importer.lightweightmarkup.linereader.LineReaderCallback
[WARNING]   org.itsallcode.openfasttrace.importer.lightweightmarkup.statemachine.LineParserState
[WARNING]   org.itsallcode.openfasttrace.importer.lightweightmarkup.statemachine.LineParserStateMachine
[WARNING]   org.itsallcode.openfasttrace.importer.lightweightmarkup.statemachine.LinePattern
[WARNING]   org.itsallcode.openfasttrace.importer.lightweightmarkup.statemachine.SimpleLinePattern
[WARNING]   org.itsallcode.openfasttrace.importer.lightweightmarkup.statemachine.Transition
[WARNING]   org.itsallcode.openfasttrace.importer.lightweightmarkup.statemachine.TransitionAction
[WARNING] Found duplicate (but equal) classes in [org.itsallcode.openfasttrace:openfasttrace-importer-markdown:4.1.0, org.itsallcode.openfasttrace:openfasttrace:4.1.0]:
[WARNING]   org.itsallcode.openfasttrace.importer.markdown.MarkdownImporter
[WARNING]   org.itsallcode.openfasttrace.importer.markdown.MarkdownImporterFactory
[WARNING]   org.itsallcode.openfasttrace.importer.markdown.MdPattern
[WARNING]   org.itsallcode.openfasttrace.importer.markdown.MdSectionTitlePattern
[WARNING] Found duplicate (but equal) classes in [org.itsallcode.openfasttrace:openfasttrace-importer-restructuredtext:4.1.0, org.itsallcode.openfasttrace:openfasttrace:4.1.0]:
[WARNING]   org.itsallcode.openfasttrace.importer.restructuredtext.RestructuredTextImporter
[WARNING]   org.itsallcode.openfasttrace.importer.restructuredtext.RestructuredTextImporterFactory
[WARNING]   org.itsallcode.openfasttrace.importer.restructuredtext.RstPattern
[WARNING]   org.itsallcode.openfasttrace.importer.restructuredtext.RstSectionTitlePattern
[WARNING] Found duplicate (but equal) classes in [org.itsallcode.openfasttrace:openfasttrace-importer-specobject:4.1.0, org.itsallcode.openfasttrace:openfasttrace:4.1.0]:
[WARNING]   org.itsallcode.openfasttrace.importer.specobject.SpecobjectImporter
[WARNING]   org.itsallcode.openfasttrace.importer.specobject.SpecobjectImporterFactory
[WARNING]   org.itsallcode.openfasttrace.importer.specobject.handler.DependenciesHandlerBuilder
[WARNING]   org.itsallcode.openfasttrace.importer.specobject.handler.FulfilledByHandlerBuilder
[WARNING]   org.itsallcode.openfasttrace.importer.specobject.handler.NeedsCoverageHandlerBuilder
[WARNING]   org.itsallcode.openfasttrace.importer.specobject.handler.ProvidesCoverageHandlerBuilder
[WARNING]   org.itsallcode.openfasttrace.importer.specobject.handler.SingleSpecObjectsHandlerBuilder
[WARNING]   org.itsallcode.openfasttrace.importer.specobject.handler.SpecDocumentHandlerBuilder
[WARNING]   org.itsallcode.openfasttrace.importer.specobject.handler.SpecObjectsHandlerBuilder
[WARNING]   org.itsallcode.openfasttrace.importer.specobject.handler.TagsHandlerBuilder
[WARNING] Found duplicate (but equal) classes in [org.itsallcode.openfasttrace:openfasttrace-importer-tag:4.1.0, org.itsallcode.openfasttrace:openfasttrace:4.1.0]:
[WARNING]   org.itsallcode.openfasttrace.importer.tag.ChecksumCalculator
[WARNING]   org.itsallcode.openfasttrace.importer.tag.DelegatingLineConsumer
[WARNING]   org.itsallcode.openfasttrace.importer.tag.LineReader
[WARNING]   org.itsallcode.openfasttrace.importer.tag.LongTagImportingLineConsumer
[WARNING]   org.itsallcode.openfasttrace.importer.tag.RegexLineConsumer
[WARNING]   org.itsallcode.openfasttrace.importer.tag.ShortTagImportingLineConsumer
[WARNING]   org.itsallcode.openfasttrace.importer.tag.TagImporter
[WARNING]   org.itsallcode.openfasttrace.importer.tag.TagImporterFactory
[WARNING] Found duplicate (but equal) classes in [org.itsallcode.openfasttrace:openfasttrace-importer-xmlparser:4.1.0, org.itsallcode.openfasttrace:openfasttrace:4.1.0]:
[WARNING]   org.itsallcode.openfasttrace.importer.xmlparser.ContentHandlerAdapter
[WARNING]   org.itsallcode.openfasttrace.importer.xmlparser.ContentHandlerAdapterController
[WARNING]   org.itsallcode.openfasttrace.importer.xmlparser.EventContentHandler
[WARNING]   org.itsallcode.openfasttrace.importer.xmlparser.IgnoringEntityResolver
[WARNING]   org.itsallcode.openfasttrace.importer.xmlparser.XmlParser
[WARNING]   org.itsallcode.openfasttrace.importer.xmlparser.XmlParserException
[WARNING]   org.itsallcode.openfasttrace.importer.xmlparser.XmlParserFactory
[WARNING]   org.itsallcode.openfasttrace.importer.xmlparser.event.Attribute
[WARNING]   org.itsallcode.openfasttrace.importer.xmlparser.event.EndElementEvent
[WARNING]   org.itsallcode.openfasttrace.importer.xmlparser.event.QNameFactory
[WARNING]   org.itsallcode.openfasttrace.importer.xmlparser.event.StartElementEvent
[WARNING]   org.itsallcode.openfasttrace.importer.xmlparser.tree.CallbackContentHandler
[WARNING]   org.itsallcode.openfasttrace.importer.xmlparser.tree.TreeBuildingContentHandler
[WARNING]   org.itsallcode.openfasttrace.importer.xmlparser.tree.TreeContentHandler
[WARNING]   org.itsallcode.openfasttrace.importer.xmlparser.tree.TreeElement
[WARNING]   org.itsallcode.openfasttrace.importer.xmlparser.tree.TreeParsingController
[WARNING] Found duplicate (but equal) classes in [org.itsallcode.openfasttrace:openfasttrace-importer-zip:4.1.0, org.itsallcode.openfasttrace:openfasttrace:4.1.0]:
[WARNING]   org.itsallcode.openfasttrace.importer.zip.ZipFileImporter
[WARNING]   org.itsallcode.openfasttrace.importer.zip.ZipFileImporterFactory
[WARNING]   org.itsallcode.openfasttrace.importer.zip.input.ZipEntryInput
[WARNING] Found duplicate (but equal) classes in [org.itsallcode.openfasttrace:openfasttrace-reporter-aspec:4.1.0, org.itsallcode.openfasttrace:openfasttrace:4.1.0]:
[WARNING]   org.itsallcode.openfasttrace.report.aspec.ASpecReport
[WARNING]   org.itsallcode.openfasttrace.report.aspec.ASpecReporterFactory
[WARNING] Found duplicate (but equal) classes in [org.itsallcode.openfasttrace:openfasttrace-reporter-html:4.1.0, org.itsallcode.openfasttrace:openfasttrace:4.1.0]:
[WARNING]   org.itsallcode.openfasttrace.report.html.HtmlReport
[WARNING]   org.itsallcode.openfasttrace.report.html.HtmlReporterFactory
[WARNING]   org.itsallcode.openfasttrace.report.html.view.AbstractStreamableViewContainer
[WARNING]   org.itsallcode.openfasttrace.report.html.view.AbstractViewContainer
[WARNING]   org.itsallcode.openfasttrace.report.html.view.AbstractViewFactory
[WARNING]   org.itsallcode.openfasttrace.report.html.view.IndentationHelper
[WARNING]   org.itsallcode.openfasttrace.report.html.view.ViewFactory
[WARNING]   org.itsallcode.openfasttrace.report.html.view.Viewable
[WARNING]   org.itsallcode.openfasttrace.report.html.view.ViewableContainer
[WARNING]   org.itsallcode.openfasttrace.report.html.view.html.CharacterConstants
[WARNING]   org.itsallcode.openfasttrace.report.html.view.html.HtmlReportDetails
[WARNING]   org.itsallcode.openfasttrace.report.html.view.html.HtmlReportSummary
[WARNING]   org.itsallcode.openfasttrace.report.html.view.html.HtmlSection
[WARNING]   org.itsallcode.openfasttrace.report.html.view.html.HtmlSpecificationItem
[WARNING]   org.itsallcode.openfasttrace.report.html.view.html.HtmlTableOfContents
[WARNING]   org.itsallcode.openfasttrace.report.html.view.html.HtmlTraceSummary
[WARNING]   org.itsallcode.openfasttrace.report.html.view.html.HtmlView
[WARNING]   org.itsallcode.openfasttrace.report.html.view.html.HtmlViewFactory
[WARNING]   org.itsallcode.openfasttrace.report.html.view.html.MarkdownConverter
[WARNING]   org.itsallcode.openfasttrace.report.html.view.html.MarkdownLineState
[WARNING]   org.itsallcode.openfasttrace.report.html.view.html.MarkdownLineStateMachine
[WARNING]   org.itsallcode.openfasttrace.report.html.view.html.MarkdownLineTransition
[WARNING]   org.itsallcode.openfasttrace.report.html.view.html.MarkdownSpanConverter
[WARNING]   org.itsallcode.openfasttrace.report.html.view.html.OriginLinkFormatter
[WARNING] Found duplicate (but equal) classes in [org.itsallcode.openfasttrace:openfasttrace-reporter-plaintext:4.1.0, org.itsallcode.openfasttrace:openfasttrace:4.1.0]:
[WARNING]   org.itsallcode.openfasttrace.report.plaintext.AnsiSequence
[WARNING]   org.itsallcode.openfasttrace.report.plaintext.ConsoleColorFormatter
[WARNING]   org.itsallcode.openfasttrace.report.plaintext.MonochromeTextFormatter
[WARNING]   org.itsallcode.openfasttrace.report.plaintext.NullTextFormatter
[WARNING]   org.itsallcode.openfasttrace.report.plaintext.PlainTextReport
[WARNING]   org.itsallcode.openfasttrace.report.plaintext.PlaintextReporterFactory
[WARNING]   org.itsallcode.openfasttrace.report.plaintext.TextFormatter
[WARNING]   org.itsallcode.openfasttrace.report.plaintext.TextFormatterFactory
[WARNING] Found duplicate (but equal) resources in [org.itsallcode.openfasttrace:openfasttrace-core:4.1.0, org.itsallcode.openfasttrace:openfasttrace:4.1.0]:
[WARNING]   openfasttrace_logo.png
[WARNING]   openfasttrace_logo.svg
[WARNING]   openfasttrace_logo.txt
[WARNING]   usage.txt
[WARNING] Found duplicate (but equal) resources in [org.itsallcode.openfasttrace:openfasttrace-reporter-html:4.1.0, org.itsallcode.openfasttrace:openfasttrace:4.1.0]:
[WARNING]   css/report.css
[WARNING] Found duplicate classes/resources in runtime classpath.

Root cause

Artifact org.itsallcode.openfasttrace:openfasttrace is a fat jar produced with maven-shade-plugin but still declares it's dependencies in pom.xml, because of setting <createDependencyReducedPom>false</createDependencyReducedPom>:

+- org.itsallcode.openfasttrace:openfasttrace:jar:4.1.0:runtime
|  +- org.itsallcode.openfasttrace:openfasttrace-core:jar:4.1.0:runtime
|  +- org.itsallcode.openfasttrace:openfasttrace-exporter-specobject:jar:4.1.0:runtime
|  |  \- org.itsallcode.openfasttrace:openfasttrace-exporter-common:jar:4.1.0:runtime
|  +- org.itsallcode.openfasttrace:openfasttrace-importer-markdown:jar:4.1.0:runtime
|  |  \- org.itsallcode.openfasttrace:openfasttrace-importer-lightweightmarkup:jar:4.1.0:runtime
|  +- org.itsallcode.openfasttrace:openfasttrace-importer-restructuredtext:jar:4.1.0:runtime
|  +- org.itsallcode.openfasttrace:openfasttrace-importer-specobject:jar:4.1.0:runtime
|  |  \- org.itsallcode.openfasttrace:openfasttrace-importer-xmlparser:jar:4.1.0:runtime
|  +- org.itsallcode.openfasttrace:openfasttrace-importer-tag:jar:4.1.0:runtime
|  +- org.itsallcode.openfasttrace:openfasttrace-importer-zip:jar:4.1.0:runtime
|  +- org.itsallcode.openfasttrace:openfasttrace-reporter-plaintext:jar:4.1.0:runtime
|  +- org.itsallcode.openfasttrace:openfasttrace-reporter-html:jar:4.1.0:runtime
|  \- org.itsallcode.openfasttrace:openfasttrace-reporter-aspec:jar:4.1.0:runtime

Proposed solution

  • Change configuration of maven-shade-plugin:
    • Set createDependencyReducedPom to true to create a pom without dependencies
@github-project-automation github-project-automation bot moved this to 📫 Backlog in OpenFastTrace Aug 11, 2024
kaklakariada added a commit to itsallcode/openfasttrace-maven-plugin that referenced this issue Aug 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: 📫 Backlog
Development

No branches or pull requests

1 participant