I have a maven project that builds two jars as artifacts. The version number is 0.7 and one artifact is built the "default" way and the second has a classifier. As such, in my repository, they look like this:
Tue Jun 10 08:06:12 MST 2014 14915 gokenizer-0.7.pom
Tue Jun 10 08:06:12 MST 2014 40 gokenizer-0.7-core.jar.sha1
Tue Jun 10 08:06:12 MST 2014 40 gokenizer-0.7.pom.sha1
Tue Jun 10 08:06:12 MST 2014 32 gokenizer-0.7.jar.md5
Tue Jun 10 08:06:12 MST 2014 32 gokenizer-0.7.pom.md5
Tue Jun 10 08:06:12 MST 2014 37969843 gokenizer-0.7.jar
Tue Jun 10 08:06:12 MST 2014 41887392 gokenizer-0.7-core.jar
Tue Jun 10 08:06:12 MST 2014 32 gokenizer-0.7-core.jar.md5
Tue Jun 10 08:06:12 MST 2014 40 gokenizer-0.7.jar.sha1
As you can see, the jar with the classifier has "core" as its classifier.
The path to the repository is:
http://myhostname/plugin/repository/project/DomainIQCore/LastSuccessful/repository/com/example/domain/gokenizer/0.7/
All good? So how do I actually specify that I want the jar with the "core" classifier when building my project?
In my build.scala file, I tried this:
libraryDependencies ++= Seq(
"com.example.domain" % "gokenizer" % "0.7" % "core"
),
But then I get this error:
java.lang.IllegalArgumentException: Cannot add dependency 'com.example.domain#gokenizer;0.7' to configuration 'core' of module com.example#domainiq_2.10;0.1.0-SNAPSHOT because this configuration doesn't exist!
And when I try this:
libraryDependencies ++= Seq(
"com.example.domain" % "gokenizer" % "0.7-core"
),
It clearly builds the path to the repository wrong:
http://myhostname/plugin/repository/project/DomainIQCore/LastSuccessful/repository/com/example/domain/gokenizer/0.7-core/gokenizer-0.7-core.pom
I must obviously be doing something wrong. I thought the first way (with the 4th field as "core") was the way, but I have no idea what "because this configuration doesn't exist" means. Since it doesn't appear to even be trying to hit the repository, it seems that I have to tell SBT what "core" means? That doesn't make sense to me because I thought it was just part of the path, not a "configuration" as such.
When I remove the 4th field, it properly gets the non-classifier version of the jar, so I know the repository is there and working...
Help?