Foros de discusión

Developing Liferay Theme with JRebel Autodeploy

Gilad Reich, modificado hace 7 años.

Developing Liferay Theme with JRebel Autodeploy

New Member Mensajes: 10 Fecha de incorporación: 21/07/16 Mensajes recientes
Hey everyone,
I know this question might more belongs to JRebel forums, but I think this might be also a good place to write this.
I've been using JRebel in my working environment for getting the auto deployment functionality.
Seems as it works perfectly with picking up JavaScript, templates and most of the files except of CSS files.
In order to get the changes on the theme, i need to re-build and re-deploy the theme which is of course time consuming and not so joy-able testing changes in live.
I created a rebel.xml in src->main->resource with this configuration:
<!--?xml version="1.0" encoding="UTF-8"?-->
<application generated-by="intellij" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.zeroturnaround.com" xsi:schemalocation="http://www.zeroturnaround.com http://update.zeroturnaround.com/jrebel/rebel-2_1.xsd">

	<classpath>
		<dir name="/Users/user/Workspaces/my-theme/target/classes">
		</dir>
	</classpath>

	<web>
		<link target="/">
			<dir name="/Users/user/Workspaces/my-theme/src/main/webapp">
				<exclude name="/" />
			</dir>
		
	</web>

</application>


Inserted into tomcat environment variables(bin/setenv.sh):
-javaagent:/Users/user/Library/Application\ Support/IntelliJIdea2016.2/jr-ide-idea/lib/jrebel/jrebel.jar
CATALINA_OPTS="$CATALINA_OPTS -Dfile.encoding=UTF8 -Djava.net.preferIPv4Stack=true -Dorg.apache.catalina.loader.WebappClassLoader.ENABLE_CLEAR_REFERENCES=false -Duser.timezone=GMT -Xmx2048m -XX:MaxPermSize=512m -javaagent:/Users/user/Library/Application\ Support/IntelliJIdea2016.2/jr-ide-idea/lib/jrebel/jrebel.jar"

And tomcat server location configured within the IDEA.

And that's pretty much it for the configuration part. I'm definitely more happy using JRebel rather than gulp, since it's inserting the modified classes on the fly as soon as i refresh the page.
Would be happy to hear some opinions about it, even if you don't use it, what might cause it not to picking up the changes of the CSS files?

My working environment:
* OS X
* Maven Project
* IntelliJ Ultime 16.2
* Liferay 6.1 (Haven't tested it on 7 yet, but i guess it would do the same since the concept is the same)

Best regards,
Gilad
thumbnail
Jack Bakker, modificado hace 7 años.

RE: Developing Liferay Theme with JRebel Autodeploy

Liferay Master Mensajes: 978 Fecha de incorporación: 3/01/10 Mensajes recientes
I use IntelliJ IDEA, JRebel, and have been developing using Liferay since v5.2.3 where while I still have to maintain straggler installs of 5.2.3, 6.0,and 6.1 ; my core clients use v6.2 EE where I am learning v7 to get ready for upgrades to and new projects in DXP.

JRebel is great for Java code, but I've never got it to work for theme css where sass compilation is needed... though I haven't tried that hard to figure it out, and I'm not sure how/if such would work with JRebel either. I guess that is what you are wondering...

For v7 I'm on to using 'gulp watch' which is awesome for speeding up theme dev (which often dovetails content dev). As a side note, I haven't tried to figure out how to use JRebel with OSGi.

All that to say, I can't help you, though will be watching this thread in case there are any JRebel gurus out there with something useful to add.