Setting up an Eclipse Development Environment for WebCenter Sites

Most Java developers are familiar with Eclipse. While the Content Server Developer Tools (CSDT) does not work the same as other application-specific Eclipse plug-ins, it does provide the ability to perform custom development more easily with WebCenter Sites (a.k.a. Fatwire prior to the Oracle acquisition) than other options if you are comfortable in Eclipse.

Install the Jump Start Kit (JSK)

The first trick is finding the JSK. You must have an Oracle Support account to access it through normal channels. On the Oracle Support site, search for “webcenter sites JUMPSTARTKIT” in the Patch category.

jsk01

Follow the JSK_readme.txt included in the download. The installation location is chosen during installation and is referred to as [JSK_HOME] in this blog. As the file paths can get rather long, try to use a location that is not too deep, i.e., as close to the root of your drive as is practical. C:jsk works really well 🙂
The JSK is currently incompatible with Java 1.8, so you may need to install it from the command line to get the right Java version to run it. I open a command window where the JAR is and use the following command:
C:/Oracle/JDKs/7u79/jre/bin/java -jar JSK_Installer11.1.1.8.0.jar
The “C:/Oracle/JDKs7u79” of the above you need to adjust for your Java 1.7 installation location.
Run [JSK_HOME]run.bat, then click the Start button.

Add Your WebCenter Sites Project Code

Replace the contents of [JSK_HOME]Sites11.1.1.8.0exportenvisioncs_workspace with your project data set.

To import your existing data set in to your JSK, open a command window in [JSK_HOME]Sites11.1.1.8.0csdtcsdt-client and run the following:

set JAVA_HOME=[FULL PATH TO JRE JAVA.EXE, I.E., C:Programs7u79jrebinjava]
%JAVA_HOME% -cp "./csdt-client-11.1.1.8.0.jar;./lib/*" com.fatwire.csdt.client.main.CSDT http://localhost:9080/cs/ContentServer username=fwadmin password=xceladmin resources="@SITE:*" toSite="[SITE_NAME]" cmd="import"
%JAVA_HOME% -cp "./csdt-client-11.1.1.8.0.jar;./lib/*" com.fatwire.csdt.client.main.CSDT http://localhost:9080/cs/ContentServer username=fwadmin password=xceladmin resources="@ALL_NONASSETS:*" toSite="[SITE_NAME]" cmd="import"
%JAVA_HOME% -cp "./csdt-client-11.1.1.8.0.jar;./lib/*" com.fatwire.csdt.client.main.CSDT http://localhost:9080/cs/ContentServer username=fwadmin password=xceladmin resources="@ALL_ASSETS:*" toSite="[SITE_NAME]" cmd="import"

If you do not have a data set yet, that is OK, you can create one from your JSK later.

Install the Eclipse CSDT

First you need an Eclipse distribution that will run on JDK 1.7. I recommend the Oracle distribution, Oracle Enterprise Pack for Eclipse (OEPE) simply because it is pre-configured to run WebLogic Server. If your Sites project is deploying in production to Tomcat, any Eclipse distro that is compatible with JDK 1.7 is fine.

It is recommended to turn Build Automatically off until your workspace is completely configured.
You import the plugin from the zip file found at [JSK_HOME]\Sites\11.1.1.8.0\csdt\csdt-eclipse. The following screens will walk you through those steps:

Configure Your Eclipse with Your JSK

After you have completed the installation and Eclipse has restarted, open the Oracle WebCenter Sites perspective.

You will be prompted to provide values for your Sites instance. For the Instance value, enter [JSK_HOME]\Sites\11.1.1.8.0
The project name you provide will be the name of the generated project. If you imported a project earlier, this will be pre-filled for you.

The default credentials are fwadmin – xceladmin

Congratulations!

You are now ready to use the Oracle WebCenter Sites Content Server Developer Tools in Eclipse.
Unfortunately, how to use the tools is beyond the scope of this post.
If you previously turned off Build Automatically you can turn it back on now.

Sharing Your JSK

Once you have your JSK the way you like it, you can distribute it to your team. To make it shareable takes just two steps. First, open the .classpath file in the cs_workspace that was generated by Eclipse and remove all of the <attributes> nodes like the example one below:

<attributes>
<attribute name="javadoc_location" value="file:/C:/Users/ssnelson/Desktop/[SITE_NAME].com/jsk/Sites/11.1.1.8.0/developerdocs/javadoc/"/>
</attributes>

Then just zip up [JSK_HOME] and remove the temp folder from the [JSK_HOME] root of the resulting zip file. When your team-members run it for the first time on their machine they will be prompted that it will be configured for their machine.

They just need to click OK and continue from where you started after installing the JSK.
Exporting Data Sets
To extract all updates from your JSK (or from an existing site to use in your JSK) you can use the export commands below from a command window in [JSK_HOME]\Sites\11.1.1.8.0\csdt\csdt-client:

set JAVA_HOME=[FULL PATH TO JRE JAVA.EXE, I.E., C:Programs7u79jrebinjava]
%JAVA_HOME% -cp "./csdt-client-11.1.1.8.0.jar;./lib/*" com.fatwire.csdt.client.main.CSDT http://localhost:9080/cs/ContentServer username=fwadmin password=xceladmin resources="@SITE:*" toSite="[SITE_NAME]" cmd="export"
%JAVA_HOME% -cp "./csdt-client-11.1.1.8.0.jar;./lib/*" com.fatwire.csdt.client.main.CSDT http://localhost:9080/cs/ContentServer username=fwadmin password=xceladmin resources="@ALL_NONASSETS:*" toSite="[SITE_NAME]" cmd="export"
%JAVA_HOME% -cp "./csdt-client-11.1.1.8.0.jar;./lib/*" com.fatwire.csdt.client.main.CSDT http://localhost:9080/cs/ContentServer username=fwadmin password=xceladmin resources="@ALL_ASSETS:*" toSite="[SITE_NAME]" cmd="export"
Facebooktwitterredditlinkedinmail
© Scott S. Nelson

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.