Permalink
Browse files

Bug 54584 - MongoDB plugin

Bugzilla Id: 54584

git-svn-id: https://svn.apache.org/repos/asf/jmeter/trunk@1451961 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information...
1 parent 488c689 commit f40c2e8e5d590b2e814f57ac88ac221f556060cc @pmouawad pmouawad committed Mar 2, 2013
View
@@ -213,6 +213,11 @@ logkit.jar = logkit-${logkit.version}.jar
logkit.loc = ${maven2.repo}/logkit/logkit/${logkit.version}
logkit.md5 = 8D82A3E91AAE216D0A2A40B837A232FF
+mongo-java-driver.version = 2.10.1
+mongo-java-driver.jar = mongo-java-driver-${mongo-java-driver.version}.jar
+mongo-java-driver.loc = ${maven2.repo}/org/mongodb/mongo-java-driver/${mongo-java-driver.version}
+mongo-java-driver.md5 = e12feedcdd249b3973e24d03f6cb5131
+
slf4j-api.version = 1.7.2
slf4j-api.jar = slf4j-api-${slf4j-api.version}.jar
slf4j-api.loc = ${maven2.repo}/org/slf4j/slf4j-api/${slf4j-api.version}
View
@@ -141,13 +141,15 @@
<class location="${dest.jar}/ApacheJMeter_mail.jar"/>
<class location="${dest.jar}/ApacheJMeter_monitors.jar"/>
<class location="${dest.jar}/ApacheJMeter_native.jar"/>
+ <class location="${dest.jar}/ApacheJMeter_mongodb.jar"/>
<class location="${dest.jar}/ApacheJMeter_report.jar"/>
<class location="${dest.jar}/ApacheJMeter_tcp.jar"/>
<class location="${dest.jar.jmeter}/ApacheJMeter.jar" />
<sourcePath path="${src.jorphan}" />
<sourcePath path="${src.tcp}" />
<sourcePath path="${src.jms}" />
<sourcePath path="${src.native}" />
+ <sourcePath path="${src.mongodb}" />
<sourcePath path="${src.report}" />
<auxClasspath>
@@ -211,6 +213,7 @@
<property name="src.monitor.model" value="src/monitor/model"/>
<property name="src.jms" value="src/protocol/jms"/>
<property name="src.native" value="src/protocol/native"/>
+ <property name="src.mongodb" value="src/protocol/mongodb"/>
<property name="src.report" value="src/reports"/>
<!-- Where the documentation sources live -->
@@ -260,6 +263,7 @@
<property name="build.monitor.model" value="build/monitor/model"/>
<property name="build.jms" value="build/protocol/jms"/>
<property name="build.native" value="build/protocol/native"/>
+ <property name="build.mongodb" value="build/protocol/mongodb"/>
<property name="build.report" value="build/reports"/>
<property name="build.test" value="build/test"/>
<property name="build.res" value="build/res"/>
@@ -448,6 +452,7 @@
<pathelement location="${lib.dir}/${jsoup.jar}"/>
<pathelement location="${lib.dir}/${junit.jar}"/>
<pathelement location="${lib.dir}/${logkit.jar}"/>
+ <pathelement location="${lib.dir}/${mongo-java-driver.jar}"/>
<pathelement location="${lib.dir}/${serializer.jar}"/>
<pathelement location="${lib.dir}/${slf4j-api.jar}"/>
<pathelement location="${lib.dir}/${soap.jar}"/>
@@ -839,9 +844,23 @@
</classpath>
</javac>
</target>
+
+ <target name="compile-mongodb" depends="compile-jorphan,compile-core,compile-components"
+ description="Compile components specific to MongoDB sampling.">
+ <mkdir dir="${build.mongodb}"/>
+ <javac srcdir="${src.mongodb}" destdir="${build.mongodb}" source="${src.java.version}" optimize="${optimize}" debug="on" target="${target.java.version}"
+ includeAntRuntime="${includeAntRuntime}" deprecation="${deprecation}" encoding="${encoding}">
+ <include name="**/*.java"/>
+ <classpath>
+ <pathelement location="${build.jorphan}"/>
+ <pathelement location="${build.core}"/>
+ <path refid="classpath"/>
+ </classpath>
+ </javac>
+ </target>
<target name="compile"
- depends="_message_3rdParty,compile-core,compile-components,compile-functions,compile-protocols,compile-rmi,compile-monitor,compile-junit,compile-jms,compile-native, compile-report"
+ depends="_message_3rdParty,compile-core,compile-components,compile-functions,compile-protocols,compile-rmi,compile-monitor,compile-junit,compile-jms,compile-native, compile-mongodb, compile-report"
description="Compile everything."/>
<target name="run_gui" depends="package" description="Run the JMeter GUI off the jar files">
@@ -1117,6 +1136,18 @@ run JMeter unless all the JMeter jars are added.
<fileset dir="${src.native}" includes="**/*.properties" />
</jar>
+ <!-- mongodb -->
+ <!-- Ensure that build dir exists, even if MongoDB has not been built -->
+ <mkdir dir="${build.mongodb}"/>
+ <jar jarfile="${dest.jar}/ApacheJMeter_mongodb.jar" manifest="${build.dir}/MANIFEST_BIN.MF">
+ <zipfileset file="${resources.meta-inf}/default.notice"
+ fullpath="META-INF/NOTICE" />
+ <zipfileset file="${resources.meta-inf}/default.license"
+ fullpath="META-INF/LICENSE" />
+ <fileset dir="${build.mongodb}" includes="**/*.class" />
+ <fileset dir="${src.mongodb}" includes="**/*.properties" />
+ </jar>
+
<jar jarfile="${lib.dir}/jorphan.jar" manifest="${build.dir}/MANIFEST_BIN.MF">
<zipfileset file="${resources.meta-inf}/default.notice"
fullpath="META-INF/NOTICE" />
@@ -2728,6 +2759,7 @@ run JMeter unless all the JMeter jars are added.
<process_jarfile jarname="jsoup"/>
<process_jarfile jarname="junit"/>
<process_jarfile jarname="logkit"/>
+ <process_jarfile jarname="mongo-java-driver"/>
<process_jarfile jarname="serializer"/>
<process_jarfile jarname="slf4j-api"/>
<process_jarfile jarname="soap"/>
@@ -0,0 +1,49 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.apache.jmeter</groupId>
+ <artifactId>ApacheJMeter_parent</artifactId>
+ <version>@MAVEN.DEPLOY.VERSION@</version>
+ <relativePath>.</relativePath>
+ </parent>
+ <artifactId>ApacheJMeter_mongodb</artifactId>
+ <name>Apache JMeter MongoDB</name>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.jmeter</groupId>
+ <artifactId>jorphan</artifactId>
+ <version>@MAVEN.DEPLOY.VERSION@</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.jmeter</groupId>
+ <artifactId>ApacheJMeter_core</artifactId>
+ <version>@MAVEN.DEPLOY.VERSION@</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.jmeter</groupId>
+ <artifactId>ApacheJMeter_components</artifactId>
+ <version>@MAVEN.DEPLOY.VERSION@</version>
+ </dependency>
+ </dependencies>
+
+</project>
@@ -82,6 +82,7 @@ under the License.
<js_rhino.version>1.7R4</js_rhino.version>
<junit.version>4.10</junit.version>
<logkit.version>2.0</logkit.version>
+ <mongo-java-driver.version>2.10.1</mongo-java-driver.version>
<slf4j.version>1.7.2</slf4j.version>
<soap.version>2.3.1</soap.version>
<tidy.version>r938</tidy.version>
@@ -345,6 +346,11 @@ under the License.
<version>${jodd.version}</version>
</dependency>
<dependency>
+ <groupId>org.mongodb</groupId>
+ <artifactId>mongo-java-driver</artifactId>
+ <version>${mongo-java-driver.version}</version>
+ </dependency>
+ <dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>${slf4j.version}</version>
Oops, something went wrong. Retry.

0 comments on commit f40c2e8

Please sign in to comment.