Replies: 2 comments
-
@jiramares can you elaborate on the
Let's track this in #2034... it seems like a bug, although I'm not sure what is causing it.
Once again, let's try to figure out how to make
So... I'm not sure I understand correctly, but you'd like to be able to create a self-executable JAR which points to locally downloaded dependencies, rather than rely on Some (not necessarily pretty) workarounds that come to mind:
|
Beta Was this translation helpful? Give feedback.
-
I am sorry for so late reaction. First I would like to resolve dependencies via our local artifact repository and the server running this repository is not reachable from DMZ (there are our scripts deployed too). Manual copying all files in right directories to mimic downloading via I chose the workaround using ssh remote port forwarding. From computer that can reach DMZ via ssh a can communicate with artifact repository connect via ssh to server and port forward server local port to artifact repository. In Second comes
These problems has also workarounds:
But I don't see that as easy Therefore I asked to make another way to pre-package everything I need to run the script (ideally also built because concurrent build problem) and deploy it (not include the |
Beta Was this translation helpful? Give feedback.
-
Hi guys,
I have problem with using
*.sc
files withscala-cli
in corporate environment. First there is huge problem of coursier with repositories accessed via SSL with self signed certificates (it is nearly unusable). We cannot integrate our certificate into coursier anyway only via command line.But to be humble I doesn't want to scala-cli to resolve some dependencies everytime. I would like to set up the environment (whether manually or automatically via coursier and its machinery doesn't matter) and then use it.
Next comes building server that is not re-entrant so when run more scripts in one command (via pipe in shell) or when run concurrently from more shells we get sometimes strange behavior (as described in #2034). If I turn off using compile server (
--server=false
) everything works but it is terribly slow.So next iteration, make from
*.sc
file runnable jar (viapackage
sub-command). Yes, that is great and works ... but we are back with the coursier problem and self-signed certificate (the repository reference is hard coded into the jar someway). I can for each script make self-contained huge jar (I doesn't want to) or I have small jar with coursier inside and the problem with self-singed certificate.Is it possible to create runnable jar with external dependencies (copies to some directory and references in manifest inside jar) without coursier inside that can be copies (with its external dependencies) and works?
Thanks
PS. At the moment the cleanest solution I see is make
sbt
project, transform*.sc
files into*.scala
files with main method and create runnable jar on my own. Than copy the jar and its dependencies and use it.Jirka
Beta Was this translation helpful? Give feedback.
All reactions