You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@daffodil.apache.org by "Mike Beckerle (Jira)" <ji...@apache.org> on 2021/01/21 20:54:00 UTC

[jira] [Closed] (DAFFODIL-1800) CLI should search classpath for schema and data file or infoset file.

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

Mike Beckerle closed DAFFODIL-1800.
-----------------------------------
    Resolution: Not A Bug

> CLI should search classpath for schema and data file or infoset file.
> ---------------------------------------------------------------------
>
>                 Key: DAFFODIL-1800
>                 URL: https://issues.apache.org/jira/browse/DAFFODIL-1800
>             Project: Daffodil
>          Issue Type: Improvement
>          Components: CLI, Usability
>            Reporter: Mike Beckerle
>            Priority: Major
>
> Using our new Standard DFDL Schema Project Layout, an example command line ends up looking like:
> {code:java}
> $ ./bin/daffodil parse --schema ~/examples/CSV/src/main/resources/com/tresys/csv/xsd/csv.dfdl.xsd ~/examples/CSV/src/test/resources/com/tresys/csv/data/simpleCSV.csv{code}
> Notice how long those file names are.
> Now, if I look at the CLI instructions, it describes use of DAFFODIL_CLASSPATH.
> I might want to do this in order to shorten my massively long paths:
> {code:java}
> export DAFFODIL_CLASSPATH="~/examples/CSV/src/test/resources:~/examples/CSV/src/main/resources"{code}
> Then shorten the command line to
> {code:java}
> $ ./bin/daffodil parse --schema com/tresys/csv/xsd/csv.dfdl.xsd com/tresys/csv/data/simpleCSV.csv{code}
> Which is still long, but much more reasonable.
> However, this doesn't work because only xs:include and xs:import search the classpath. The CLI doesn't search the classpath when trying to find the schema or the input file.
> This improvement would change CLI so that it would try to use the supplied path directly, but if file is not found, it would then search the classpath for it. So that the same path that would be specified in the schemaLocation attribute of an xs:import or xs:include could be used on the command line.
> With this change, our standard schema project layout is much less painful for CLI users. As it stands now the standard schema project layout makes it pretty painful for people who want to issue CLI commands and who actually type them.
> Note that this change is completely backward compatible.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)