-
Notifications
You must be signed in to change notification settings - Fork 443
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Renaming compiled artifact in package (feature) #864
Comments
Hi, I think I misunderstood your question. Your application jar is named How the names are generated for the jars in the Please check your The original purpose of this ticket would be to implement a small helper to rename artifacts and add this feature to the MappingHelpers |
Yes, I have default sbt config w/o any maven setting specified. This is why organization defaults to |
I'd like to reactivate this conversation by adding a concrete usecase (i.e. rename/ move ./lib/com.mycompany.myproject.myjarname-1.2.3-SNAPSHOT-assembly.jar -> ./myjarname.jar) |
After 4 years have passed I'm not entirely sure if this is a good idea. All scripts assume that the jars are placed in a folder @normana400 from your example I assume you are using sbt-native-packager and sbt-assembly together. These plugins can be used together, but actually they are solving the same issue, but in different ways. Namely: "packaging a deployable artifact". sbt-assembly builds a fat-jar, while native-packager builds a distribution in various formats (docker, zip, rpm, ... ). Depending on the use case you choose one or the other. Why do you combine both? I'm curious 😄 |
I don't use sbt-assembly and native-packager together per se. Assembly is used in upstream projects to create individual service uber jars. The sbt-native-packager is used in a downstream project as a single zip of all these uber jars. This give operations has a "single zip of everything that needs to be deployed in a release cycle" and they use that single zip as a convenient package that they do all their deployments from. So in this case with the downstream "bundler" project, it references the artifacted assembly jars built from the upstream service projects as dependencies. The "bundler" just zips those uber jars up as a zip file (using the native-packager) with the uber jars inside. Since the uber jars are dependencies, they are getting placed in a /lib directory. I was trying to see if I could configure the native-packager to package them so they are in the root directory. Extra credit if I can also rename the uber jars themselves as well. This removes the need for logic in downstream operation scripts that would need to do this. |
By default compiled jar from Compile scope with name XXX.jar got renamed to lib/default.XXX.jar in Universal package scope. Would be great to have a feature which will allow to customize the naming of artifact(s) in final package.
artifactName in Universal ...
renames whole zip and doesn't customizes jar naming.Currently there is a workaround where each artifact in final package can be customized, i.e. :
I hadn't found in repo where 'default' prefix is added to binary, I will be pleased if someone could point to this place.
As @muuki88 said in mailing list thread, there may be a helper method implementation for renaming mappings.
The text was updated successfully, but these errors were encountered: