LAM is Liferay Automated Migrations, allowing for statement-based configuration across environments. Initially it's targeted towards development teams, but it's also definitely useful for functional/application administrators.
- Human readable syntax (Groovy DSL)
- Synthesized/combined API on top of Liferay's APIs (hiding clunky Expando, DDM*, addUser(44 args), etc...)
- Exception handling
- Sensible defaults (no need to fiddle with companyIds and groupIds if you've only got one site)
- Statements groupable / orderable in separate files
- State management (keeps track of scripts already executed on environment)
- Create a module within your project, give it a name you like, for example
com.acme.myproject-config
- Create a class like this:
@Component(immediate = true) public class SampleProjectConfig extends ProjectConfig { @Activate public void activate(BundleContext context) { super.doActivate(context); } @Reference protected void setExecutor(Executor executor) { this.executor = executor; } }
- Create configuration scripts in src/main/resources, named
*.groovy
, using the syntax - Deploy to Liferay runtime
See also the module nl.finalist.liferay.lam.sampleproject-config
, our flagship example config
- Expose more APIs
- Control panel portlets for:
- one-off script execution
- status display
- Clone this repo
- download eclipse neon with liferay plugin. Eg: https://sourceforge.net/projects/lportal/files/Liferay%20IDE/3.1.0%20B1/
- Import existing Gradle project, point to base directory of cloned Git repo
- Run 'gradle build'
- Run unit tests
- Deploy modules to Liferay to see it in action:
dslglue
,api
,statemgnt
, andsampleproject-config