A pom. It does this by calling out to the maven plugin and the dependency management plugin; the maven plugin is always present, and the dependency management plugin is present if you are using the Spring Boot plugin. To generate a pom. NOTE: Gradle has a new maven-publish plugin that works with the new "standard" configurations e. It doesn't work with the thin launcher plugin yet. You can configure the output directory by setting the "output" property of the "thinPom" task.
You can customize the generated pom. Example which just duplicates the default :. Instead of or as well as a pom. By default it shows up in META-INF in the built resources, so you need to run it before the jar is built, either manually, or via a task dependency, e.
The generated properties file is "computed" it contains all the transitive dependencies , so if you have that, the dependencies from the pom. If you look at the jar file produced by the build you will see that it is "thin" a few KB , but executable with java -jar Inspect the app jar that you built or one of the samples in this project and notice that it is only a few KB.
It is just a regular jar file with the app classes in it and one or two extra features. The things it needs to operate are:. When the app runs the main method per the manifest is the ThinJarWrapper. Its job is to locate another jar file the "launcher". The wrapper downloads the launcher if it needs to , or else uses the cached version in your local Maven repository. The launcher then takes over and reads the pom. It then runs the application's own main method with that class loader.
The pom. The app jar in the demo is built using the Spring Boot plugin and a custom Layout so it only builds with Spring Boot 1. All jar files are cached in the local Maven repository, so if you are building and running the same app repeatedly, it should be faster after the first time, or if the local repo is already warm.
The local repository can be re-located by setting a System property "thin. For example to use the current directory:. You can also do a "dry run", just to warm up the cache and not run the app, by setting a System property or command line argument "thin. This is a useful trick for laying down a file system layer in a container image, for example. The command line options are removed before passing down to the Boot app.
What are thick and thin entries? | ICANN WHOIS
The ThinJarWrapper also accepts system properties, environment variables or command line flags for its smaller set of optional arguments. In addition to the Spring Boot layout there is an optional Maven plugin which can be used to do the dry run download and cache the dependencies for the current project, or for any project that has an executable thin jar in the same format. The "app" sample in this repo declares this plugin and inserts it into the "package" lifecycle:.
The "simple" sample has the same feature, but it also downloads and warms up the cache for the "app" sample, so you could use the same build to run both apps if you felt like it. The Maven plugin also has a properties mojo, so you can create or update thin. By default it creates a thin. By default the thin. The plugin creates 2 tasks for every jar task in the project, one that reolves the dependencies, and one that copies the jar into the same location to make it easy to launch.
A "dry run" can be executed in Gradle by calling the "thinResolve" task defined by the plugin, e. If your jar task is not called "jar", then the names are appended with the jar task name capitalized , e. If you have multiple jar tasks in the project, then each one has its own resolve tasks.
- 40 Short Hairstyle Ideas for Thin, Fine Hair.
- THIN | meaning in the Cambridge English Dictionary.
- Explore journal content.
- Howard University 2012.
- The Power of One Entrepreneur: Melony Armstrong- African Hairbraider.
The thin launcher 1. As of version v4. You can also save the staging cost, and resolve the dependencies locally before you push the app. Note the use of a subdirectory. The Maven plugin has a "resolve" task with a flag unpack or -Dthin. The unpack flag is false by default, so remember to set it if you want to use Maven to prepare the push.
Pretend You're Thin
You can set a variety of options on the command line or with system properties -D The thin. Any other thin. The default behaviour of the ThinJarWrapper is to locate and launch the ThinJarLauncher , but it can also run any main class you like by using the thin. One of the main reasons to provide this feature is to be able to support "tools" that process the application jar or whatever , for example to generate metadata, create file system layers, etc.
To create a new tool, make an executable jar it can even be thin with a Main-Class in its manifest, and point to it with thin. The launched main class will find the same command line as the launched jar, but with --thin. It will also find a system property thin. If the tool jar is thin, i. An example of a tool jar is the spring-boot-thin-tools-converter see below. You could use that as a prototype if you wanted to create your own.
The step to add a thin. You can change the runtime dependencies, by changing the thin. You can also read a local thin. There is also a thin. Profile-specific properties are loaded last so they take precedence. Example to pick up an extra set of dependencies in thin-rabbit. Profile-specific thin. NOTE: You can add or override thin. If your main pom or properties file uses boms to manage dependency versions, you can change the version of the bom using thin. If your main pom uses properties to manage dependencies e.
You can exclude and remove dependencies by prepending a key in the properties file with exclusions. There is a converter tool that you can use as a library in place of the launcher.
It works by copying all of the libraries from a thin. The launcher has some optional arguments that result in classpath computations, instead of running the Boot app. So this is a way to run the app from its main method which is faster than using the launcher :. You can also specify a "parent" archive which is used to calculate a prefix for the classpath. Two apps that share a parent then have the same prefix, and can share classes using -Xshare:on. For example:. The thin launcher can be used to pre-compute its own dependency graph in the form of a properties file, which also speeds up the launch a bit, even if you still have to resolve all the jars remotely or from the cache.
To compute the dependency graph and output the result in the form of a properties file, just use the thin. In this example the second startup will be slightly faster, depending on the size of the classpath, but up to a few hundred milliseconds on afast server, and more in a constrained environment.