Download
About XStream version numbers...
Stable Version: 1.4.21
- Binary distribution: Contains the XStream jar files, the Hibernate and Benchmark modules and all the dependencies.
- Source distribution: Contains the complete XStream project as if checked out from the Subversion version tag.
- XStream Core only: The xstream.jar only as it is downloaded automatically when it is referenced as Maven dependency.
- XStream Hibernate module: The xstream-hibernate.jar as it is downloaded automatically when it is referenced as Maven dependency.
- XStream JMH module: The xstream-jmh-app.zip as standalone application with start scripts and all required libraries.
Maven Central Repository
XStream is published to the Maven Central Repository. Use the following Maven coordinates to add XStream to your project:
<dependency> <groupId>com.thoughtworks.xstream</groupId> <artifactId>xstream</artifactId> <version>1.4.21</version> </dependency>
Previous Releases
Previous releases of XStream are also available. However, use of the latest stable version is recommended.
Optional Dependencies
All these dependencies can be optional. XStream uses by default the XPP API in combination with the MXParser implementation. Therefore are these dependencies not declared as optional in Maven. However, depending on your choice of the XML parser, you can exclude the dependencies for the MXParser (e.g. by selecting StAX). You will then have to declare the dependencies for the alternative XML parser yourself unless you use a parser form the Java runtime.
Note, that the bundle entries of the manifest do not declare any dependencies. In an OSGi environment it is the task of the developer to setup the used bundles for his own project.
- Supported XML parsers and packages:
- MXParser, an XML pull parser and fork of Xpp3 (recommended).
- XmlPull, the XML pull parser API and factory to detect available implementations.
- Xpp3, an XML pull parser.
- kXML2 or kXML2-min, an XML pull parser.
- DOM4J, easy XML representation and manipulation framework.
- JDOM, easy XML representation and manipulation (superseded by JDOM2).
- JDOM2, easy XML representation and manipulation, successor of JDOM (requires Java 5).
- StaX, the reference implementation of the Streaming API for XML.
- Woodstox, an alternate open source StaX implementation, requires Java 6 or higher.
- Woodstox, an alternate open source StaX implementation, for use with Java 1.4 and 5.
- XOM, another alternative XML API.
- Other optional 3rd party dependencies:
- Java Activation module for the ActivationDataFlavorConverter. The dependency is required for the Java 11 runtime.
- CGLIB for optional support of some proxies generated with the CGLIB Enhancer.
- Jettison 1.5.4 for serialization and deserialization support with JSON. Note, that some versions from 1.3.x and up are not compatible with XStream.
- Jettison 1.0.1 for serialization and deserialization support with JSON in JDK 1.4. Note, that newer version 1.1 is not compatible with XStream.
Dependencies Hibernate Module
- Supported Hibernate versions:
- Hibernate Core 4.2.5, for Java 6 or higher.
- Hibernate Core 3.6.6, for Java 5.
- Hibernate Core 3.3.2, for Java 1.4.
- Supported Hibernate Envers versions:
- Hibernate Envers 4.2.5, for Java 6 or higher.
- Hibernate Envers 3.6.6, for Java 5.
Dependencies JMH Module
- JMH dependencies:
- JMH Core 1.21, for Java 6 or higher.
- JMH Generator Annotation Processor 1.21, for Java 6 or higher.