public class LagomKeys
extends Object
It's important to understand the Maven classloader hierarchy. Each plugin in each project has its own classloader. This means, if the same plugin is used by two different projects, that same plugin will be loaded in two different classloaders, and so won't be able to share classes between the two instances of itself. So any state shared between projects must either be reflectively invoked (eg using structural typing) or must use JDK and/or core maven classes.
All that said, maven caches ClassLoaders, and if it's the same version of the plugin with same configured dependencies/extensions, and the project doesn't add any special extensions to the build, etc, then the same classloader will be used. This is the typical case, which means we don't have to worry about the performance implications of the Lagom plugin (as well as Scala) being loaded many times. But, it does mean we have to be careful not to share classes, because it usually will work, so it won't always be apparent that we're doing it wrong.
Constructor and Description |
---|
LagomKeys() |
Modifier and Type | Method and Description |
---|---|
static LagomKey<Object> |
LagomService()
Whether this project is a lagom service
|
static LagomKey<String> |
LagomServiceUrl()
The URL of the service
|
static LagomKey<Object> |
PlayService()
Whether this project is a Play service
|