...
Table of Contents | ||
---|---|---|
|
...
This topic explains how to configure Eclipse to maximize the ease of plugin development. The following steps will be performed in order to enable XperienCentral development in Eclipse:
...
If you would like to continue developing an existing plugin, skip this sectionpart. The first step is to create a plugin that is based on an archetype. This section part assumes that you created a plugin based on an element archetype. For complete information on performing this step, see Creating the helloWorld Element Plugin.
...
After the plugin has been created, use Maven to create a project file for Eclipse in which you reference the required libraries (as defined in the pom.xml
of your plugin). Open a command window and enter the following commands:
cd C:\GX\wcbplugin\helloworldelement
mvn -s C:\GX\XperienCentral\settings.xml clean install
mvn -s C:\GX\XperienCentral\settings.xml eclipse:eclipse
...
Create a Plugin Project in Eclipse
Each WCB plugin is a separate Eclipse project. To create an Eclipse project for a plugin, perform the following steps:
- Navigate to File > New > Project…
- Select Java > Java Project and click [Next]:
Enter a name for the project (e.g. HelloWorldElement) and select the option to create the project from an existing source. Select the root for the element plugin (for example, C:\GX\wcbplugin\helloworldelement).
Click [Finish]. The project will now be created:
Eclipse might prompt you to switch to the Java perspective. The perspective, that is the way windows in eclipse are ordered, can be modified later via the Window > Open perspective menu or in the right upper corner of the Eclipse user interface:
After the project has been created, Eclipse will look like the following:
...
- Navigate to the External Tools configuration (Run > External Tools > External Tools Configurations):
- In the left pane, select "Program" and click [New]:
Configure the external tool. Set at least the following properties:
Property Description Name Define a name for running this command.
Location Select the
mvn.bat
file [Browse File System…].Working Directory Select your project by clicking [Browse Workspace…].
Arguments Fill this field with the following
-s <path to the settings.xml> clean package
.Note If other plugins have dependencies to this plugin you might consider using
-s <path to the settings.xml> clean install
instead to also install the plugin in the Maven Repository.Click [Apply].
Click [Run] to execute the command.
...