cancel
Showing results for 
Search instead for 
Did you mean: 

RAD with Maven

tonyrivet
Champ in-the-making
Champ in-the-making
Hi,

I am a newbie in the wonderful world of Maven. I was realy amazed by the Gab Columbro presentation at Barcelona Summit, so I decided to get into it, but I have to say I am a little disapointed now.

I tested both AMP and All-In-One archetypes, and read all tutorials I could find, but I encountered some backwards. Here are my questions :
<ul>
<li>With the All-In-One archetype, I am not able to deploy the customizations I make in the AMP project. These are well deployed in the alfresco/target repository but not in the runner/target repository. Is there any configuration to add to do so ?</li>

<li>What is the best way to create an environment for both Alfresco and Share development ?
The All-In-One archetype could be used but it is very long to run. WARs generation and deployement + Tomcat loading can take 6 or 7 minutes…
I also found a great <a href="http://blog.productivist.com/setting-up-a-dual-amp-maven-project/">blog post</a> that explains how to set a dual AMP Maven project, but it works whis jetty and I have not managed to do the same with Tomcat embedded which comes with the latest Maven Alfresco SDK release. Moreover, it implies to run two different Tomcat instances which could be a problem on small machine configurations…</li>

<li>Do I have to re-install modules and reload Tomcat each time I make a change in my source code, even for Share Web Resources ? Tomcat reloads are a real pain (I saw the capabilities of JRebel plugin, but can't afford it at the time) so it was convenient, at least, to be able to make changes in Share without restarting Tomcat all the time…</li>
</ul>
I think these questions are more of my lack of knowledge about the Maven environment than real Maven limitations. I am aware of the main assets of a Maven environment (dependencies management, continuous testing and delivery, clean Eclipse project…), and with my problems resolved it could make a real powerful tool for rapid development.

I'll appreciate any response on these points or any advice on best practices for developing with Maven.
Thanks !
2 REPLIES 2

radder5
Champ in-the-making
Champ in-the-making
Hi, from one newbie to another…
I don't kmow if you have got any further with this but I have had similar issues to what you describe but am getting some good results now.
I tried the All-in-One archetype first but experienced similar slow startup times etc. so now have created two projects from the Amp archetype, one for repository and one for share.
Running mvn integration-test -Pamp-to-war for repo project and mvn integration-test -Pamp-to-war -Dalfresco.client.war=share for share. This starts up in a minute or so (but the repo project takes a couple of mins)
There are a couple of configurations you need to add to your pom to configure tomcat ports - for repository pom

<maven.tomcat.host>localhost</maven.tomcat.host>
<maven.tomcat.port>8580</maven.tomcat.port>

and for share pom

        <maven.tomcat.host>localhost</maven.tomcat.host>
   <maven.tomcat.port>8581</maven.tomcat.port>
   <alfresco.maven.tomcat.host>localhost</alfresco.maven.tomcat.host>
   <alfresco.maven.tomcat.port>8580</alfresco.maven.tomcat.port>

and you also need to configure share-custom-context.xml in your share pom to point to your repository tomcat.

If you have any more specific questions then ask and I'll see if I can help - even though I am not expert.
Conrad

tonyrivet
Champ in-the-making
Champ in-the-making
Hi Conrad, and thanks for your reply !
I'll test the configuration you mentioned and give you a feedback here.

Another more specific question could be about the Share Web resources deployment : can you confirm you have to restart the Share Tomcat instance each time you make a change in a JS or CSS file ? Is there a way to deploy these resources directly, without rebuilding and redeploying the Share AMP ?