简体   繁体   中英

How to include version with sbt-native-packager publish?

I'm currently using sbt publish to publish the jar etc to a Nexus repo but I also want to include the zip . I've tried using sbt universal:publish from the sbt-native-packager and this is creating the zip and tgz that I want but is putting them in a different place to the output from sbt publish

The sbt publish command places the files in a PROJECT-NAME_2.11/PROJECT-NAME_2.11-999-SNAPSHOT.jar whereas sbt universal:publish puts them in PROJECT-NAME/PROJECT-NAME_2.11-999-SNAPSHOT.zip . There is no scala version which means they sit in different directories.

How can I get these two commands to create their respective file in the same directory? Or is there another command I can use to get the behaviour I want?

You could remove the scala version when you use sbt publish defining:

crossPaths := false

You can find more configuration examples in this link .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM