cancel
Showing results for 
Search instead for 
Did you mean: 

Working effectivly with Alfresco

vbreivkk
Champ in-the-making
Champ in-the-making
Hello. We are in the starting phase of creating an applicaton which will use Alfresco as a repository. We need to create some new services and want to create java services.
Normally when developing we are using MyEclipse for the deployment and appserver plugin. There we deploy the webapp to a configured server and we can debug and hot deploy code as long we don't change the signature of the class.

In Alfresco things are a bit different. I now have a Tomcat server running the alfresco repository and a ant build script to build and deploy my services to it. The problem with this approach is:
- I have to restart Tomcat quite often and this takes time because it restarts the alfresco repository.
- Logs are printet to a file which I have to open in a seperate program
- To debug I must attach a remote debugger.

So instead of just hitting save and checking out my changes, I have change - test cycle that takes 4 minutes. It also involves several steps. I'm quite sure this is just ignorance, there is probably a much smarter way of working. I have heard that JRebel can help with server restarts, but the problem with logging, debugging, and running ant all the time still exists.

So any tips to improve the development environment would be greatly appreciated.

Best regards
4 REPLIES 4

vbreivkk
Champ in-the-making
Champ in-the-making
We are still having problems working effectively when creating java based Alfresco services.

We tried checking out community from svn and running it in MyEclipse, but it seems that we still need to use the ant scripts to deploy. Without them we had to modify the classpath quite heavily to get all dependencies working. Still we are not able to run Alfresco inside Eclipse.

So, we can still not debug without connecting remotely to the Tomcat server.
Changing some piece of code requires a trip to cmd, running an Ant script, restarting the server, reading some webcomics for a few minutes while things restart and then test the change.

This is not very effective and I know there has to be a better way. Normally we just edit code in MyEclipse, save and test(as long as the class signature has not changed). Then we have debugging with no hassle.

Regards

mrogers
Star Contributor
Star Contributor
Alfresco's unit tests run from within Eclipse.     I just add the shared folder to the classpath (to pull in the right alfresco config) and away it goes…

vbreivkk
Champ in-the-making
Champ in-the-making
Cool,

We don't have to deploy our custom java services and restart tomcat test  them? We can just test them using junit?

mrogers
Star Contributor
Star Contributor
Yes if you are running alfresco locally.