Skip to content
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

Enable detect to support multiple jar files #132

Open
dmikusa opened this issue May 24, 2022 · 3 comments
Open

Enable detect to support multiple jar files #132

dmikusa opened this issue May 24, 2022 · 3 comments
Labels
type:enhancement A general enhancement

Comments

@dmikusa
Copy link
Contributor

dmikusa commented May 24, 2022

What happened?

The executable jar buildpack will detect if you either:

  1. Build from source code and the build output is either a single executable JAR or multiple files that only contain a single executable JAR
  2. Build with a pre-compiled asset that is a single executable JAR file

In some cases, you may want to compile locally but build an image from a directory or archive that is not an executable JAR. This is not presently possible because detect.go looks for /workspace/META-INF/MANIFEST.MF, which will only exist if the asset being provided to build is an executable JAR.

This enhancement request is to have detect also look at the present workspace and see if either a.) the workspace itself has a manifest or if b.) it can identify a single executable JAR file in the workspace.

@dmikusa dmikusa added the type:enhancement A general enhancement label May 24, 2022
@anthonydahanne
Copy link
Member

it's a duplicate of #206 , right? should we close it?

@dmikusa
Copy link
Contributor Author

dmikusa commented Dec 23, 2023

I don't think they are duplicates. #206 is a problem that occurs when you have an intended executable JAR but then one of the dependencies of that executable JAR is also executable. The buildpack may sometimes select the wrong JAR to execute. There's no way to tell the buildpack to pick a particular JAR, so that issue is to add a way to select the specific JAR to execute.

Presently, you can only hit the previous issue if you build from source. This one is to change detect so that you could build source code locally and package an image from say a directory of JAR files you built. There's probably not a huge need for this issue, #206 is definitely more important.

@c0d1ngm0nk3y
Copy link
Contributor

The executable jar buildpack will detect if you either:

...
Build with a pre-compiled asset that is a single executable JAR file

But that is not true, right? I see it as a bug in the detect logic. This is fixed by #265.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

3 participants