How to deploy a new theme created with SDK

Luca kk, modified 10 Years ago. Expert Posts: 284 Join Date: 12/7/10 Recent Posts
Hi all,
I have created a test theme using SDK from terminal.
From inside my sdk plugin directory:

C:\Progetti\liferay-plugins-sdk-6.2\themes>


I ran the command:

create.bat test "Test"


It created a new subdirectory in "themes" directory containing:


test-theme
    - docroot
            -_diffs
            - WEB-INF
    build.xml


How do I deploy this plugin and generate "war" file?

Thanks in advance,
Luca
thumbnail
David H Nebinger, modified 10 Years ago. Liferay Legend Posts: 14933 Join Date: 9/2/06 Recent Posts
Go into the test-theme folder and "ant war" to create the war file, then manually move to Liferay's deploy folder.

If your build.<username>.properties file is set up correctly, you could also use "ant deploy" to build the war and deploy.
Luca kk, modified 10 Years ago. Expert Posts: 284 Join Date: 12/7/10 Recent Posts
Hi David,
thanks for reply.
I tried to run "ant deploy"(or "ant war") but I get this message:
'ant' is not recognized as an internal or external file........... 


How can I do?

Thanks

P.S.
I don't have a build.<username>.properties file.
Luca kk, modified 10 Years ago. Expert Posts: 284 Join Date: 12/7/10 Recent Posts
Hi David,
ok now "ant" command works (I configured the environment variables)!

I ran "ant war" and i get this:

C:\Progetti\liferay-plugins-sdk-6.2\themes\test-theme&gt;ant war
Buildfile: C:\Progetti\liferay-plugins-sdk-6.2\themes\test-theme\build.xml
    [touch] Creating C:\Progetti\liferay-plugins-sdk-6.2\themes\test-theme\build
.gradle

war:

BUILD FAILED
C:\Progetti\liferay-plugins-sdk-6.2\build-common.xml:3120: The following error o
ccurred while executing this line:
: The following error occurred while executing this line:
C:\Progetti\liferay-plugins-sdk-6.2\build-common.xml:2617: The following error o
ccurred while executing this line:
: The following error occurred while executing this line:
C:\Progetti\liferay-plugins-sdk-6.2\build-common.xml:607: The following error oc
curred while executing this line:
C:\Progetti\liferay-plugins-sdk-6.2\build-common.xml:1224: C:\Progetti\bundles\t
omcat-7.0.42\webapps\ROOT\html\themes\_unstyled does not exist.

Total time: 4 seconds

C:\Progetti\liferay-plugins-sdk-6.2\themes\test-theme&gt;
thumbnail
David H Nebinger, modified 10 Years ago. Liferay Legend Posts: 14933 Join Date: 9/2/06 Recent Posts
That means you didn't create the build.<username>.properties file in the root of the SDK folder. This file points to your local tomcat bundle so Liferay can find the other resources such as the current themes.
thumbnail
Gurumurthy Godlaveeti, modified 10 Years ago. Regular Member Posts: 208 Join Date: 8/12/11 Recent Posts
Hi Luca,

I agree with David, You need to finish the plugins sdk set up first then all goes smooth.

This link will help in understanding set up process.
https://www.liferay.com/documentation/liferay-portal/6.1/development/-/ai/installing-the-sdk

Thanks
Guru