jsalvata 2004/02/25 14:34:20
Modified: . eclipse.classpath build.xml
Added: src/examples/org/apache/jmeter/examples/testbeans/example1
Example1.java
src/examples/org/apache/jmeter/examples/testbeans/example2
Example2BeanInfo.java Example2.java
Example2Resources.properties
Log:
- Added new source tree "examples", which is only built if requested explicitly.
- Fixed build directory nesting issue in eclipse.classpath
Revision Changes Path
1.9 +2 -1 jakarta-jmeter/eclipse.classpath
Index: eclipse.classpath
===================================================================
RCS file: /home/cvs/jakarta-jmeter/eclipse.classpath,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- eclipse.classpath 14 Jan 2004 22:32:36 -0000 1.8
+++ eclipse.classpath 25 Feb 2004 22:34:20 -0000 1.9
@@ -18,6 +18,7 @@
kind="src" output="build/protocol/java" path="src/protocol/java"/>
<classpathentry kind="src" output="build/protocol/ldap"
path="src/protocol/ldap"/>
<classpathentry kind="src" output="build/protocol/tcp" path="src/protocol/tcp"/>
+ <classpathentry kind="src" path="src/examples"/>
<classpathentry kind="src" output="build/htmlparser" path="src/htmlparser"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="lib" path="lib/avalon-excalibur-4.1.jar"/>
@@ -30,5 +31,5 @@
<classpathentry kind="lib" path="lib/commons-collections.jar"/>
<classpathentry kind="lib" path="lib/soap.jar"/>
<classpathentry kind="lib" path="lib/jdom-b9.jar"/>
- <classpathentry kind="output" path="build"/>
+ <classpathentry kind="output" path="build/default"/>
</classpath>
1.165 +27 -5 jakarta-jmeter/build.xml
Index: build.xml
===================================================================
RCS file: /home/cvs/jakarta-jmeter/build.xml,v
retrieving revision 1.164
retrieving revision 1.165
diff -u -r1.164 -r1.165
--- build.xml 16 Feb 2004 23:58:48 -0000 1.164
+++ build.xml 25 Feb 2004 22:34:20 -0000 1.165
@@ -174,6 +174,7 @@
<property name="src.ldap" value="src/protocol/ldap"/>
<property name="src.htmlparser" value="src/htmlparser"/>
<property name="src.tcp" value="src/protocol/tcp"/>
+ <property name="src.examples" value="src/examples"/>
<!-- Where the documentation sources live -->
<property name="src.docs" value="xdocs"/>
@@ -193,6 +194,7 @@
<pathelement location="${src.ldap}"/>
<pathelement location="${src.htmlparser}"/>
<pathelement location="${src.tcp}"/>
+ <pathelement location="${src.examples}"/>
</path>
<!-- Temporary build directories: where the .class live -->
@@ -208,6 +210,7 @@
<property name="build.ldap" location="build/protocol/ldap"/>
<property name="build.htmlparser" location="build/htmlparser"/>
<property name="build.tcp" location="build/protocol/tcp"/>
+ <property name="build.examples" location="build/examples"/>
<!-- Path prefix to allow Anakia to find stylesheets if running under Eclipse -->
<!--
@@ -530,7 +533,7 @@
</javac>
</target>
- <target name="compile-tcp" depends="compile-jorphan,compile-core"
description="Compile components specific to Java sampling.">
+ <target name="compile-tcp" depends="compile-jorphan,compile-core"
description="Compile components specific to TCP sampling.">
<mkdir dir="${build.tcp}"/>
<javac srcdir="${src.tcp}" destdir="${build.tcp}" optimize="${optimize}"
debug="on" target="${target.java.version}" deprecation="${deprecation}"
encoding="${encoding}">
<include name="**/*.java"/>
@@ -544,6 +547,18 @@
<target name="compile-protocols"
depends="compile-http,compile-ftp,compile-jdbc,compile-java,compile-ldap,compile-tcp"
description="Compile all protocol-specific components."/>
+ <target name="compile-examples" depends="compile-jorphan,compile-core"
description="Compile example components.">
+ <mkdir dir="${build.examples}"/>
+ <javac srcdir="${src.examples}" destdir="${build.examples}"
optimize="${optimize}" debug="on" target="${target.java.version}"
deprecation="${deprecation}" encoding="${encoding}">
+ <include name="**/*.java"/>
+ <classpath>
+ <path refid="classpath"/>
+ <pathelement location="${build.jorphan}"/>
+ <pathelement location="${build.core}"/>
+ </classpath>
+ </javac>
+ </target>
+
<target name="compile-jorphan" depends="init" description="Compile JOrphan
utility classes.">
<mkdir dir="${build.jorphan}"/>
<javac srcdir="${src.jorphan}" destdir="${build.jorphan}"
optimize="${optimize}" debug="on" target="${target.java.version}"
deprecation="${deprecation}" encoding="${encoding}">
@@ -684,6 +699,13 @@
<target name="all" depends="clean,install"
description="Default: build from source and install. Does not create docs."
/>
+
+ <target name="install-examples" depends="compile-examples" description="Build and
installs the example components.">
+ <jar jarfile="${dest.jar}/ApacheJMeter_examples.jar">
+ <fileset dir="${build.examples}" includes="**/*.class" />
+ <fileset dir="${src.examples}" includes="**/*.properties" />
+ </jar>
+ </target>
<!--
N.B. This target is used by the "dist" target, which is set up as the Gump
target.
1.1
jakarta-jmeter/src/examples/org/apache/jmeter/examples/testbeans/example1/Example1.java
Index: Example1.java
===================================================================
/*
* Created on 24/02/2004
*
* To change the template for this generated file go to
* Window>Preferences>Java>Code Generation>Code and Comments
*/
package org.apache.jmeter.examples.testbeans.example1;
import org.apache.jmeter.samplers.Entry;
import org.apache.jmeter.samplers.SampleResult;
import org.apache.jmeter.samplers.Sampler;
import org.apache.jmeter.testbeans.TestBean;
/**
* This TestBean is just an example about how to write testbeans. The intent is to
demonstrate
* usage of the TestBean features to podential TestBean developers. Note that only
the class's
* introspector view matters: the methods do nothing -- nothing useful, in any case.
*/
public class Example1 extends TestBean implements Sampler {
public SampleResult sample(Entry e) {
return new SampleResult();
}
// A String property:
public void setMyStringProperty(String s)
{};
public String getMyStringProperty()
{return "";}
// A String[] property:
public void setMyStrings(String[] s)
{};
public String[] getMyStrings()
{return null;}
}
1.1
jakarta-jmeter/src/examples/org/apache/jmeter/examples/testbeans/example2/Example2BeanInfo.java
Index: Example2BeanInfo.java
===================================================================
/*
* Created on 25/02/2004
*
* To change the template for this generated file go to
* Window>Preferences>Java>Code Generation>Code and Comments
*/
package org.apache.jmeter.examples.testbeans.example2;
import org.apache.jmeter.testbeans.BeanInfoSupport;
/**
* @author jordi
*
* To change the template for this generated type comment go to
* Window>Preferences>Java>Code Generation>Code and Comments
*/
public class Example2BeanInfo extends BeanInfoSupport {
public Example2BeanInfo()
{
super(Example2.class);
//...
}
}
1.1
jakarta-jmeter/src/examples/org/apache/jmeter/examples/testbeans/example2/Example2.java
Index: Example2.java
===================================================================
/*
* Created on 24/02/2004
*
* To change the template for this generated file go to
* Window>Preferences>Java>Code Generation>Code and Comments
*/
package org.apache.jmeter.examples.testbeans.example2;
import org.apache.jmeter.samplers.Entry;
import org.apache.jmeter.samplers.SampleResult;
import org.apache.jmeter.samplers.Sampler;
import org.apache.jmeter.testbeans.TestBean;
/**
* This TestBean is just an example about how to write testbeans. The intent is to
demonstrate
* usage of the TestBean features to podential TestBean developers. Note that only
the class's
* introspector view matters: the methods do nothing -- nothing useful, in any case.
*/
public class Example2 extends TestBean implements Sampler {
public SampleResult sample(Entry e) {
return new SampleResult();
}
// A TestBean is a Java Bean. Just define some properties and they will
// autmagically show up in the GUI.
// A String property:
public void setMyStringProperty(String s)
{};
public String getMyStringProperty()
{return "";}
}
1.1
jakarta-jmeter/src/examples/org/apache/jmeter/examples/testbeans/example2/Example2Resources.properties
Index: Example2Resources.properties
===================================================================
myStringProperty.displayName=A String
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]