A Java library for creating posts and getting some basic information from a Wordpress installation using its XML-RPC API.
The library currently supports the minimum information to allow a Jenkins plugin to post to a Wordpress installation. Therefore it supports creating a post, querying for available categories, tags and post types.
Post post = new Post("Title of post", "Content for posting");
WordpressClient client = new WordpressClient();
String newPostId = client.newPost(post);
A Maven POM is provided with the library.
To build and install the library:
mvn install
The release versions of the library are deployed to Github which means you will need to add a repository to your Maven POM:
<repositories>
<repository>
<id>java-wordpress-api-mvn-repo</id>
<url>https://raw.github.com/ashri/java-wordpress-api/mvn-repo/</url>
<snapshots>
<enabled>true</enabled>
<updatePolicy>always</updatePolicy>
</snapshots>
</repository>
</repositories>
You can then reference the library in your own Maven POM using the following:
<dependencies>
<dependency>
<groupId>com.tearsofaunicorn.wordpress</groupId>
<artifactId>wordpress-xmlrpc-client</artifactId>
<version>1.0</version>
</dependency>
</dependencies>
Copyright (c) 2013 Ashley Richardson. See LICENSE for details.