Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions build.properties
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,17 @@ xstream.jar = xstream-${xstream.version}.jar
xstream.loc = ${maven2.repo}/com/thoughtworks/xstream/xstream/${xstream.version}
xstream.md5 = 4551a29c38f22ed25eaf109eda50ff03

# XMLPull is required by XStream 1.4.x
xmlpull.version = 1.1.3.1
xmlpull.jar = xmlpull-${xmlpull.version}.jar
xmlpull.loc = ${maven2.repo}/xmlpull/xmlpull/${xmlpull.version}
xmlpull.md5 = cc57dacc720eca721a50e78934b822d2

xpp3.version = 1.1.4c
xpp3.jar = xpp3_min-${xpp3.version}.jar
xpp3.loc = ${maven2.repo}/xpp3/xpp3_min/${xpp3.version}
xpp3.md5 = DCD95BCB84B09897B2B66D4684C040DA

# Xalan can be found at: http://xml.apache.org/xalan-j/
xalan.version = 2.7.2
xalan.jar = xalan-${xalan.version}.jar
Expand Down
6 changes: 6 additions & 0 deletions build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -413,6 +413,8 @@
<include name="${lib.dir}/${xerces.jar}"/>
<include name="${lib.dir}/${xml-apis.jar}"/>
<include name="${lib.dir}/${xmlgraphics-commons.jar}"/>
<include name="${lib.dir}/${xmlpull.jar}"/>
<include name="${lib.dir}/${xpp3.jar}"/>
<include name="${lib.dir}/${xstream.jar}"/>
</patternset>

Expand Down Expand Up @@ -488,6 +490,8 @@
<pathelement location="${lib.dir}/${xerces.jar}"/>
<pathelement location="${lib.dir}/${xml-apis.jar}"/>
<pathelement location="${lib.dir}/${xmlgraphics-commons.jar}"/>
<pathelement location="${lib.dir}/${xmlpull.jar}"/>
<pathelement location="${lib.dir}/${xpp3.jar}"/>
<pathelement location="${lib.dir}/${xstream.jar}"/>
<!-- Generated jars -->
<fileset dir="${lib.dir}" includes="jorphan.jar"/>
Expand Down Expand Up @@ -2932,6 +2936,8 @@ run JMeter unless all the JMeter jars are added.
<process_jarfile jarname="xerces"/>
<process_jarfile jarname="xml-apis"/>
<process_jarfile jarname="xmlgraphics-commons"/>
<process_jarfile jarname="xmlpull"/>
<process_jarfile jarname="xpp3"/>
<process_jarfile jarname="xstream"/>
</target>

Expand Down
2 changes: 2 additions & 0 deletions eclipse.classpath
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,8 @@
<classpathentry kind="lib" path="lib/xercesImpl-2.11.0.jar"/>
<classpathentry kind="lib" path="lib/xml-apis-1.4.01.jar"/>
<classpathentry kind="lib" path="lib/xmlgraphics-commons-2.0.1.jar"/>
<classpathentry kind="lib" path="lib/xmlpull-1.1.3.1.jar"/>
<classpathentry kind="lib" path="lib/xpp3_min-1.1.4c.jar"/>
<classpathentry kind="lib" path="lib/xstream-1.4.8.jar"/>
<!-- Needed for build and test -->
<classpathentry kind="lib" path="lib/api/bcmail-jdk15on-1.49.jar"/>
Expand Down
12 changes: 12 additions & 0 deletions lib/aareadme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,18 @@ xmlgraphics-commons-2.0.1 (org.apache.xmlgraphics.image.codec)
http://xmlgraphics.apache.org/commons/download.html
- SaveGraphicsService

xmlpull-1.1.3.1
---------------
http://www.xmlpull.org/impls.shtml
- xstream


xpp3_min-1.1.4c
---------------
http://x-stream.github.io/download.html
or
http://www.extreme.indiana.edu/dist/java-repository/xpp3/distributions/
- xstream

xstream-1.4.8
-------------
Expand Down
3 changes: 3 additions & 0 deletions licenses/bin/xmlpull-1.1.3.1.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
http://www.xmlpull.org/

The XmlPull API is in public domain
48 changes: 48 additions & 0 deletions licenses/bin/xpp3-1.1.4c.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
Extracted from http://www.extreme.indiana.edu/dist/java-repository/xpp3/distributions/xpp3-1.1.4c_src.zip

Indiana University Extreme! Lab Software License

Version 1.1.1

Copyright (c) 2002 Extreme! Lab, Indiana University. All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:

1. Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in
the documentation and/or other materials provided with the distribution.

3. The end-user documentation included with the redistribution, if any,
must include the following acknowledgment:

"This product includes software developed by the Indiana University
Extreme! Lab (http://www.extreme.indiana.edu/)."

Alternately, this acknowledgment may appear in the software itself,
if and wherever such third-party acknowledgments normally appear.

4. The names "Indiana Univeristy" and "Indiana Univeristy Extreme! Lab"
must not be used to endorse or promote products derived from this
software without prior written permission. For written permission,
please contact http://www.extreme.indiana.edu/.

5. Products derived from this software may not use "Indiana Univeristy"
name nor may "Indiana Univeristy" appear in their name, without prior
written permission of the Indiana University.

THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED
WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE AUTHORS, COPYRIGHT HOLDERS OR ITS CONTRIBUTORS
BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
12 changes: 12 additions & 0 deletions res/maven/ApacheJMeter_parent.pom
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,9 @@ under the License.
<jtidy.version>r938</jtidy.version>
<tika-core.version>1.12</tika-core.version>
<tika-parsers.version>1.12</tika-parsers.version>
<xmlpull.version>1.1.3.1</xmlpull.version>
<xstream.version>1.4.8</xstream.version>
<xpp3.version>1.1.4c</xpp3.version>
<xalan.version>2.7.2</xalan.version>
<serializer.version>2.7.2</serializer.version>
<xerces.version>2.11.0</xerces.version>
Expand Down Expand Up @@ -291,6 +293,16 @@ under the License.
<artifactId>xstream</artifactId>
<version>${xstream.version}</version>
</dependency>
<dependency>
<groupId>xmlpull</groupId>
<artifactId>xmlpull</artifactId>
<version>${xmlpull.version}</version>
</dependency>
<dependency>
<groupId>xpp3</groupId>
<artifactId>xpp3_min</artifactId>
<version>${xpp3.version}</version>
</dependency>
<dependency>
<groupId>xalan</groupId>
<artifactId>xalan</artifactId>
Expand Down
13 changes: 6 additions & 7 deletions src/core/org/apache/jmeter/save/SaveService.java
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,7 @@
import com.thoughtworks.xstream.converters.DataHolder;
import com.thoughtworks.xstream.converters.reflection.PureJavaReflectionProvider;
import com.thoughtworks.xstream.converters.reflection.ReflectionProvider;
import com.thoughtworks.xstream.io.xml.PrettyPrintWriter;
import com.thoughtworks.xstream.io.xml.StaxDriver;
import com.thoughtworks.xstream.io.xml.XppDriver;
import com.thoughtworks.xstream.mapper.CannotResolveClassException;
import com.thoughtworks.xstream.mapper.Mapper;
import com.thoughtworks.xstream.mapper.MapperWrapper;
Expand All @@ -81,7 +80,7 @@ public class SaveService {

private static final class XStreamWrapper extends XStream {
private XStreamWrapper(ReflectionProvider reflectionProvider) {
super(reflectionProvider, new StaxDriver());
super(reflectionProvider);
}

// Override wrapMapper in order to insert the Wrapper in the chain
Expand Down Expand Up @@ -302,7 +301,7 @@ public static void saveTree(HashTree tree, OutputStream out) throws IOException
// Use deprecated method, to avoid duplicating code
ScriptWrapper wrapper = new ScriptWrapper();
wrapper.testPlan = tree;
JMXSAVER.marshal(wrapper, new PrettyPrintWriter(outputStreamWriter));
JMXSAVER.toXML(wrapper, outputStreamWriter);
outputStreamWriter.write('\n');// Ensure terminated properly
outputStreamWriter.close();
}
Expand All @@ -313,7 +312,7 @@ public static void saveElement(Object el, OutputStream out) throws IOException {
OutputStreamWriter outputStreamWriter = getOutputStreamWriter(out);
writeXmlHeader(outputStreamWriter);
// Use deprecated method, to avoid duplicating code
JMXSAVER.marshal(el, new PrettyPrintWriter(outputStreamWriter));
JMXSAVER.toXML(el, outputStreamWriter);
outputStreamWriter.close();
}

Expand Down Expand Up @@ -341,7 +340,7 @@ public synchronized static void saveSampleResult(SampleEvent evt, Writer writer)
// This is effectively the same as saver.toXML(Object, Writer) except we get to provide the DataHolder
// Don't know why there is no method for this in the XStream class
try {
JTLSAVER.marshal(evt.getResult(), new PrettyPrintWriter(writer), dh);
JTLSAVER.marshal(evt.getResult(), new XppDriver().createWriter(writer), dh);
} catch(RuntimeException e) {
throw new IllegalArgumentException("Failed marshalling:"+(evt.getResult() != null ? showDebuggingInfo(evt.getResult()) : "null"), e);
}
Expand Down Expand Up @@ -469,7 +468,7 @@ public static void loadTestResults(InputStream reader, ResultCollectorHelper res
dh.put(RESULTCOLLECTOR_HELPER_OBJECT, resultCollectorHelper); // Allow TestResultWrapper to feed back the samples
// This is effectively the same as saver.fromXML(InputStream) except we get to provide the DataHolder
// Don't know why there is no method for this in the XStream class
JTLSAVER.unmarshal(new StaxDriver().createReader(reader), null, dh);
JTLSAVER.unmarshal(new XppDriver().createReader(reader), null, dh);
inputStreamReader.close();
}

Expand Down
1 change: 1 addition & 0 deletions test/src/org/apache/jmeter/JMeterVersionTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ public class JMeterVersionTest extends JMeterTestCase {
JAR_TO_BUILD_PROP.put("mail", "javamail");
JAR_TO_BUILD_PROP.put("oro", "jakarta-oro");
JAR_TO_BUILD_PROP.put("xercesImpl", "xerces");
JAR_TO_BUILD_PROP.put("xpp3_min", "xpp3");
}

private static final File JMETER_HOME = new File(JMeterUtils.getJMeterHome());
Expand Down