Best way to do rapid application development using the Alfresco maven archetypes?

130 views
Skip to first unread message

Bindu Wavell

unread,
Mar 6, 2013, 9:50:35 PM3/6/13
to maven-a...@googlegroups.com
While it is super easy to use either of the provided archetypes to create a project that can be built and run from the command line. And with a little tuning it's even pretty easy to do this with the enterprise stack. Using the maven command line tools for build run/test cycles is quite slow. This appears to be due to the tools pulling war files, exploding them, overlaying them, re-packaging them back as wars then passing these wars to jetty which unwars them again.

I have discovered that it is possible to:

mvn install the amp modules
mvn war:exploded the war projects

With a sprinkling of mvn resources:resources interspersed to get property files deployed etc.

Has anyone documented a good/quick process for doing development with these archetypes?

Ideally this process would utilize IntelliJ or Eclipse (I'd like to be able to use either.)

Many thanks in advance!


-- Bindu

Gabriele Columbro

unread,
Mar 18, 2013, 6:44:21 AM3/18/13
to maven-a...@googlegroups.com
So, provided that adding hot redeployment features (jetty:run or some Jrebel like solutions) is on the roadmap, for now I think that to make the best out of what we have a couple of options are possible:

Using 2 AMPs archetypes:

1. Use the AMP archetype to create a repo AMP
2. Use the AMP archetype to create a share AMP (set alfresco.client.war=share)
3. Configure the share AMP to run on port 8081
4. Run each of them in separate shells with mvn clean integration-test -Pamp-to-war
5. When changing Share AMP, only restart the share AMP
6. When changing Alfresco AMP, well restart the repo even though that can be slow

Speeding up the all-in-one:

1. Run 'mvn clean install' once from the root (all apps get built)
2. Go into the runner folder
3. 'mvn integration-test -Prun' from that folder will only run the apps, not build them
4. While developing, rebuild only the WAR you need and repeat step 3

Said that, I noticed the most time is spent in WAR overlays, which are especially slow on the my Mac because of lots of chmod / chown operations (probably preserving WAR contained files permissions while unpacking). I'll look to speed up this, hopefully there is some archiver/war-plugin options I can use.

Sorry again for the late answer, hope this helps still.

Gab



-- Bindu

--
You received this message because you are subscribed to the Google Groups "Maven Alfresco Lifecycle Discussion Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to maven-alfresc...@googlegroups.com.
To post to this group, send email to maven-a...@googlegroups.com.
Visit this group at http://groups.google.com/group/maven-alfresco?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 



--
Gabriele Columbro
Principal Architect, Consulting Services
Alfresco Software
twitter: @mindthegabz
blog: http://mindthegab.com
mobile: +31627565013

Bindu Wavell

unread,
Mar 23, 2013, 3:53:16 PM3/23/13
to maven-a...@googlegroups.com
This info is very helpful, thanks! 

Having said that, I was hoping to define a process for working with these archetypes in Eclipse and ideally IntelliJ in a way that allows for quick turnaround on getting changes running in alfresco/share. 

For what it's worth it's pretty important to us that we can do this sort of deveopment/testing with Tomcat rather than jetty. The main reason being that is the app server we mostly deploy to for customers, and also I believe the ONLY supported app server for the SOLR version used in alfresco at this time?

I will see if I can use the information you've provided here to get the projects usable in these IDEs.

Any additional thoughts folks have on this wold be greatly appreciated.


-- Bindu
Reply all
Reply to author
Forward
0 new messages