Publish the generated JAR file to Maven using SBT

I have a SBT project that creates a JAR file using some kind of external tool (everything works fine), i.e. does not compile source code. I configured Maven Repo correctly with the correct credentials, but I'm struggling to figure out how to configure the artifact so that it publishes the generated JAR file.

My JAR file is "target / my.jar".

I redefined the artifacts as follows:

override def artifacts = Set (Artifact ("my.jar", "jar", "jar"))

publishes the outputs of the following

Dependency configuration not found using default values. [info] :: publication :: org.foo # my-project_2.9.0

Can someone point me in the right direction with this neat tool?

Thank!

+3
source share
1 answer

You configured the publication as follows:

 override def managedStyle = ManagedStyle.Maven
 val publishTo = "My Repo" at "http://foo.bar/content/repositories/releases"

Then you run the publish action. You can also "publish local".

+1
source

All Articles