Eclipse Integration with ServiceStack
The ServiceStackEclipse plugin enables cross-platform Add ServiceStack Reference integration with Eclipse on Windows, OSX and Linux.
Install from Eclipse Marketplace
To install, search for ServiceStack in the Eclipse Marketplace at
Help -> Eclipse Marketplace:
Find the ServiceStackEclipse plugin, click Install and follow the wizard to the end, restarting to launch Eclipse with the plugin loaded!
ServiceStackEclipse is best used with Java Maven Projects where it automatically adds the ServiceStack.Java client library to your Maven Dependencies and when your project is set to Build Automatically, are then downloaded and registered, so you're ready to start consuming ServiceStack Services with the new
Add ServiceStack Reference
Just like the support in Android Studio you can right-click on a Java Package to open the Add ServiceStack Reference... dialog from the Context Menu:
Complete the dialog to add the remote Servers generated Java DTO's to your selected Java package and the
net.servicestack.client dependency to your Maven dependencies.
Update ServiceStack Reference
Updating a ServiceStack Reference works as normal where you can change any of the available options in the header comments, save, then right-click on the file in the File Explorer and click on Update ServiceStack Reference in the Context Menu:
Using the plugin without Maven
ServiceStack references can still be added without the use of a Maven project. However, two dependencies will have to added to your Eclipse project for the generated Java to compile. Both JARs are available to download from JCenter or MavenCentral.
Once you have downloaded these jars, add them to a folder in your project, eg
Then add these dependencies to your Eclipse project.
- Right click -> Properties on your project in Eclipse.
Java Build Path.
- Select the
- Select both required libraries.
For further information on the different code-generation configuration options available and examples of using the
JsonServiceClient refer to the Java ServiceStack Reference Documentation.