-
Notifications
You must be signed in to change notification settings - Fork 91
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
"hybrid" mode to inline some jars into thin jar #15
Comments
It's possible. Someone else asked about a "hybrid" mode where you could resolve jars from the archive if they were there (snapshot or not). Regarding snapshots specifically, I guess I disagree though, because the point of snapshots is that they change, so fixing the contents is kind of the wrong thing to do IMO. On the other hand I see no reason why you shouldn't be able to do it if you want to. |
hybrid mode is ok for me. :) |
Now I use maven shade plugin to add some jars, and I could add /BOOT-INF/lib/ into classloader by thin launcher?
|
I'm not really sure what the question is. This ticket is about a new feature that might take shape in the thin launcher. If you have an existing fat jar, you can launch it with one of the other launchers. |
Revisiting this a bit more - it would also be useful to have some sort of hybrid mechanism to inline local dependencies where the user has artifacts that are in the local Also, in continuous delivery it's common to never 'release' software. You're always using |
It's still not clear to me if, with the current spring-boot-thin-tools-converter, is possible to produce a "semi-fat" jar, where only some specific libraries are included in the jar while the others are resolved and downloaded from the repo. Could you help? |
This issue is still open. What's unclear about it? |
It's my fault. I didn't catch if the spring-boot-thin-tools-converter already covered this feature somehow. |
I would also be interested in hybrid mode. |
Do you plan to update? |
Upvote for this issue. The mentioned Currently I use this approach which is far from optimal:
Surely this is a far from optional approach. I did not know how to bundle jars inside the main jar and add them to the classpath. I'm not sure the BOOT-INF/lib folder works with the thin launcher? |
Unless I'm missing something you would have the last 3 steps even if And no, there is no |
@dsyer Thanks so much for the response. For clarity, I'm talking about the internal dependencies (modules) in a multi-module project. Those dependencies should preferable be bundled within the lib to ensure their version is pinned to the compiled version and not every team has an internal maven repository set up for this purpose. Obviously those dependencies are visible via the pom, because they are defined within the project. There is no way to exclude dependencies from the thin.properties file out of the box unless I'm mistaken? It would make a ton of sense in my opinion to build on the Jar loader of Spring to support this BOOT-INF model as it would solve all the issues I and others struggling with this feature have. Basically just appending the external dependencies that are not within the jar itself where the dependencies within the jar always take precedence. Also the resolver could/should exclude these dependencies. Solves all kind of issues with repository authentication etc (see the issue I created where I get 401 in case a thin.properties file is present for my Artifactory repository). Also in my opinion, (in general) if you can add items to the class path, it makes sense to give them precedence to be able to override the pom versions. You almost never want to do it the other way around? |
By the way, thanks a lot for this project as it was the only way to get around the 512 MB file size that AWS elastic beanstalk imposes. |
See the PR I just created: #207 |
if snapshot jars are not inlined into thin jar, the app could be different after startup because of snapshot jars changed in local maven repository. it's not good for integrated testing and deployment in testing environment. could thin launcher add a configuration to inline some jars?
The text was updated successfully, but these errors were encountered: