Operating System : macos
Output of odo version : odo v0.0.14 (618c6d3)
When we create a component to push a binary file using this command odo create redhat-openjdk18-openshift:1.4 my-spring-boot --binary ./target/my-spring-boot-0.0.1-SNAPSHOT.jar and next we do a odo push, then the content of the target directory is pushed
Only the binary file should be uploaded within the /deployments directory of the dev's pod and not all the files of the target directory


I suspect that the issue is coming from the fact that the tar file which is created and uploaded includes all the files of the directory /opt/app-root/src and not the binary file

@cmoulliard I can confirm this issue exists even from the latest master.
Although the behavior is not correct (at least the way I see it), it does not cause a problem in most circumstances since the Java s2i image is still perfectly capable of running the jar in the /deployments directory.
This would cause a problem if multiple jars/wars were present in the same directory.
We should definitely look into fixing this based on your investigation, but I think we can live with it for the moment :)
@geoand I disagree. We need to change this so that push only pushes the binary that is provided. It affects speed and can potentially affect behavior if there are multiple jar files in the target folder.
@jorgemoralespou OK :)
I can work on this if you all agree :)
@geoand pick it up, man! :)
I am looking into this and although I have identified the problem I don't expect to have a fix anytime soon, basically because this is the first time that I am looking into go and kubernetes related IO code :)
I created a fix that I think works (tested it a few different scenarios and it works).
Please give it a try :)
Fixed in: 7379c138
Most helpful comment
@geoand pick it up, man! :)