Skip to content

Support using this as a library, rather than just as a command line tool #53

@electricsam

Description

@electricsam

I have a use case where I need to use the ArgoFormatChecker as part of a larger Java application. The current project does not lend itself well to this for the following reasons:

  1. Use of System.exit() outside of the main class / method. This will kill any process using this library.
  2. Abundant use of static variables makes this not thread safe
  3. The shaded jar is problematic when being used as a dependency
  4. Mixed use of log4j and slf4j. Consistent use of slf4j would allow for the use of different logging implementations in the containing application.

I've forked the project and created a branch that addresses these issues while still maintaining the ability of the shaded jar to work as a command line application. The branch is here: https://github.com/CI-CMG/ArgoFormatChecker/tree/file-checker-library

This branch also updates the code that writes the XML file to use JAXB classes generated from a XSD defined XML schema. I currently use this library to parse the output of the ArgoFormatChecker (https://github.com/CI-CMG/argo-file-check-xml/blob/1.0/src/main/resources/edu/colorado/cires/argonaut/xml/FileCheckResults.xsd).

I would be happy to discuss creating a pull request for these changes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions