cancel
Showing results for 
Search instead for 
Did you mean: 

AMP Development Environment

nyronian
Champ in-the-making
Champ in-the-making
I am developing an AMP in Eclips deploying to tomcat.  deployment/testing has proven to be quite the process.  I am looking for a better way to setup my environment.

Right now, I make code changes and run an ant script.  The ant script does the following:

1. shutsdown my tomcat server
2. builds my java code
3. integrates everything into the WAR (using your AMP deploy tool)
4. deletes the alfresco directory in webapps
5. copies the war over to the webapps directory (overwriting the old)
6. copies the "shared extension" files over
7. restarts tomcat

This process takes several minutes to complete…. Needless to say, it doesn't help my productivity and I have to work kinda old school of making as many changes as possible and then deploy and test each one, working many threads of issues at a time….  :shock:

It would be AWESOME if it could be integrated into Eclipse.  The problems I ran into (trying to let eclipse do integrated deploys) is…well…it didn't work Smiley Happy

The reason I delete the webapps/alfresco directory is that the AMP integration puts a later version of the jar in the war (with the new code).  When tomcat starts, it does not deploy the "new" jar into the webapps/alfresco deploment directory.  It doesn't recognise it changed.


Thanks for you help…
1 REPLY 1

gavinc
Champ in-the-making
Champ in-the-making
For testing purposes you could deploy to Tomcat using an 'exploded' approach. This basically means you don't need the WAR file which will save you time packaging it all up.

Follow these steps:

1. Stop Tomcat
2. Delete the war file from the webapps folder and delete the webapps/alfresco folder
3. Re-create the alfresco folder under webapps and extract the WAR file (without your AMP) into it
4. Change your build script to copy all the AMP files directly to the webapps/alfresco folder
5. Start Tomcat

This should save you a fair bit of time. Also using this approach it may be possible to get Eclipse to help but I'm not sure as I've never tried integrating Eclipse into the process.

Hope this helps.