Foros de discusión

[SOLVED] Diffs CSS not updating/compiling?

Janne Lepola, modificado hace 7 años.

[SOLVED] Diffs CSS not updating/compiling?

New Member Mensajes: 19 Fecha de incorporación: 28/02/17 Mensajes recientes
Hi,

I recently ran to a strange problem which I'm unable to solve. I'v maintained custom portlet-theme, which contains usual directory structure with /_diffs/css/*.css files.

Just while ago something happened and my previously working workspace stopped publishing changes made on _diffs. This seems to apply both JS and CSS files. Basically auto-publishing doesn't seem to work as it should. Usually it takes about 1- 2seconds for appropriate files (such as custom.css) to become updated and synced to tomcat.

I have checked portal-ext.properties, portal-developer.properties and portal-ide.properties, which all seem to be as required (no caching enabled, no fast-loads enabled etc.)

Additional details:
- When modifying /diffs/css/custom.css and saving (ctrl+s), tomcat displays "republishing" -status. Modified /_diffs/css/custom.css syncs into tomcat /diffs/css/custom.css as it should, but /css/custom.css is not updated neither in tomcat, nor in workspace.
- Redeploy doesn't seem to do compiling CSS to tomcat folders, but I guess really shouldn't anyway
- Triggering manually "Liferay -> Compile" works as it should. It runs builder for 10 seconds and compiles + syncs all the files.

I happened to have two separate workspaces (one for developement and one for maintenance) and strangely enough other one seems to work just fine, but I'm unable to pinpoint the problem.

I'm really out of ideas what could be the cause. I'm not seeings any errors on log when using manual compiler - auto-deploying just ain't precompiling, nor giving any visible errors.

Edit:

I checked working workspace for further information. Apparently Tomcat doesn't need to be started for Diffs to sync to end-user files, so this seems to be a IDE / workspace issue. Still, I haven't figured out what could be the cause.

Liferay 6.2 (ce-ga3),
Tomcat-7.0.42
Liferay IDE 2.2.4.201507230603-ga5
Eclipse Neon.2 Release (4.6.2)
Janne Lepola, modificado hace 7 años.

RE: Diffs CSS not updating/compiling? (Respuesta)

New Member Mensajes: 19 Fecha de incorporación: 28/02/17 Mensajes recientes
SOLUTION FOUND

For some reason my portlet theme ".settings" file had following content:


<!--?xml version="1.0" encoding="UTF-8"?-->
<projectdescription>
	<name>company-product-theme</name>
	<comment></comment>
	<projects>
	</projects>
	<buildspec>
		<buildcommand>
			<name>org.eclipse.jdt.core.javabuilder</name>
			<arguments>
			</arguments>
		</buildcommand>
		<buildcommand>
			<name>org.eclipse.wst.common.project.facet.core.builder</name>
			<arguments>
			</arguments>
		</buildcommand>
		<buildcommand>
			<name>org.eclipse.wst.validation.validationbuilder</name>
			<arguments>
			</arguments>
		</buildcommand>
	</buildspec>
	<natures>
		<nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
		<nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
		<nature>org.eclipse.wst.common.project.facet.core.nature</nature>
		<nature>org.eclipse.jdt.core.javanature</nature>
		<nature>org.eclipse.wst.jsdt.core.jsNature</nature>
	</natures>
</projectdescription>


While comparing with another workspace, this one seems to be missing following buildCommand:


		<buildcommand>
			<name>com.liferay.ide.eclipse.theme.core.cssBuilder</name>
			<arguments>
			</arguments>
		</buildcommand>


After adding this line, cssBuilder started to work right out of the box (no need for restarting or anything). I don't have any idea what could have removed this line from workspace. If I take this command-tag away and look at project preferences, "Builders" -tab doesn't show "Theme CSS Builder" -option at all. When lines are present, "Theme CSS Builder" -option is checked.