201408 - alfresco tech talk live - maven sdk 2.0
DESCRIPTION
Rapid Alfresco Development with the Maven Alfresco SDK, with no web application reloading!TRANSCRIPT
(Maven) Alfresco SDK 2.0#noreload -> #nohassle
Gabriele ColumbroOle Hejlskov
Objectives
State of the (Maven) nation A sneak peek on the (Maven)
Alfresco SDK 2.0! Demo Q/A
Disclaimer!
2.0.0-SNAPSHOT is a SNAPSHOT version! Active development undergoing! YMMV (Your Mileage May Vary) MMMV (MY Mileage May Vary) :) 2.0.0-Beta-1 out later this week!
State of the (Maven) nation Alfresco Build FULLY Mavenized!
Community 5.0.a out and release with Maven (Kudos to Sam!)
https://issues.alfresco.com/jira/browse/BDE-32 closed after 8 years! No more config artifacts Real POMs coming from a releases build Surf back home :)
(Maven) Alfresco SDK Migrated to Github at https://github.com/Alfresco/alfresco-sdk/
Huge community momentum (Kudos to Ole & Mao!) Major developer ergonomics improvements with 2.x (Old Java / Eclipse) SDK superceded and about to be EOL’d Call it Alfresco SDK from now on!
The (Maven) Alfresco SDK 2.x Target release: Summit 2014 Achievements (already in the latest
SNAPSHOT): Migration to Github —> Improved visibility.
Fork us! Added Share archetype MAJOR rapid application development
features (hot code reloading) using spring-loaded (free!)
Seamless IDE integration with Eclipse / IDEA Zero reloading development! Remote Junit ported to the new approach
The (Maven) Alfresco SDK 2.x Additional key features (still to be added):
Must: Availability on Maven Central! Must: Integration of the Alfresco Technical
Validation Tool Must: Alignment with samples at
https://github.com/Alfresco/alfresco-sdk-samples/
Should: RM rapid dev archetypes Should: Community & Enterprise profiles Should: General bugfixing (see filter) Could: Mock webscript testing integration Could: Use of a webscript instead of embedded
Jetty for remote Junit running
Sure, but what changes? Really very little, from a user standpoint Key profiles are kept for backwards
compatibility On AMP projects: -Pamp-to-war On AIO (TBC) projects: -Prun
JRebel (deprecated) support incapsulated in an optional (non supported) profile -Pjrebel
Is this reloading really hot? I will let you judge about that :) Currently hot reloading (with no long webapp context
reload): Java Classes Test classes (for remote Junit running) Webscripts (Java, Javascripts, FTL) Web Resources (JS, CSS, JSP, etc.) Classpath config files
What is NOT reloaded: Spring Context (need restart upon Spring
config changes)
Demo Repo Rapid Repository AMP Development On Eclipse Luna Pre-requisites:
Maven 3.2.2 Eclipse Luna latest build
Story board: Create empty AMP Show testing Add webscript / modify it Profit :)
Command line:
MAVEN_OPTS="-Xms1024m -Xmx2048m -XX:PermSize=1024m -javagent:/Users/gabrielecolumbro/Downloads/springloaded-1.2.0.RELEASE.jar -noverify" mvn clean install -Pamp-to-war
How did we achieve that? A magic combo of:
spring-loaded (library for classpath resources reloading)
Tomcat7 context.xml configuration and virtualWebapp features
Advantages? IDE independent Free Wait time for class changes … 0s! Just refresh! Wait time for running tests … 0s! No app
context startup time with remote Junit running!
Demo Share Rapid Share AMP Development On IDEA Pre-requisites:
Maven 3.2.2 IDEA ???
Story board: Create empty AMP Show how to connect to repo running
(alf.repo.url) Show Aikau example Add webscript / modify it Profit :)
Resources Project: https://github.com/Alfresco/alfresco-sdk/ Issues: https://github.com/Alfresco/alfresco-sdk/issues Mailing list:
https://groups.google.com/forum/#!forum/maven-alfresco Download spring-loaded from
http://search.maven.org/remotecontent?filepath=org/springframework/springloaded/1.2.0.RELEASE/springloaded-1.2.0.RELEASE.jar
To have the demo’ed features, use the latest 2.0.0-SNAPSHOT SDK from:
mvn archetype:generate -DarchetypeCatalog=https://artifacts.alfresco.com/nexus/content/repositories/public-snapshots/archetype-catalog.xml
Q/A
Thanks!