Foren

purpose of goal build-css in portlet pom.xml

Eric Soucy, geändert vor 10 Jahren.

purpose of goal build-css in portlet pom.xml

Junior Member Beiträge: 65 Beitrittsdatum: 21.01.14 Neueste Beiträge
Hello,
what is the purpose of the build-css goal in a portlet project ?
Is it mandatory? if so what are it's dependencies?
Also when i leave it on, it takes a lot of time to execute when I do a mvn clean package
I'm trying to create a bare bones minimum jsf portlet and I removed the dependencies to portal-service and util-java

<execution>
<phase>generate-sources</phase>
<goals>
<goal>build-css</goal>
</goals>
</execution>

Thanks!
thumbnail
Vernon Singleton, geändert vor 10 Jahren.

RE: purpose of goal build-css in portlet pom.xml

Expert Beiträge: 315 Beitrittsdatum: 14.01.13 Neueste Beiträge
Eric Soucy:
what is the purpose of the build-css goal in a portlet project ?

I am only aware of it being needed for themes.

Eric Soucy:
Is it mandatory?

It is not mandatory for portlets.

Eric Soucy:
if so what are it's dependencies?

I have not memorized its dependecies (Thank you, Maven).

Eric Soucy:
Also when i leave it on, it takes a lot of time to execute when I do a mvn clean package I'm trying to create a bare bones minimum jsf portlet and I removed the dependencies to portal-service and util-java

I don't recommend that you require the build-css goal for your portlets. Instead, just use one of the maven archetypes that are available for Liferay JSF portlets:

liferay-portlet-jsf-archetype
liferay-portlet-liferay-faces-alloy-archetype
liferay-portlet-icefaces-archetype
liferay-portlet-primefaces-archetype
liferay-portlet-richfaces-archetype

Personally, I recommend the liferay-portlet-liferay-faces-alloy-archetype because all of the newest goodies are going to be available to this one. As stated in that link, "The Liferay Faces team is hard at work developing JSF components and a Showcase for AlloyUI 2.0. Stay tuned!"

You can also check out this tutorial over here showing how to use our archetypes.

Hope that helps,
Vernon

.
thumbnail
Mika Koivisto, geändert vor 10 Jahren.

RE: purpose of goal build-css in portlet pom.xml

Liferay Legend Beiträge: 1519 Beitrittsdatum: 07.08.06 Neueste Beiträge
build-css does the Sass to CSS conversion. Many portlets have a portlet specific css file which may have used SASS. It's the same way in Ant based Plugins SDK and that's why it was added to the portlet maven archetype.
thumbnail
Neil Griffin, geändert vor 10 Jahren.

RE: purpose of goal build-css in portlet pom.xml

Liferay Legend Beiträge: 2655 Beitrittsdatum: 27.07.05 Neueste Beiträge
The build-css goal was added to the portlet archtypes in MAVEN-91. I think that it can be safely removed by the developer if the portlet does not utilize the <header-portlet-css> feature of the WEB-INF/liferay-portlet.xml descriptor.