Foren

plugin SDK problem

thumbnail
Sorin Silaghi, geändert vor 16 Jahren.

plugin SDK problem

Junior Member Beiträge: 39 Beitrittsdatum: 10.09.07 Neueste Beiträge
Hello,

I am trying to build a theme using the plugin SDK and whenever I run ant deploy or ant war or ant all I get this error:

compile:
[copy] Copying 324 files to /media/BigDaddy/Projects/liferay/liferay-plugins-sdk-4.3.3/themes/codebeat-theme/docroot
[copy] Copying 8 files to /media/BigDaddy/Projects/liferay/liferay-plugins-sdk-4.3.3/themes/codebeat-theme/docroot
[copy] Copying 21 files to /media/BigDaddy/Projects/liferay/liferay-plugins-sdk-4.3.3/themes/codebeat-theme/docroot
[java] Exception in thread "main" java.lang.NoClassDefFoundError: com/liferay/portal/tools/CSSBuilder
[java] Java Result: 1
[java]
[java] [INFO] Using charset UTF-8
[java] java.io.FileNotFoundException: docroot/css/everything_unpacked.css (No such file or directory)
[java] at java.io.FileInputStream.open(Native Method)
[java] at java.io.FileInputStream.<init>(FileInputStream.java:106)
[java] at java.io.FileInputStream.<init>(FileInputStream.java:66)
[java] at com.yahoo.platform.yui.compressor.YUICompressor.main(YUICompressor.java:119)
[java] Java Result: 1


the war gets built ... but I was expecting for the liferay-look-and-feel.xml file to appear in WEB-INF .... instead the WEB-INF only contains liferay-plugin-package.properties...

my question is: is this normal ??? I tried to deploy the war using the admin portlet but I still had to edit liferay-plugin-package.properties to add the correct paths for the theme ...
thumbnail
Björn Ryding, geändert vor 16 Jahren.

RE: plugin SDK problem

Liferay Master Beiträge: 582 Beitrittsdatum: 16.05.07 Neueste Beiträge
In 4.3.3, the XML-files are replaced with a liferay-plugin-package.properties. You can still use the XML-files, but the new properties file is the default recommmeded way to configure your theme from 4.3.3 and onwards.
thumbnail
Sorin Silaghi, geändert vor 16 Jahren.

RE: plugin SDK problem

Junior Member Beiträge: 39 Beitrittsdatum: 10.09.07 Neueste Beiträge
ok .. good to know .... but there still is a problem:

If I take the war generated by the SDK and try to "install" it using the Admin portlet the theme doesn't work(I just get the default blue theme) ... if I look in /webapps/codebeat-theme/WEB-INF/ I can see both liferay-look-and-feel.xml and liferay-plugin-package.properties files... here are the two files:

name=Codebeat
module-group-id=liferay
module-incremental-version=1
tags=
short-description=
change-log=Adapted to the latest version of Liferay.
page-url=http://www.liferay.com/web/guest/downloads
author=Liferay, Inc.
licenses=MIT


<!--?xml version="1.0"?-->


<look-and-feel>
	<compatibility>
		<version>4.3.3+</version>
	</compatibility>
	<theme id="codebeat" name="Codebeat" />
	
	
</look-and-feel>


if I add
		<root-path>/</root-path>
		<templates-path>${root-path}/templates</templates-path>
		<images-path>${root-path}/images</images-path>
		<template-extension>vm</template-extension>
		<settings>
			<setting key="bullet-style-options" value="1,2" />
			<setting key="hello" value="world" />
			<setting key="hi" value="mom" />
		</settings>
		<roles>
			<role-name>User</role-name>
		</roles>
		<color-scheme id="01" name="Red">
			<css-class>red</css-class>
			<color-scheme-images-path>${images-path}/color_schemes/${css-class}</color-scheme-images-path>
		</color-scheme>


to the xml the theme works ...


so should I deploy the theme differently in the first place ? or an I doing something wrong altogether ?

ps: I am using Liferay version 4.3.3
Larry Rogers, geändert vor 16 Jahren.

RE: plugin SDK problem

New Member Beitrag: 1 Beitrittsdatum: 05.11.07 Neueste Beiträge
Sorin,

Are you able to deploy your custom developed themes normally now, or do you still have to edit the xml file?

I'm also getting the java.io.FileNotFoundException: docroot/css/everything_unpacked.css error when running ant deploy on my theme.

Larry
thumbnail
Sorin Silaghi, geändert vor 16 Jahren.

RE: plugin SDK problem

Junior Member Beiträge: 39 Beitrittsdatum: 10.09.07 Neueste Beiträge
nope ... nothing changed ... If I deploy a theme and then fix the liferay-look-and-feel.xml file ... I can then just copy that theme in my tomcat/webapps folder and it will be picked up by liferay without any other action being needed ... but other than that nothing..
thumbnail
Sorin Silaghi, geändert vor 16 Jahren.

RE: plugin SDK problem

Junior Member Beiträge: 39 Beitrittsdatum: 10.09.07 Neueste Beiträge
I recently tried the new version(4.3.4) for both liferay and the plugin SDK ... and I can now deploy my theme using the plugin portlet but the xml file problem persists ... The theme does not load properly until I fix it... Any ideas anybody ??????
thumbnail
Chris Chin, geändert vor 16 Jahren.

RE: plugin SDK problem

New Member Beitrag: 1 Beitrittsdatum: 12.12.07 Neueste Beiträge
I banged my head against this one for a long time as well.

The short answer is to make sure you specify the *plugin* hot deploy directory in the build.<name>.properties file - not the tomcat deploy directory.

The docs say to point auto.deploy.dir to the hot deploy directory. Being new to liferay, I assumed the hot deploy directory was the tomcat deploy directory (webapps). Its more confusing because the liferay-noir theme is installed there as well. So I went the route of adding the liferay-look-and-feel.xml as well as the web.xml using the liferay-noir theme as a pattern.

I finally figured out that the plugin hot deploy directory is defined in portal.properties by this entry:
# Set the directory to scan for layout templates, portlets, and themes to
# auto deploy.
#
auto.deploy.deploy.dir=${resource.repositories.root}/deploy

where resource.repositories.root evals to something like <your home dir>/liferay
Note: portal.properties may be packed in portal-impl.jar. Also, be aware that it may be overwritten by portal-ext.properties

Anyway, once I figured out the correct directory, it deployed fine with only the liferay-plugin-package.properties and no additional xml files.


--Chris
Nguyen Paul, geändert vor 14 Jahren.

RE: plugin SDK problem

New Member Beiträge: 16 Beitrittsdatum: 03.12.08 Neueste Beiträge
Great post
auto.deploy.deploy.dir=${resource.repositories.root}/deploy