stevedlawrence opened a new issue, #165:
URL: https://github.com/apache/daffodil-sbt/issues/165

   Some schema projects are component schemas that require other schemas to 
include them and add missing components. This is common in envelope schemas, 
where the schema provides the format for the header/envelope and expect another 
schema to provide the payload. These component schemas usually have a stub 
schema in `src/test/resource` that allows the schema to be tested in TDML tests.
   
   For these kinds of schemas it is not currently possible for 
`packageDaffodilBin` to work, since it only see `Compile` resources in 
`src/main/`. But in some cases for testing, it could be useful to have a way to 
allow `packageDaffodilBin` to work by including schema in `src/test/resources`, 
as long as it's made clear that the result should only be used in limited 
circumstances such as testing.
   
   The SBT-y way to do this is to modify `packageDaffodilBin` so it is scoped 
to the `Compile` and `Test` configurations. This way if you run `Compile / 
packageDaffodilBin` it will use compile resources, and if you use `Test / 
packageDaffodilBin` it will use test resources. And by default if you do not 
provide a configuration and just run `packageDaffodilBin` it will use the 
`Compile` scope, maintaining existing behavior.
   
   This approach has the downside that it's not possible to use a `Test / 
packageDaffodilBin` saved parser in TDML tests due due a circular dependency, 
but this should be fine since this is intended for very limited use.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to