stevedlawrence commented on issue #146:
URL: https://github.com/apache/daffodil-sbt/issues/146#issuecomment-3665788432
In theory it should work. I haven't published anything to maven central, but
I believe it supports non-jar artifacts, and sbt does know how to find and
download artifacts with different classifiers in a maven repo, regardless of
their extension. The only issue is SBT doesn't know what to do with non-jar
artifacts, so you have to add custom logic to use them. For example, you could
do something like this to add saved parsers to the "test" classpath (assuming
the original syntax):
```scala
libraryDependecies ++= Seq(
"org.example" % "dfdl-fmt" % "1.0.0" daffodilBin(daffodilVersion.value)
)
Test / dependencyClasspath ++= {
val savedParsers: Seq[File] =
update.value.matching(artifactFilter(`type` = "parser")
val savedParserDirs = savedParser.map(_.toParentFile)
savedParserDirs
}
```
So you have to do a little SBT magic to scan the "update" report, filter the
saved parser artifacts that it downloaded, and then add their parent
directories to the classpath. But it's essentially a one-liner to get the saved
parser files, and then it's normal SBT code to do whatever you want with those
files.
--
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]