Hot deployment for Share webscript and Java based Webscript

cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Established Member

Hot deployment for Share webscript and Java based Webscript

Hello All,

I am using Alfresco All-In-One (alfresco-allinone-archetype) maven based project. I am using community version.

I would like to know how to make the project (using eclipse) Hot deployment. I have read the article - Rapid Application Development in Eclipse (Hot reloading) | Alfresco Documentation but I did not work for me. I don't know how to enable RAD in eclipse

Enabling Rapid Application Development (RAD) in Eclipse.

  1. This is enabled by default and there is no specific configuration needed. If you want to have more control over when web applications are refreshed, then see the last tutorial about Run Configurations.

Testing RAD when doing Repository customizations (alfresco.war).

Every time I have to stop the server and run the command .run/sh for a small change in webscript or ftl file. Because of this development is very slow.

Earlier I have worked on Separate AMPs and Even you can change directly in Webapps so Develpment was a little bit faster.

Help is much needed and appreciated. 

17 Replies
Highlighted
Established Member

Re: Hot deployment for Share webscript and Java based Webscript

Kindly guide me.. Development is very slow due to restart the server every time.

Highlighted
Senior Member II

Re: Hot deployment for Share webscript and Java based Webscript

Which SDK version you are using?

Highlighted
Established Member

Re: Hot deployment for Share webscript and Java based Webscript

Hello Krutik Jayswal


<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">

<.....

<description>Alfresco for SDK 3.0</description>
<packaging>pom</packaging>

<parent>
<groupId>com.xyz.alfresco</groupId>
<artifactId>alfresco-base</artifactId>
<version>3.0.2</version>
</parent>

<properties>
<alfresco.sdk.version>3.0.1</alfresco.sdk.version>

<alfresco.platform.version>5.2.f</alfresco.platform.version>
<alfresco.share.version>5.2.e</alfresco.share.version>

<maven.alfresco.edition>community</maven.alfresco.edition>

<alfresco.surf.version>6.11</alfresco.surf.version>

<jrebel.version>1.1.6</jrebel.version>

<!-- Compile with Java 7, default is 5 -->
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>

<alfresco.swedish.version>5.2.0-SNAPSHOT</alfresco.swedish.version>
<rl.alfresco-test.version>3.0.1</rl.alfresco-test.version>

</properties>

</project>

Highlighted
Senior Member II

Re: Hot deployment for Share webscript and Java based Webscript

You are referring SDK 2.2.0 documentation for hot deployment and the version which you are using is SDK 3.0.1.Please find below link for the details of configuring hot deployment in SDK 3.0.1

Using HotSwapAgent | Alfresco Documentation 

Highlighted
Established Member

Re: Hot deployment for Share webscript and Java based Webscript

Krutik Jayswal

I have done all the steps but at 10th steps, I am not getting info on the console which is mentioned in #10.

The environment variable 'MAVEN_OPTS' is not set, setting it for you
MAVEN_OPTS is set to '-Xms256m -Xmx2G -javaagent:/home/ratik/software/hotswap-agent.jar -XXaltjvm=dcevm'

missing info of HOTSWAP Agent
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO]

Other info:

ratik@ratik-aw-java:~/software$ java -version -XXaltjvm=dcevm
java version "1.8.0_144"
Java(TM) SE Runtime Environment (build 1.8.0_144-b01)
Dynamic Code Evolution 64-Bit Server VM (build 25.71-b01-dcevmlight-2, mixed mode)


ratik@ratik-aw-java:~/software$ java -version
java version "1.8.0_144"
Java(TM) SE Runtime Environment (build 1.8.0_144-b01)
Java HotSpot(TM) 64-Bit Server VM (build 25.144-b01, mixed mode)

Highlighted
Senior Member II

Re: Hot deployment for Share webscript and Java based Webscript

Seems like hot swap jar file is missing at location which you have specified..

Highlighted
Established Member

Re: Hot deployment for Share webscript and Java based Webscript

I have renamed the jar file and added the path in run.sh file

#!/bin/bash
if [[ -z ${MAVEN_OPTS} ]]; then
echo "The environment variable 'MAVEN_OPTS' is not set, setting it for you";
MAVEN_OPTS="-Xms256m -Xmx2G -javaagent:/home/ratik/software/hotswap-agent.jar -XXaltjvm=dcevm"
fi
echo "MAVEN_OPTS is set to '$MAVEN_OPTS'";
ulimit -n 65000
mvn clean install alfresco:run

Highlighted
Established Member

Re: Hot deployment for Share webscript and Java based Webscript

Krutik Jayswal

Is there any special configuration required for "hotswap-agent.properties" 

Create a hotswap-agent.properties file in the platform-jar project. In my test folder, It was not created automatically. 

Highlighted
Senior Member II

Re: Hot deployment for Share webscript and Java based Webscript

nothing special is there apart from documentation, Its working for me , so check all the steps carefully, you must be missing something.(With fresh mind Smiley Happy )