flatpak-github-actions icon indicating copy to clipboard operation
flatpak-github-actions copied to clipboard

Possible to specify working dir?

Open plata opened this issue 5 years ago • 10 comments

We're packaging a java application. To do so, we first build it with maven and then use the generated .jar files to build the flatpak. The manifest is located in a subdirectory and must be executed from there to find the maven output. Is this possible?

plata avatar Jan 30 '21 12:01 plata

It should be possible yes, not sure why you need to specify the working dir for it to work?

bilelmoussaoui avatar Jan 30 '21 12:01 bilelmoussaoui

The problem is this: https://github.com/PhoenicisOrg/phoenicis/blob/8befcc028d1e1392f906959521d851c51e6f85b5/phoenicis-dist/src/flatpak/org.phoenicis.playonlinux.yml#L111

plata avatar Jan 30 '21 13:01 plata

It should be just path: target/phoenicis-flatpak.zip ? also, why not build the java application inside the flatpak sandbox? because the application is built on cwd = the git repo we cloned.

bilelmoussaoui avatar Jan 30 '21 13:01 bilelmoussaoui

It should be just path: target/phoenicis-flatpak.zip

Ok, I could change the path such that everything is relative to the project root dir. Currently, it's not like that because we have all our packaging in that submodule. So I would prefer to change the working directory.

why not build the java application inside the flatpak sandbox

Currently, you cannot build with Maven inside the flatpak. There's an open GitHub issue regarding this.

plata avatar Jan 30 '21 14:01 plata

It should be just path: target/phoenicis-flatpak.zip

Ok, I could change the path such that everything is relative to the project root dir. Currently, it's not like that because we have all our packaging in that submodule. So I would prefer to change the working directory.

why not build the java application inside the flatpak sandbox

Currently, you cannot build with Maven inside the flatpak. There's an open GitHub issue regarding this.

You can use a simple buildsystem and add whatever commands you're using to build the .jar there, can't that work? at least for the CI, as you can have network access at build time if you want to :)

bilelmoussaoui avatar Jan 30 '21 14:01 bilelmoussaoui

You can use a simple buildsystem and add whatever commands you're using to build the .jar there, can't that work?

As long as I'm outside the flatpak environment, yes.

plata avatar Jan 30 '21 18:01 plata

You can use a simple buildsystem and add whatever commands you're using to build the .jar there, can't that work?

As long as I'm outside the flatpak environment, yes.

What are the differences?

bilelmoussaoui avatar Jan 30 '21 18:01 bilelmoussaoui

see https://github.com/flatpak/flatpak-builder/issues/58

plata avatar Jan 30 '21 20:01 plata

Sure, I precisely mentioned using a "simple" buildsystem, which allows you to type whatever shell commands you want to execute. The maven build system support would allow you to set buildsystem to "maven" and flatpak-builder will figure out the rest for you.

bilelmoussaoui avatar Jan 30 '21 20:01 bilelmoussaoui

I see. The project requires Maven, so I don't think that's a practical approach for me.

plata avatar Jan 30 '21 23:01 plata