0
votes

I am trying to migrate a theme from the plugins sdk to workspace.

The steps I actually did:

1- I installed BLADE CLI on my windows 7 operating system. I followed this link: INSTALLING BLADE CLI.

2- Then in the gradle.properties file under the liferay-workspace, I uncomment this line:

liferay.workspace.plugins.sdk.dir=plugins-sdk

and I created a directory plugins-sdk under the liferay-workspace and I put my project theme in it.

3- I checked the BLADE CLII if it works:

C:\Users\User1\liferay-workspace>blade version

C:\Users\User1\liferay-workspace>2.2.0.201707061805

4- Then, I tried to migrate the theme from the plugins sdk to workspace using this command blade convert --themebuilder nameThemeProject.

I typed the command and nothing happens.

The structure of the theme project:

theme structure

I followed this link: plugins-sdk-to-workspace.

Before trying to migrate the theme from the plugins sdk to workspace:

I tried to create a new gradle Theme project and then paste the contents of the old theme project into the new theme project.

This is what I did:

1- I created a new project File -> new -> Liferay Module Project.

2- On Right side there is pannel which blink green colour. right click on 'build' ->'run Gradle Tasks'

3- Then refresh the theme project.

4- I checked the "build folder" in the system explorer under the theme project.

5- I copied folders and files which you need to change into src/main/webapp/ I copied the contents of "_diffs" of the old theme project in "src/main/webapp"

6- Build the project. right click on 'build' ->'run Gradle Tasks'

  • I tried "buildTheme" no errors.
  • I tried "build" there is some errors. But nothing works.

server error in the theme

The issue on the theme:

issue theme

sorry, my theme works on Liferay 7.0 GA3 and later. I have this in my liferay-look-and-feel.xml file before migrating the theme: <compatibility><version>7.0.2+</version></compatibility>. I tested it on liferay 7 GA1 and I got a issue.

Update:

I did not find a solution to migrate the theme from the plugins sdk to workspace. I want a structure project like a new Theme project on Eclipse IDE with build type Gradle.

theme structure

1
can you give some more hints than "nothing happens"? And rather list the steps you actually did than pointing to the tutorial? (how did you point your workspace to the plugins-sdk? Which other steps did you do before?)Olaf Kock
@OlafKock Sorry, I added more details. Pls check the question again.NewDark Magic

1 Answers

1
votes

Although technically the theme update is possible, if you care about the end result I would start from scratch and just copy the bits and pieces that make sense. It should be easy if you did just few modification. If you have a lot of Liferay/Bootstrap overrides this will be more challenging but the auto update will not produce something nice.

Also, when people refer to Liferay theme they speak usually about CSS/ftl/js. If your theme contains something more (like JSP hooks...) these should be taken out and placed in separate bundles accordingly.