I have read Ivy to better understand SBT. However, one thing is puzzling me: in Ivy it is all about the configuration of a module that determines how to use or construct it. I was just wondering if the set of configuration are fixed in sbt
: Compile, test, run, provided(?), global(?), default(?)?
If it is possible to set a new one, how would you go about this?
What is the default configuration in which an artifact is published?
How can you set that the product artifact conf is other than the default one? How to remove the default one?
Is there a way to list the available configurations?
If it is possible to set new one, how would it be possible?
Yes. See define custom configuration in sbt.
What is the default configuration in which a artifact are published?
The main configuration that contains your src/main
code is called Compile
.
How can you set that the product artifact conf other than the default one? How to remove the default one?
You can control which configurations to include in publishing using publishArtifact
key. See Artifacts.
Is there a way to list the available configuration?
> show ivyConfigurations
[info] List(compile, runtime, test, provided, optional, compile-internal, runtime-internal, test-internal, plugin, sources, docs, pom, scala-tool)
See also Scopes for the explanation of scoping by configuration axis and Global
.