In sbt there are a few custom classifier types that are built-in which are super easy to use.
For example specifying publishArtifact in Test := true
in your build file automatically generates an artifact with the 'test' classifier with the sources that appear in the 'test' directory of your project.
Similarly using publishArtifact in IntegrationTest := true
generates an artifact with the 'it' classifier with the sources that appear in the 'it' directory of your project.
Both of these depend on the compile phase.
I'd like to add a new type of classifier in this style, e.g. publishArtifact in CustomClassifier := true
, that takes the sources from a given directory, and would also depend on the compile phase.
From my research it seems that this is possible, but all I can find are snippets of code that I can't quite piece together. It'd be great to have one complete example.