cancel
Showing results for 
Search instead for 
Did you mean: 

setting up SDK with Maven and Eclipse

mythox
Champ on-the-rise
Champ on-the-rise
Hi, following jeff's excellent tutorial i've a very well testing experience of the SDK on custom forms, workflow, etc…, but is it possible to integrate with my production tomcat instead of the embedded tomcat?  please share the detailed step if possible, thankyou. 
5 REPLIES 5

jpotts
World-Class Innovator
World-Class Innovator
Glad you liked the tutorial, thanks for reading.

Can you elaborate on what you want when you say integrate with your production server? For example, you can use alfresco:install to install an AMP into any Alfresco WAR, expanded or not. You don't have to do anything special to do that, just use the plugin. So, for example:
mvn alfresco:install -Dmaven.alfresco.warLocation=$TOMCAT_HOME/webapps/alfresco

Another thing you might want to do is run unit tests against a remote tomcat server. This is possible when you use something like JRebel. Gab gave a talk on this at Alfresco Summit, see http://summit.alfresco.com/boston/sessions/enabling-test-driven-rapid-dev-continuous-delivery-alfres....

So those are a couple of ideas. If you provide more specifics maybe someone else can weigh in on this as well.

Jeff

mythox
Champ on-the-rise
Champ on-the-rise
thankyou for your time to reply, seems i missed the most important part - i did not install alfresco.war as i thought the SDK itself can generate everything.  I misunderstood, thankyou. 

jpotts
World-Class Innovator
World-Class Innovator
When you run mvn install and you do not skip the tests it will download the WAR and run your unit tests by running Alfresco using the test configuration.

When you run mvn integration-test -Pamp-to-war it will download the WAR and install your AMP in it and then start up the server.

If you want to build your AMP and then run it in some other standalone Tomcat, then you can use the alfresco:install task. But the location you point it to will need to have the WAR already set up.

Jeff

avtor
Champ in-the-making
Champ in-the-making
Hi!
I want to return to this issue and to clarify whether there is an opportunity to do so:
run maven integration-test WITHOUT download war (using my local Alfresco server) install my AMP in it and than start up my local Alfresco server (not embedded)

My goal: to be able to debug/JUnit test my AMP-module using an existing (locally) Alfresco server, because it contains another AMP modules (runtime dependency are needed) and contains data in the repository, which I want to use to test my module.

I'm using:
Eclipse Kepler with JRebel
for
Alfresco Maven SDK project

avtor
Champ in-the-making
Champ in-the-making
I ask myself and answer myself:
1) do not use Maven to start debugging.
2) set up remote debugging on Tomсat (edit stl.sh )
<blockcode>
#   $TOMCAT_BINDIR/startup.sh
   $TOMCAT_BINDIR/catalina.sh jpda start
</blockcode>>
3) set up Tomcat for use JRebel agent (edit ctl.sh)
<blockcode>
   export JAVA_OPTS="-XX:MaxPermSize=256m -Xms2048m -Xmx2048m -XX:+DisableExplicitGC -Djava.awt.headless=true -Dalfresco.home=/home/av/alfresco-4.2.1 -Dcom.sun.management.jmxremote -Dsun.security.ssl.allowUnsafeRenegotiation=true -XX:ReservedCodeCacheSize=128m -javaagent:/home/av/alfresco_workspace/jrebel.jar"
</blockcode>
4) set up Eclipse for debugging remote server
Run->Debug Configurations…->Remote Java Applications
5) include in jrebel.xml in project classpath