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

Support multi-release JARs #10860

Merged
merged 2 commits into from
Jul 21, 2020
Merged

Support multi-release JARs #10860

merged 2 commits into from
Jul 21, 2020

Conversation

gastaldi
Copy link
Contributor

Fixes #10756

@boring-cyborg boring-cyborg bot added the area/devtools Issues/PR related to maven, gradle, platform and cli tooling/plugins label Jul 20, 2020
@gastaldi gastaldi requested a review from dmlloyd July 20, 2020 16:30
@gastaldi gastaldi added this to the 1.7.0 - master milestone Jul 20, 2020
@gastaldi gastaldi requested a review from jaikiran July 20, 2020 16:32
@gastaldi gastaldi added the triage/waiting-for-ci Ready to merge when CI successfully finishes label Jul 20, 2020
@gastaldi gastaldi marked this pull request as draft July 21, 2020 01:31
@gastaldi gastaldi marked this pull request as ready for review July 21, 2020 01:37
@gastaldi
Copy link
Contributor Author

Damn Windoze 😢. Something is locking the file and not closing it. Debugging again, but now in my Windows VM

@gastaldi gastaldi marked this pull request as draft July 21, 2020 03:17
@boring-cyborg boring-cyborg bot added area/dependencies Pull requests that update a dependency file area/infra-automation anything related to CI, bots, etc. that are used to automated our infrastructure labels Jul 21, 2020
@gastaldi gastaldi marked this pull request as ready for review July 21, 2020 04:10
@gastaldi gastaldi marked this pull request as draft July 21, 2020 04:20
@gastaldi gastaldi marked this pull request as ready for review July 21, 2020 04:56
@gastaldi
Copy link
Contributor Author

gastaldi commented Jul 21, 2020

The problem is with URL.openStream(). For some reason this locks the JAR file in Windows.
One way to fix that is to do:

            JarURLConnection urlConnection = (JarURLConnection) resource.openConnection();
            urlConnection.setUseCaches(false);
            try (InputStream is = urlConnection.getInputStream()) {
                IoUtils.copy(baos, is);
            }

But that's ridiculous, so I used cl.getResourceAsStream(..) instead

@jaikiran
Copy link
Member

From what I remember, @aloubyansky had fixed (or added some workaround for this) when he had run into this while working on packaging related changes. I don't remember what that fix/workaround was.

@aloubyansky
Copy link
Member

Right, avoid URL.openStream() for local paths.

@gastaldi gastaldi merged commit b41620b into quarkusio:master Jul 21, 2020
@gastaldi gastaldi deleted the smallrye_io branch July 21, 2020 11:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/dependencies Pull requests that update a dependency file area/devtools Issues/PR related to maven, gradle, platform and cli tooling/plugins area/infra-automation anything related to CI, bots, etc. that are used to automated our infrastructure triage/waiting-for-ci Ready to merge when CI successfully finishes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Quarkus classloader doesn't support multi-release jars
5 participants