Saving points in an artifact name

I have a library that uses dots in the name of an artifact, for example, "org.scala-refactoring.library" . Defining a project name, for example:

 name := "org.scala-refactoring.library" 

When using publish-local it is converted to hyphens, so it becomes "org-scala-refactoring-library ".

How to save points in a published artifact?


This seems to be happening in publishing, not in packaging. For example, the following has no effect:

 artifactName := { (sv, module, artifact) => s"${name.value}_${sv.binary}-${module.revision}.${artifact.extension}" } 

He makes a package like

 target/scala-2.11.0-RC1/org.scala-refactoring.library_2.11.0-RC1-0.6.2-SNAPSHOT.jar 

But he still publishes

 ~/.ivy2/local/org.scala-refactoring/org-scala-refactoring-library_2.11.0-RC1/0.6.2-SNAPSHOT 
+6
source share
2 answers

You can override the behavior by explicitly defining moduleName , for example. eg:

 moduleName := name.value 
+1
source

This is similar to the behavior of Ivy. You can specify a custom ivy template for publication.

If you read about ivy patterns: http://ant.apache.org/ivy/history/latest-milestone/concept.html Here you can see the [originalname] option, which can do what you need. My hunch [artifact] (what sbt is currently using) may slip away from things.

+1
source

All Articles