This commit was manufactured by cvs2svn to create tag
'Root_R3_2_maintenance'.
diff --git a/features/org.eclipse.jem.tests-feature/.project b/features/org.eclipse.jem.tests-feature/.project
deleted file mode 100644
index f5e8794..0000000
--- a/features/org.eclipse.jem.tests-feature/.project
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.jem.tests-feature</name>
- <comment></comment>
- <projects>
- </projects>
-</projectDescription>
diff --git a/features/org.eclipse.jem.tests-feature/archived.txt b/features/org.eclipse.jem.tests-feature/archived.txt
deleted file mode 100644
index ae7c321..0000000
--- a/features/org.eclipse.jem.tests-feature/archived.txt
+++ /dev/null
@@ -1,4 +0,0 @@
-This feature is no longer used,
-so I have "nulled out" the head stream
-to avoid confusion.
-
diff --git a/tests/org.eclipse.jst.j2ee.core.tests.performance/.classpath b/tests/org.eclipse.jst.j2ee.core.tests.performance/.classpath
deleted file mode 100644
index 751c8f2..0000000
--- a/tests/org.eclipse.jst.j2ee.core.tests.performance/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/tests/org.eclipse.jst.j2ee.core.tests.performance/.cvsignore b/tests/org.eclipse.jst.j2ee.core.tests.performance/.cvsignore
deleted file mode 100644
index d586ee1..0000000
--- a/tests/org.eclipse.jst.j2ee.core.tests.performance/.cvsignore
+++ /dev/null
@@ -1,4 +0,0 @@
-bin
-temp.folder
-build.xml
-core-performance.jar
diff --git a/tests/org.eclipse.jst.j2ee.core.tests.performance/.project b/tests/org.eclipse.jst.j2ee.core.tests.performance/.project
deleted file mode 100644
index a3e12fb..0000000
--- a/tests/org.eclipse.jst.j2ee.core.tests.performance/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.jst.j2ee.core.tests.performance</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
diff --git a/tests/org.eclipse.jst.j2ee.core.tests.performance/about.html b/tests/org.eclipse.jst.j2ee.core.tests.performance/about.html
deleted file mode 100644
index 2199df3..0000000
--- a/tests/org.eclipse.jst.j2ee.core.tests.performance/about.html
+++ /dev/null
@@ -1,34 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
-<HTML>
-
-<head>
-<title>About</title>
-<meta http-equiv=Content-Type content="text/html; charset=ISO-8859-1">
-</head>
-
-<BODY lang="EN-US">
-
-<H3>About This Content</H3>
-
-<P>June, 2008</P>
-
-<H3>License</H3>
-
-<P>The Eclipse Foundation makes available all content in this plug-in
-("Content"). Unless otherwise indicated below, the Content is provided to you
-under the terms and conditions of the Eclipse Public License Version 1.0
-("EPL"). A copy of the EPL is available at
-<A href="http://www.eclipse.org/org/documents/epl-v10.php">http://www.eclipse.org/org/documents/epl-v10.php</A>.
-For purposes of the EPL, "Program" will mean the Content.</P>
-
-<P>If you did not receive this Content directly from the Eclipse Foundation, the
-Content is being redistributed by another party ("Redistributor") and different
-terms and conditions may apply to your use of any object code in the Content.
-Check the Redistributors license that was provided with the Content. If no such
-license exists, contact the Redistributor. Unless otherwise indicated below, the
-terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at
-<A href="http://www.eclipse.org/">http://www.eclipse.org/</A>.</P>
-
-</BODY>
-</HTML>
diff --git a/tests/org.eclipse.jst.j2ee.core.tests.performance/build.properties b/tests/org.eclipse.jst.j2ee.core.tests.performance/build.properties
deleted file mode 100644
index 80a90d3..0000000
--- a/tests/org.eclipse.jst.j2ee.core.tests.performance/build.properties
+++ /dev/null
@@ -1,7 +0,0 @@
-source.core-performance.jar = src/
-output.core-performance.jar = bin/
-bin.includes = plugin.xml,\
- core-performance.jar,\
- test.xml,\
- testcase.xml,\
- about.html
diff --git a/tests/org.eclipse.jst.j2ee.core.tests.performance/plugin.xml b/tests/org.eclipse.jst.j2ee.core.tests.performance/plugin.xml
deleted file mode 100644
index 77fd513..0000000
--- a/tests/org.eclipse.jst.j2ee.core.tests.performance/plugin.xml
+++ /dev/null
@@ -1,26 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.0"?>
-<plugin
- id="org.eclipse.jst.j2ee.core.tests.performance"
- name="Core Performance Plug-in"
- version="1.1.0"
- provider-name=""
- class="org.eclipse.jst.j2ee.core.tests.performance.CorePerformanceTestPlugin">
-
- <runtime>
- <library name="core-performance.jar">
- <export name="*"/>
- </library>
- </runtime>
-
- <requires>
- <import plugin="org.eclipse.ui"/>
- <import plugin="org.eclipse.core.runtime"/>
- <import plugin="org.junit"/>
- <import plugin="org.eclipse.jst.j2ee.tests.performance"/>
- <import plugin="org.eclipse.wst.common.tests"/>
- <import plugin="org.eclipse.jst.j2ee.core.tests"/>
- <import plugin="org.eclipse.jst.j2ee.tests"/>
- </requires>
-
-</plugin>
diff --git a/tests/org.eclipse.jst.j2ee.core.tests.performance/src/org/eclipse/jst/j2ee/core/tests/performance/AllCorePerformanceTests.java b/tests/org.eclipse.jst.j2ee.core.tests.performance/src/org/eclipse/jst/j2ee/core/tests/performance/AllCorePerformanceTests.java
deleted file mode 100644
index 26d4233..0000000
--- a/tests/org.eclipse.jst.j2ee.core.tests.performance/src/org/eclipse/jst/j2ee/core/tests/performance/AllCorePerformanceTests.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- * Created on Nov 28, 2004
- *
- * TODO To change the template for this generated file go to
- * Window - Preferences - Java - Code Style - Code Templates
- */
-package org.eclipse.jst.j2ee.core.tests.performance;
-
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
-import org.eclipse.jst.j2ee.archive.emftests.AppClientEMFEditTest;
-import org.eclipse.jst.j2ee.archive.emftests.AppClientEMFTest;
-import org.eclipse.jst.j2ee.archive.emftests.EarEMFEditTest;
-import org.eclipse.jst.j2ee.archive.emftests.EarEMFTest;
-import org.eclipse.jst.j2ee.archive.emftests.EjbEMFEditTest;
-import org.eclipse.jst.j2ee.archive.emftests.RarEMFEditTest;
-import org.eclipse.jst.j2ee.archive.emftests.RarEMFTest;
-import org.eclipse.jst.j2ee.archive.emftests.WarEMFEditTest;
-import org.eclipse.jst.j2ee.archive.emftests.WarEMFTest;
-import org.eclipse.jst.j2ee.archive.emftests.WebServicesEMFTest;
-import org.eclipse.jst.j2ee.tests.performance.BasePerformanceTestCase;
-import org.eclipse.jst.j2ee.tests.performance.PerformanceTestCaseWrapper;
-import org.eclipse.wtp.j2ee.headless.tests.appclient.operations.AppClientProjectCreationOperationTest;
-import org.eclipse.wtp.j2ee.headless.tests.ejb.operations.EJBImportOperationTest;
-import org.eclipse.wtp.j2ee.headless.tests.ejb.operations.EJBProjectCreationOperationTest;
-import org.eclipse.wtp.j2ee.headless.tests.jca.operations.JCAProjectCreationOperationTest;
-import org.eclipse.wtp.j2ee.headless.tests.web.operations.WebProjectCreationOperationTest;
-
-/**
- *
- * TODO To change the template for this generated type comment go to
- * Window - Preferences - Java - Code Style - Code Templates
- */
-public class AllCorePerformanceTests extends BasePerformanceTestCase{
-
- public static Test suite() {
-
- TestSuite suite = new TestSuite("Performance Test for com.ibm.etools.archive.emftest");
- addPerformanceTest(suite, new AppClientEMFEditTest("testApplicationClientEdit"), PerformanceTestCaseWrapper.GLOBAL, "Application Client emf edit test" );
- addPerformanceTest(suite, new AppClientEMFTest("testApplicationClientPopulation"), PerformanceTestCaseWrapper.LOCAL, "Application Client emf test" );
- addPerformanceTest(suite, new AppClientEMFTest("test14ApplicationClientPopulation"), PerformanceTestCaseWrapper.GLOBAL, "Application Client 14 emf test" );
-
- addPerformanceTest(suite, new EarEMFEditTest("testEAREdit"), PerformanceTestCaseWrapper.GLOBAL, "EAR emf edit test" );
- //addPerformanceTest(suite, new EarEMFTest("testEARPopulation"), PerformanceTestCaseWrapper.LOCAL, "EAR emf test" );
- addPerformanceTest(suite, new EarEMFTest("test14EARPopulation"), PerformanceTestCaseWrapper.GLOBAL, "EAR 14 emf test" );
-
- //addPerformanceTest(suite, new EjbEMFEditTest("testEJBJarEdit"), PerformanceTestCaseWrapper.GLOBAL, "EJB emf edit test -testEJBJarEdit" );
- addPerformanceTest(suite, new EjbEMFEditTest("testWCCMJar"), PerformanceTestCaseWrapper.LOCAL, "EJB emf edit test - testWCCMJar" );
- //addPerformanceTest(suite, new EjbEMFTest("testEJBJarPopulation"), PerformanceTestCaseWrapper.LOCAL, "EJB emf test" );
- //addPerformanceTest(suite, new EjbEMFTest("test14EJBJarPopulation"), PerformanceTestCaseWrapper.GLOBAL, "EJB 14 emf test" );
-
- addPerformanceTest(suite, new RarEMFEditTest("testRAREdit"), PerformanceTestCaseWrapper.GLOBAL, "RAR emf edit test" );
- addPerformanceTest(suite, new RarEMFTest("testRARPopulation"), PerformanceTestCaseWrapper.LOCAL, "RAR emf test" );
- addPerformanceTest(suite, new RarEMFTest("test14RARPopulation"), PerformanceTestCaseWrapper.GLOBAL, "RAR 14 emf test" );
-
- addPerformanceTest(suite, new WarEMFEditTest("testWAREdit"), PerformanceTestCaseWrapper.GLOBAL, "WAR emf edit test" );
- //addPerformanceTest(suite, new WarEMFTest("testWARPopulation"), PerformanceTestCaseWrapper.LOCAL, "WAR emf test" );
- addPerformanceTest(suite, new WarEMFTest("test14WARPopulation"), PerformanceTestCaseWrapper.GLOBAL, "WAR 14 emf test" );
-
- addPerformanceTest(suite, new WebServicesEMFTest("test13WebServicesClientPopulation"), PerformanceTestCaseWrapper.NONE, "Web Service Client 13 emf test" );
- addPerformanceTest(suite, new WebServicesEMFTest("test13WebServicesDDPopulation"), PerformanceTestCaseWrapper.LOCAL, "Web services 13 emf test" );
- addPerformanceTest(suite, new WebServicesEMFTest("test14WebServicesDDPopulation"), PerformanceTestCaseWrapper.GLOBAL, "Web services 14 emf test" );
- addPerformanceTest(suite, new WebServicesEMFTest("testJaxRPCMapPopulation"), PerformanceTestCaseWrapper.GLOBAL, "JaxRPCMapping emf test" );
-
-
- //Creation tests
- addPerformanceTest(suite, new EJBProjectCreationOperationTest("testEJB21_Defaults"), PerformanceTestCaseWrapper.NONE, "EJB Component creation test" );
- addPerformanceTest(suite, new AppClientProjectCreationOperationTest("testAC50_Defaults"), PerformanceTestCaseWrapper.LOCAL, "App Client Component creation test" );
- addPerformanceTest(suite, new JCAProjectCreationOperationTest("testConnector15_Defaults"), PerformanceTestCaseWrapper.GLOBAL, "Connector Component creation test" );
- addPerformanceTest(suite, new WebProjectCreationOperationTest("testWeb24_Defaults"), PerformanceTestCaseWrapper.GLOBAL, "Web Component creation test" );
-
- addPerformanceTest(suite, new EJBImportOperationTest("testEJBImport21_Defaults"), PerformanceTestCaseWrapper.NONE, "EJB Component import test" );
- return suite;
- }
-
-
-
-}
diff --git a/tests/org.eclipse.jst.j2ee.core.tests.performance/src/org/eclipse/jst/j2ee/core/tests/performance/CorePerformanceTestPlugin.java b/tests/org.eclipse.jst.j2ee.core.tests.performance/src/org/eclipse/jst/j2ee/core/tests/performance/CorePerformanceTestPlugin.java
deleted file mode 100644
index 08769eb..0000000
--- a/tests/org.eclipse.jst.j2ee.core.tests.performance/src/org/eclipse/jst/j2ee/core/tests/performance/CorePerformanceTestPlugin.java
+++ /dev/null
@@ -1,72 +0,0 @@
-package org.eclipse.jst.j2ee.core.tests.performance;
-
-import org.eclipse.ui.plugin.*;
-import org.osgi.framework.BundleContext;
-import java.util.*;
-
-/**
- * The main plugin class to be used in the desktop.
- */
-public class CorePerformanceTestPlugin extends AbstractUIPlugin {
- //The shared instance.
- private static CorePerformanceTestPlugin plugin;
- //Resource bundle.
- private ResourceBundle resourceBundle;
-
- /**
- * The constructor.
- */
- public CorePerformanceTestPlugin() {
- super();
- plugin = this;
- }
-
- /**
- * This method is called upon plug-in activation
- */
- public void start(BundleContext context) throws Exception {
- super.start(context);
- }
-
- /**
- * This method is called when the plug-in is stopped
- */
- public void stop(BundleContext context) throws Exception {
- super.stop(context);
- plugin = null;
- resourceBundle = null;
- }
-
- /**
- * Returns the shared instance.
- */
- public static CorePerformanceTestPlugin getDefault() {
- return plugin;
- }
-
- /**
- * Returns the string from the plugin's resource bundle,
- * or 'key' if not found.
- */
- public static String getResourceString(String key) {
- ResourceBundle bundle = CorePerformanceTestPlugin.getDefault().getResourceBundle();
- try {
- return (bundle != null) ? bundle.getString(key) : key;
- } catch (MissingResourceException e) {
- return key;
- }
- }
-
- /**
- * Returns the plugin's resource bundle,
- */
- public ResourceBundle getResourceBundle() {
- try {
- if (resourceBundle == null)
- resourceBundle = ResourceBundle.getBundle("org.eclipse.jst.j2ee.core.tests.performance.PerformancePluginResources");
- } catch (MissingResourceException x) {
- resourceBundle = null;
- }
- return resourceBundle;
- }
-}
diff --git a/tests/org.eclipse.jst.j2ee.core.tests.performance/test.xml b/tests/org.eclipse.jst.j2ee.core.tests.performance/test.xml
deleted file mode 100644
index ab3cfd5..0000000
--- a/tests/org.eclipse.jst.j2ee.core.tests.performance/test.xml
+++ /dev/null
@@ -1,53 +0,0 @@
-<?xml version="1.0"?>
-
-<project name="J2EE Performance test" default="performance" basedir=".">
- <!-- The property ${eclipse-home} should be passed into this script -->
- <!-- Set a meaningful default value for when it is not. -->
- <property name="eclipse-home" value="${basedir}/../.."/>
-
- <!-- sets the properties eclipse-home, and library-file -->
- <property name="plugin-name" value="org.eclipse.jst.j2ee.core.tests.performance"/>
- <property name="library-file"
- value="${eclipse-home}/plugins/org.eclipse.test_3.1.0/library.xml"/>
- <property name="perf-tests-file"
- value="${testDir}/performance-tests.xml"/>
- <property name="extraVMargs" value="-Xmx512M"/>
-
- <!-- This target holds all initialization code that needs to be done for -->
- <!-- all tests that are to be run. Initialization for individual tests -->
- <!-- should be done within the body of the suite target. -->
- <target name="init">
- <tstamp/>
- <delete>
- <fileset dir="${eclipse-home}" includes="org*.xml"/>
- </delete>
- </target>
-
- <!-- This target holds code to cleanup the testing environment after -->
- <!-- after all of the tests have been run. You can use this target to -->
- <!-- delete temporary files that have been created. -->
- <target name="cleanup">
- </target>
-
-
- <!-- This target defines the performance tests that need to be run. -->
-<target name="performance-suite">
- <property name="performance-folder" value="${eclipse-home}/performance_folder"/>
- <delete dir="${performance-folder}" quiet="true"/>
- <ant target="core-test" antfile="${perf-tests-file}" dir="${eclipse-home}">
- <property name="data-dir" value="${performance-folder}"/>
- <property name="plugin-name" value="${plugin-name}"/>
- <property name="classname" value="org.eclipse.jst.j2ee.core.tests.performance.AllCorePerformanceTests"/>
- <property name="extraVMargs" value="${extraVMargs}"/>
- </ant>
-</target>
-
-<!-- This target runs the performance test suite. Any actions that need to happen -->
-<!-- after all the tests have been run should go here. -->
-<target name="performance" depends="init,performance-suite,cleanup">
- <ant target="collect" antfile="${library-file}" dir="${eclipse-home}">
- <property name="includes" value="org*.xml"/>
- <property name="output-file" value="${plugin-name}.xml"/>
- </ant>
-</target>
-</project>
diff --git a/tests/org.eclipse.jst.j2ee.core.tests.performance/testcase.xml b/tests/org.eclipse.jst.j2ee.core.tests.performance/testcase.xml
deleted file mode 100644
index 4171864..0000000
--- a/tests/org.eclipse.jst.j2ee.core.tests.performance/testcase.xml
+++ /dev/null
@@ -1,47 +0,0 @@
-<?xml version="1.0"?>
-<testCases>
- <testCase class="org.eclipse.jst.j2ee.archive.emftests.EarEMFEditTest">
- <method name="testEAREdit" tagging="GLOBAL" shortName="EAR emf edit" />
- </testCase>
- <testCase class="org.eclipse.jst.j2ee.archive.emftests.EarEMFTest">
- <method name="test14EARPopulation" tagging="GLOBAL" shortName="EAR 14 emf test" />
- </testCase>
- <testCase class="org.eclipse.jst.j2ee.archive.emftests.EjbEMFEditTest">
- <method name="testEJBJarEdit" tagging="GLOBAL" shortName="EJB emf edit" />
- </testCase>
- <testCase class="org.eclipse.jst.j2ee.archive.emftests.EjbEMFEditTest">
- <method name="testWCCMJar" tagging="GLOBAL" shortName="EJB emf edit" />
- </testCase>
- <testCase class="org.eclipse.jst.j2ee.archive.emftests.EjbEMFTest">
- <method name="testEJBJarPopulation" tagging="GLOBAL" shortName="EJB emf test" />
- </testCase>
- <testCase class="org.eclipse.jst.j2ee.archive.emftests.EjbEMFTest">
- <method name="test14EJBJarPopulation" tagging="GLOBAL" shortName="EJB 14 emf test" />
- </testCase>
- <testCase class="org.eclipse.jst.j2ee.archive.emftests.AppClientEMFEditTest">
- <method name="testApplicationClientEdit" tagging="GLOBAL" shortName="Application Client emf edit" />
- </testCase>
- <testCase class="org.eclipse.jst.j2ee.archive.emftests.AppClientEMFTest">
- <method name="test14ApplicationClientPopulation" tagging="GLOBAL" shortName="Application Client 14 emf test" />
- </testCase>
-
- <testCase class="org.eclipse.jst.j2ee.archive.emftests.RarEMFEditTest">
- <method name="testRAREdit" tagging="GLOBAL" shortName="Connector emf edit" />
- </testCase>
-
- <testCase class="org.eclipse.jst.j2ee.archive.emftests.RarEMFTest">
- <method name="test14RARPopulation" tagging="GLOBAL" shortName="Connector 14 emf test" />
- </testCase>
- <testCase class="org.eclipse.jst.j2ee.archive.emftests.WarEMFEditTest">
- <method name="testWAREdit" tagging="GLOBAL" shortName="Web emf edit" />
- </testCase>
- <testCase class="org.eclipse.jst.j2ee.archive.emftests.WarEMFTest">
- <method name="test14WARPopulation" tagging="GLOBAL" shortName="Web 14 emf test" />
- </testCase>
-
- <testCase class="org.eclipse.jst.j2ee.archive.emftests.WebServicesEMFTest">
- <method name="test14WebServicesDDPopulation" tagging="GLOBAL" shortName="Web services 14 emf test" />
- </testCase>
-
-</testCases>
-
\ No newline at end of file
diff --git a/tests/org.eclipse.jst.j2ee.core.tests/META-INF/MANIFEST.MF b/tests/org.eclipse.jst.j2ee.core.tests/META-INF/MANIFEST.MF
index 419aca6..58a0534 100644
--- a/tests/org.eclipse.jst.j2ee.core.tests/META-INF/MANIFEST.MF
+++ b/tests/org.eclipse.jst.j2ee.core.tests/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@
Bundle-ManifestVersion: 2
Bundle-Name: %Bundle-Name.0
Bundle-SymbolicName: org.eclipse.jst.j2ee.core.tests
-Bundle-Version: 1.1.400.qualifier
+Bundle-Version: 1.1.401.qualifier
Bundle-ClassPath: tests.jar
Bundle-Vendor: %Bundle-Vendor.0
Bundle-Localization: plugin
diff --git a/tests/org.eclipse.jst.j2ee.core.tests/commonArchiveResources/loose_module_workspace/LooseEAR/META-INF/.modulemaps b/tests/org.eclipse.jst.j2ee.core.tests/commonArchiveResources/loose_module_workspace/LooseEAR/META-INF/.modulemaps
deleted file mode 100644
index aa20a97..0000000
--- a/tests/org.eclipse.jst.j2ee.core.tests/commonArchiveResources/loose_module_workspace/LooseEAR/META-INF/.modulemaps
+++ /dev/null
@@ -1,9 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<modulemap:EARProjectMap xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:modulemap="modulemap.xmi" xmlns:application="application.xmi" xmi:id="EARProjectMap_1">
- <mappings xmi:id="ModuleMapping_1" projectName="LooseEAREjb">
- <module xmi:type="application:EjbModule" href="META-INF/application.xml#EjbModule_1"/>
- </mappings>
- <mappings xmi:id="ModuleMapping_2" projectName="LooseEARWeb">
- <module xmi:type="application:WebModule" href="META-INF/application.xml#WebModule_1"/>
- </mappings>
-</modulemap:EARProjectMap>
diff --git a/tests/org.eclipse.jst.j2ee.tests.performance/.classpath b/tests/org.eclipse.jst.j2ee.tests.performance/.classpath
deleted file mode 100644
index 8bf670e..0000000
--- a/tests/org.eclipse.jst.j2ee.tests.performance/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="common/"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/tests/org.eclipse.jst.j2ee.tests.performance/.cvsignore b/tests/org.eclipse.jst.j2ee.tests.performance/.cvsignore
deleted file mode 100644
index 43ac606..0000000
--- a/tests/org.eclipse.jst.j2ee.tests.performance/.cvsignore
+++ /dev/null
@@ -1,4 +0,0 @@
-bin
-temp.folder
-build.xml
-performance.jar
diff --git a/tests/org.eclipse.jst.j2ee.tests.performance/.project b/tests/org.eclipse.jst.j2ee.tests.performance/.project
deleted file mode 100644
index 2aed33e..0000000
--- a/tests/org.eclipse.jst.j2ee.tests.performance/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.jst.j2ee.tests.performance</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
diff --git a/tests/org.eclipse.jst.j2ee.tests.performance/about.html b/tests/org.eclipse.jst.j2ee.tests.performance/about.html
deleted file mode 100644
index 2199df3..0000000
--- a/tests/org.eclipse.jst.j2ee.tests.performance/about.html
+++ /dev/null
@@ -1,34 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
-<HTML>
-
-<head>
-<title>About</title>
-<meta http-equiv=Content-Type content="text/html; charset=ISO-8859-1">
-</head>
-
-<BODY lang="EN-US">
-
-<H3>About This Content</H3>
-
-<P>June, 2008</P>
-
-<H3>License</H3>
-
-<P>The Eclipse Foundation makes available all content in this plug-in
-("Content"). Unless otherwise indicated below, the Content is provided to you
-under the terms and conditions of the Eclipse Public License Version 1.0
-("EPL"). A copy of the EPL is available at
-<A href="http://www.eclipse.org/org/documents/epl-v10.php">http://www.eclipse.org/org/documents/epl-v10.php</A>.
-For purposes of the EPL, "Program" will mean the Content.</P>
-
-<P>If you did not receive this Content directly from the Eclipse Foundation, the
-Content is being redistributed by another party ("Redistributor") and different
-terms and conditions may apply to your use of any object code in the Content.
-Check the Redistributors license that was provided with the Content. If no such
-license exists, contact the Redistributor. Unless otherwise indicated below, the
-terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at
-<A href="http://www.eclipse.org/">http://www.eclipse.org/</A>.</P>
-
-</BODY>
-</HTML>
diff --git a/tests/org.eclipse.jst.j2ee.tests.performance/build.properties b/tests/org.eclipse.jst.j2ee.tests.performance/build.properties
deleted file mode 100644
index 21d4547..0000000
--- a/tests/org.eclipse.jst.j2ee.tests.performance/build.properties
+++ /dev/null
@@ -1,5 +0,0 @@
-source.performance.jar = common/
-output.performance.jar = bin/
-bin.includes = plugin.xml,\
- performance.jar,\
- about.html
diff --git a/tests/org.eclipse.jst.j2ee.tests.performance/common/org/eclipse/jst/j2ee/tests/performance/BasePerformanceTestCase.java b/tests/org.eclipse.jst.j2ee.tests.performance/common/org/eclipse/jst/j2ee/tests/performance/BasePerformanceTestCase.java
deleted file mode 100644
index ce756af..0000000
--- a/tests/org.eclipse.jst.j2ee.tests.performance/common/org/eclipse/jst/j2ee/tests/performance/BasePerformanceTestCase.java
+++ /dev/null
@@ -1,166 +0,0 @@
-/*
- * Created on Dec 6, 2004
- *
- * TODO To change the template for this generated file go to
- * Window - Preferences - Java - Code Style - Code Templates
- */
-package org.eclipse.jst.j2ee.tests.performance;
-
-import java.io.File;
-import java.io.PrintWriter;
-import java.io.StringWriter;
-import java.lang.reflect.Constructor;
-import java.lang.reflect.InvocationTargetException;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-
-import junit.framework.Test;
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
-
-import org.eclipse.wst.common.tests.BaseTestCase;
-
-/**
- * @author Admin
- *
- * TODO To change the template for this generated type comment go to
- * Window - Preferences - Java - Code Style - Code Templates
- */
-public abstract class BasePerformanceTestCase extends BaseTestCase {
- protected static Map performanceClass = null;
- static ClassLoader clazzLoader = null;
- protected static String file= null;
- public static Test suite() {
- performanceClass = null;
- return createTestSuites() ;
- }
- /**
- *
- */
- private static Test createTestSuites() {
- createPerformanceClass();
- TestSuite suite = new TestSuite();
- for (Iterator iter = performanceClass.keySet().iterator(); iter.hasNext();) {
- Class clazz = (Class) iter.next();
- List methodList = (List)performanceClass.get(clazz);
- for (int x=0; x< methodList.size(); ++x) {
- PerformanceTestObject testObject = (PerformanceTestObject)methodList.get(x);
- Test test = createTest(clazz,testObject.getName());
- if (test instanceof BaseTestCase) {
- suite.addTest(new PerformanceTestCaseWrapper((BaseTestCase)test, testObject.getTagging() , testObject.getShortName()));
- }
- }
- }
- return suite;
- }
-
- static public Test createTest(Class theClass, String name) {
- Constructor constructor;
- try {
- constructor= getTestConstructor(theClass);
- } catch (NoSuchMethodException e) {
- return warning("Class "+theClass.getName()+" has no public constructor TestCase(String name) or TestCase()");
- }
- Object test;
- try {
- if (constructor.getParameterTypes().length == 0) {
- test= constructor.newInstance(new Object[0]);
- if (test instanceof TestCase)
- ((TestCase) test).setName(name);
- } else {
- test= constructor.newInstance(new Object[]{name});
- }
- } catch (InstantiationException e) {
- return(warning("Cannot instantiate test case: "+name+" ("+exceptionToString(e)+")"));
- } catch (InvocationTargetException e) {
- return(warning("Exception in constructor: "+name+" ("+exceptionToString(e.getTargetException())+")"));
- } catch (IllegalAccessException e) {
- return(warning("Cannot access test case: "+name+" ("+exceptionToString(e)+")"));
- }
- return (Test) test;
- }
-
- /**
- * Returns a test which will fail and log a warning message.
- */
- private static Test warning(final String message) {
- return new TestCase("warning") {
- protected void runTest() {
- fail(message);
- }
- };
- }
-
- public static Constructor getTestConstructor(Class theClass) throws NoSuchMethodException {
- Class[] args= { String.class };
- try {
- return theClass.getConstructor(args);
- } catch (NoSuchMethodException e) {
- // fall through
- }
- return theClass.getConstructor(new Class[0]);
- }
-
- private static String exceptionToString(Throwable t) {
- StringWriter stringWriter= new StringWriter();
- PrintWriter writer= new PrintWriter(stringWriter);
- t.printStackTrace(writer);
- return stringWriter.toString();
-
- }
- /**
- * @param performanceClass2
- */
-
- public static Map getPerformanceClass() {
- if (performanceClass == null) {
- createPerformanceClass();
- }
- return performanceClass;
- }
-
-
- protected static void createPerformanceClass() {
- if (performanceClass == null) {
- performanceClass = new TestCaseSAXParser().doLoad(new File(file));
- }
- }
-
-
- /**
- * @return Returns the clazzLoader.
- */
- public static ClassLoader getClassLoader() {
- return clazzLoader;
- }
- /**
- * @param clazzLoader The clazzLoader to set.
- */
- public static void setClassLoader(ClassLoader clazzLoader) {
- BasePerformanceTestCase.clazzLoader = clazzLoader;
- }
- /**
- * @return Returns the file.
- */
- public static String getFile() {
- return file;
- }
- /**
- * @param file The file to set.
- */
- public static void setFile(String file) {
- BasePerformanceTestCase.file = file;
- }
-
- /**
- * @param suite
- * @param test
- * @param global
- * @param string
- */
- protected static void addPerformanceTest(TestSuite suite, BaseTestCase test, int tagging, String shortName) {
- PerformanceTestCaseWrapper testCase = new PerformanceTestCaseWrapper(test, tagging , shortName);
- suite.addTest(testCase);
- }
-}
diff --git a/tests/org.eclipse.jst.j2ee.tests.performance/common/org/eclipse/jst/j2ee/tests/performance/EJBProjectCreationTestCase.java b/tests/org.eclipse.jst.j2ee.tests.performance/common/org/eclipse/jst/j2ee/tests/performance/EJBProjectCreationTestCase.java
deleted file mode 100644
index f6d4dc4..0000000
--- a/tests/org.eclipse.jst.j2ee.tests.performance/common/org/eclipse/jst/j2ee/tests/performance/EJBProjectCreationTestCase.java
+++ /dev/null
@@ -1,30 +0,0 @@
-package org.eclipse.jst.j2ee.tests.performance;
-
-import org.eclipse.test.performance.Dimension;
-import org.eclipse.test.performance.PerformanceTestCase;
-import org.eclipse.wtp.j2ee.headless.tests.ejb.operations.EJBProjectCreationOperationTest;
-import org.eclipse.wtp.j2ee.headless.tests.j2ee.operations.JavaEEFacetConstants;
-
-public class EJBProjectCreationTestCase extends PerformanceTestCase {
-
- public void testEJB30_Defaults() throws Exception {
- Dimension[] dims = new Dimension[] { Dimension.ELAPSED_PROCESS, Dimension.USED_JAVA_HEAP };
- tagAsGlobalSummary("EJB project creation", dims);
- startMeasuring();
-
- // Create an EJB 3.0 project with default settings
- EJBProjectCreationOperationTest.
- getEJBDataModel("ejb30_defaults", /* projName */
- null, /* clientName */
- null, /* clientSourceFolder */
- null, /* earName */
- JavaEEFacetConstants.EJB_3, /* version */
- false /* createDD */
- );
-
- stopMeasuring();
- commitMeasurements();
- assertPerformance();
- }
-
-}
diff --git a/tests/org.eclipse.jst.j2ee.tests.performance/common/org/eclipse/jst/j2ee/tests/performance/HeaderParserPerformanceTest.java b/tests/org.eclipse.jst.j2ee.tests.performance/common/org/eclipse/jst/j2ee/tests/performance/HeaderParserPerformanceTest.java
deleted file mode 100644
index 33a76e1..0000000
--- a/tests/org.eclipse.jst.j2ee.tests.performance/common/org/eclipse/jst/j2ee/tests/performance/HeaderParserPerformanceTest.java
+++ /dev/null
@@ -1,132 +0,0 @@
-package org.eclipse.jst.j2ee.tests.performance;
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.InputStream;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-
-import junit.framework.Assert;
-
-import org.eclipse.jst.j2ee.internal.J2EEVersionConstants;
-import org.eclipse.jst.jee.util.internal.JavaEEQuickPeek;
-import org.eclipse.wst.common.tests.ProjectUtility;
-import org.eclipse.wtp.j2ee.headless.tests.plugin.HeadlessTestsPlugin;
-
-public class HeaderParserPerformanceTest {
- private static final String DATA_DIR = "TestData" + java.io.File.separatorChar + "headerParserTestData" + java.io.File.separatorChar;
-
- public void testSpeed() throws Exception {
- List data = getXMLData();
- long[] times = new long[data.size()];
- InputStream in = null;
-
- for (int i = 0; i < data.size(); i++) {
- try {
- TestData testData = (TestData) data.get(i);
- in = new FileInputStream(new File(getDataPath(testData.fileName)));
- long start = System.currentTimeMillis();
- JavaEEQuickPeek peek = new JavaEEQuickPeek(in);
- long end = System.currentTimeMillis();
- times[i] = end - start;
- if (times[i] == 0) {
- times[i] = 10; // stub in a minimum time
- }
- Assert.assertEquals(testData.type, peek.getType());
- Assert.assertEquals(testData.modVersion, peek.getVersion());
- Assert.assertEquals(testData.eeVersion, peek.getJavaEEVersion());
- } finally {
- if (in != null) {
- in.close();
- }
- }
- }
- // all times should be the same
- Arrays.sort(times);
- if (times[0] * 2 < times[times.length - 1]) {
- Assert.fail();
- }
- }
-
- private List getXMLData() {
- List data = new ArrayList();
- data.add(new TestData("application-client12.xml", J2EEVersionConstants.APPLICATION_CLIENT_TYPE, J2EEVersionConstants.J2EE_1_2_ID, J2EEVersionConstants.J2EE_1_2_ID));
- data.add(new TestData("application-client13.xml", J2EEVersionConstants.APPLICATION_CLIENT_TYPE, J2EEVersionConstants.J2EE_1_3_ID, J2EEVersionConstants.J2EE_1_3_ID));
- data.add(new TestData("application-client14.xml", J2EEVersionConstants.APPLICATION_CLIENT_TYPE, J2EEVersionConstants.J2EE_1_4_ID, J2EEVersionConstants.J2EE_1_4_ID));
- data.add(new TestData("application-client5.xml", J2EEVersionConstants.APPLICATION_CLIENT_TYPE, J2EEVersionConstants.JEE_5_0_ID, J2EEVersionConstants.JEE_5_0_ID));
-
- data.add(new TestData("application12.xml", J2EEVersionConstants.APPLICATION_TYPE, J2EEVersionConstants.J2EE_1_2_ID, J2EEVersionConstants.J2EE_1_2_ID));
- data.add(new TestData("application13.xml", J2EEVersionConstants.APPLICATION_TYPE, J2EEVersionConstants.J2EE_1_3_ID, J2EEVersionConstants.J2EE_1_3_ID));
- data.add(new TestData("application14.xml", J2EEVersionConstants.APPLICATION_TYPE, J2EEVersionConstants.J2EE_1_4_ID, J2EEVersionConstants.J2EE_1_4_ID));
- data.add(new TestData("application5.xml", J2EEVersionConstants.APPLICATION_TYPE, J2EEVersionConstants.JEE_5_0_ID, J2EEVersionConstants.JEE_5_0_ID));
-
- data.add(new TestData("ejb-jar11.xml", J2EEVersionConstants.EJB_TYPE, J2EEVersionConstants.EJB_1_1_ID, J2EEVersionConstants.J2EE_1_2_ID));
- data.add(new TestData("ejb-jar20.xml", J2EEVersionConstants.EJB_TYPE, J2EEVersionConstants.EJB_2_0_ID, J2EEVersionConstants.J2EE_1_3_ID));
- data.add(new TestData("ejb-jar21.xml", J2EEVersionConstants.EJB_TYPE, J2EEVersionConstants.EJB_2_1_ID, J2EEVersionConstants.J2EE_1_4_ID));
- data.add(new TestData("ejb-jar30.xml", J2EEVersionConstants.EJB_TYPE, J2EEVersionConstants.EJB_3_0_ID, J2EEVersionConstants.JEE_5_0_ID));
-
- data.add(new TestData("ra10.xml", J2EEVersionConstants.CONNECTOR_TYPE, J2EEVersionConstants.JCA_1_0_ID, J2EEVersionConstants.J2EE_1_3_ID));
- data.add(new TestData("ra15.xml", J2EEVersionConstants.CONNECTOR_TYPE, J2EEVersionConstants.JCA_1_5_ID, J2EEVersionConstants.J2EE_1_4_ID));
-
- data.add(new TestData("web22.xml", J2EEVersionConstants.WEB_TYPE, J2EEVersionConstants.WEB_2_2_ID, J2EEVersionConstants.J2EE_1_2_ID));
- data.add(new TestData("web23.xml", J2EEVersionConstants.WEB_TYPE, J2EEVersionConstants.WEB_2_3_ID, J2EEVersionConstants.J2EE_1_3_ID));
- data.add(new TestData("web24.xml", J2EEVersionConstants.WEB_TYPE, J2EEVersionConstants.WEB_2_4_ID, J2EEVersionConstants.J2EE_1_4_ID));
- data.add(new TestData("web25.xml", J2EEVersionConstants.WEB_TYPE, J2EEVersionConstants.WEB_2_5_ID, J2EEVersionConstants.JEE_5_0_ID));
-
- // test some bogus dds as well
- data.add(new TestData("notxml.xml", J2EEVersionConstants.UNKNOWN, J2EEVersionConstants.UNKNOWN, J2EEVersionConstants.UNKNOWN));
- data.add(new TestData("notjavaee.xml", J2EEVersionConstants.UNKNOWN, J2EEVersionConstants.UNKNOWN, J2EEVersionConstants.UNKNOWN));
-
- data.add(new TestData("application-client0.xml", J2EEVersionConstants.APPLICATION_CLIENT_TYPE, J2EEVersionConstants.UNKNOWN, J2EEVersionConstants.UNKNOWN));
- data.add(new TestData("application-client00.xml", J2EEVersionConstants.APPLICATION_CLIENT_TYPE, J2EEVersionConstants.UNKNOWN, J2EEVersionConstants.UNKNOWN));
- data.add(new TestData("application-client000.xml", J2EEVersionConstants.APPLICATION_CLIENT_TYPE, J2EEVersionConstants.UNKNOWN, J2EEVersionConstants.UNKNOWN));
-
- data.add(new TestData("application0.xml", J2EEVersionConstants.APPLICATION_TYPE, J2EEVersionConstants.UNKNOWN, J2EEVersionConstants.UNKNOWN));
- data.add(new TestData("application00.xml", J2EEVersionConstants.APPLICATION_TYPE, J2EEVersionConstants.UNKNOWN, J2EEVersionConstants.UNKNOWN));
- data.add(new TestData("application000.xml", J2EEVersionConstants.APPLICATION_TYPE, J2EEVersionConstants.UNKNOWN, J2EEVersionConstants.UNKNOWN));
-
- data.add(new TestData("ejb-jar0.xml", J2EEVersionConstants.EJB_TYPE, J2EEVersionConstants.UNKNOWN, J2EEVersionConstants.UNKNOWN));
- data.add(new TestData("ejb-jar00.xml", J2EEVersionConstants.EJB_TYPE, J2EEVersionConstants.UNKNOWN, J2EEVersionConstants.UNKNOWN));
- data.add(new TestData("ejb-jar000.xml", J2EEVersionConstants.EJB_TYPE, J2EEVersionConstants.UNKNOWN, J2EEVersionConstants.UNKNOWN));
-
- data.add(new TestData("ra0.xml", J2EEVersionConstants.CONNECTOR_TYPE, J2EEVersionConstants.UNKNOWN, J2EEVersionConstants.UNKNOWN));
- data.add(new TestData("ra00.xml", J2EEVersionConstants.CONNECTOR_TYPE, J2EEVersionConstants.UNKNOWN, J2EEVersionConstants.UNKNOWN));
- data.add(new TestData("ra000.xml", J2EEVersionConstants.CONNECTOR_TYPE, J2EEVersionConstants.UNKNOWN, J2EEVersionConstants.UNKNOWN));
-
- data.add(new TestData("web0.xml", J2EEVersionConstants.WEB_TYPE, J2EEVersionConstants.UNKNOWN, J2EEVersionConstants.UNKNOWN));
- data.add(new TestData("web00.xml", J2EEVersionConstants.WEB_TYPE, J2EEVersionConstants.UNKNOWN, J2EEVersionConstants.UNKNOWN));
- data.add(new TestData("web000.xml", J2EEVersionConstants.WEB_TYPE, J2EEVersionConstants.UNKNOWN, J2EEVersionConstants.UNKNOWN));
- return data;
- }
-
- protected String getDataPath(String shortName) throws Exception {
- HeadlessTestsPlugin plugin = HeadlessTestsPlugin.getDefault();
- String pluginRelativeFileName = DATA_DIR + java.io.File.separatorChar + shortName;
- return ProjectUtility.getFullFileName(plugin, pluginRelativeFileName);
- }
-
- private class TestData {
- String fileName;
-
- int type;
-
- int modVersion;
-
- int eeVersion;
-
- Class modelObjectInterface;
-
- public TestData(String fileName, int type, int modVersion, int eeVersion) {
- this.fileName = fileName;
- this.type = type;
- this.modVersion = modVersion;
- this.eeVersion = eeVersion;
- }
-
- public TestData(String fileName, int type, int modVersion, int eeVersion, Class modelTypeClass) {
- this(fileName, type, modVersion, eeVersion);
- this.modelObjectInterface = modelTypeClass;
- }
- }
-}
diff --git a/tests/org.eclipse.jst.j2ee.tests.performance/common/org/eclipse/jst/j2ee/tests/performance/PerformancePlugin.java b/tests/org.eclipse.jst.j2ee.tests.performance/common/org/eclipse/jst/j2ee/tests/performance/PerformancePlugin.java
deleted file mode 100644
index cd55b79..0000000
--- a/tests/org.eclipse.jst.j2ee.tests.performance/common/org/eclipse/jst/j2ee/tests/performance/PerformancePlugin.java
+++ /dev/null
@@ -1,74 +0,0 @@
-package org.eclipse.jst.j2ee.tests.performance;
-
-import java.util.MissingResourceException;
-import java.util.ResourceBundle;
-
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.osgi.framework.BundleContext;
-
-/**
- * The main plugin class to be used in the desktop.
- */
-public class PerformancePlugin extends AbstractUIPlugin {
- //The shared instance.
- private static PerformancePlugin plugin;
- //Resource bundle.
- private ResourceBundle resourceBundle;
-
- /**
- * The constructor.
- */
- public PerformancePlugin() {
- super();
- plugin = this;
- }
-
- /**
- * This method is called upon plug-in activation
- */
- public void start(BundleContext context) throws Exception {
- super.start(context);
- }
-
- /**
- * This method is called when the plug-in is stopped
- */
- public void stop(BundleContext context) throws Exception {
- super.stop(context);
- plugin = null;
- resourceBundle = null;
- }
-
- /**
- * Returns the shared instance.
- */
- public static PerformancePlugin getDefault() {
- return plugin;
- }
-
- /**
- * Returns the string from the plugin's resource bundle,
- * or 'key' if not found.
- */
- public static String getResourceString(String key) {
- ResourceBundle bundle = PerformancePlugin.getDefault().getResourceBundle();
- try {
- return (bundle != null) ? bundle.getString(key) : key;
- } catch (MissingResourceException e) {
- return key;
- }
- }
-
- /**
- * Returns the plugin's resource bundle,
- */
- public ResourceBundle getResourceBundle() {
- try {
- if (resourceBundle == null)
- resourceBundle = ResourceBundle.getBundle("org.eclipse.jst.j2ee.tests.performance.PerformancePluginResources");
- } catch (MissingResourceException x) {
- resourceBundle = null;
- }
- return resourceBundle;
- }
-}
diff --git a/tests/org.eclipse.jst.j2ee.tests.performance/common/org/eclipse/jst/j2ee/tests/performance/PerformanceTestCaseWrapper.java b/tests/org.eclipse.jst.j2ee.tests.performance/common/org/eclipse/jst/j2ee/tests/performance/PerformanceTestCaseWrapper.java
deleted file mode 100644
index df87c89..0000000
--- a/tests/org.eclipse.jst.j2ee.tests.performance/common/org/eclipse/jst/j2ee/tests/performance/PerformanceTestCaseWrapper.java
+++ /dev/null
@@ -1,162 +0,0 @@
-/*
- * Created on Nov 24, 2004
- *
- * TODO To change the template for this generated file go to
- * Window - Preferences - Java - Code Style - Code Templates
- */
-package org.eclipse.jst.j2ee.tests.performance;
-
-import junit.framework.Test;
-
-import org.eclipse.test.performance.Dimension;
-import org.eclipse.test.performance.Performance;
-import org.eclipse.test.performance.PerformanceTestCase;
-import org.eclipse.wst.common.tests.BaseTestCase;
-
-/**
- * @author Admin
- *
- * TODO To change the template for this generated type comment go to
- * Window - Preferences - Java - Code Style - Code Templates
- */
-public class PerformanceTestCaseWrapper extends PerformanceTestCase {
- protected BaseTestCase fTest;
- public static final int NONE = 0;
- public static final int LOCAL = 1;
- public static final int GLOBAL = 2;
-
- private boolean tagAsGlobalSummary;
- private boolean tagAsSummary;
- private String shortName;
-
- public static final int ITERATIONS = 10;
-
- public PerformanceTestCaseWrapper(BaseTestCase test,
- int tagging,
- String shortName) {
- fTest=test;
- tagAsGlobalSummary = ((tagging & GLOBAL) != 0);
- tagAsSummary = ((tagging & LOCAL) != 0);
- this.shortName = shortName;
- }
-
- public int countTestCases() {
- return fTest.countTestCases();
- }
-
- public String toString() {
- return fTest.toString();
- }
-
- public Test getTest() {
- return fTest;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.test.performance.PerformanceTestCase#setUp()
- */
- protected void setUp() throws Exception {
- fTest.setUpTest();
- }
-
- protected void basicSetUp() throws Exception {
- Performance performance= Performance.getDefault();
- fPerformanceMeter= performance.createPerformanceMeter(performance.getDefaultScenarioId(fTest));
- }
-
-
- /**
- * Runs the bare test sequence.
- * @exception Throwable if any exception is thrown
- */
- public void runBare() throws Throwable {
- basicSetUp();
- tagIfNecessary(shortName, Dimension.CPU_TIME);
- try {
- for (int i= 0; i < ITERATIONS; i++) {
- setUp();
- startMeasuring();
- runTest();
- stopMeasuring();
- }
- } catch (Throwable t) {
- // log the error, thrown by the JUnit test, in the console and re-throw it
- t.printStackTrace();
- throw t;
- } finally {
- commitMeasurements();
- assertPerformance();
- tearDown();
- }
- }
-
- /* (non-Javadoc)
- * @see junit.framework.TestCase#runTest()
- */
- protected void runTest() throws Throwable {
- // TODO Auto-generated method stub
- fTest.runCoreTest();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.test.performance.PerformanceTestCase#tearDown()
- */
- protected void tearDown() throws Exception {
- // TODO Auto-generated method stub
- fTest.tearDownTest();
- }
-
- /* (non-Javadoc)
- * @see junit.framework.TestCase#setName(java.lang.String)
- */
- public void setName(String name) {
- // TODO Auto-generated method stub
- fTest.setName(name);
- }
-
- /* (non-Javadoc)
- * @see junit.framework.TestCase#getName()
- */
- public String getName() {
- // TODO Auto-generated method stub
- return fTest.getName();
- }
-
- /**
- * Answers whether this test should be tagged globally.
- *
- * @return whether this test should be tagged globally
- */
- private boolean shouldGloballyTag() {
- return tagAsGlobalSummary;
- }
-
- /**
- * Answers whether this test should be tagged locally.
- *
- * @return whether this test should be tagged locally
- */
- private boolean shouldLocallyTag() {
- return tagAsSummary;
- }
-
- public void tagIfNecessary(String shortName, Dimension dimension) {
- if (shouldGloballyTag()) {
- tagAsGlobalSummary(shortName, dimension);
- }
- if (shouldLocallyTag()) {
- tagAsSummary(shortName, dimension);
- }
- }
-
- public void tagIfNecessary(String shortName, Dimension [] dimensions) {
- if (shouldGloballyTag()) {
- tagAsGlobalSummary(shortName, dimensions);
- }
- if (shouldLocallyTag()) {
- tagAsSummary(shortName, dimensions);
- }
- }
-
-
-}
diff --git a/tests/org.eclipse.jst.j2ee.tests.performance/common/org/eclipse/jst/j2ee/tests/performance/PerformanceTestObject.java b/tests/org.eclipse.jst.j2ee.tests.performance/common/org/eclipse/jst/j2ee/tests/performance/PerformanceTestObject.java
deleted file mode 100644
index 803934e..0000000
--- a/tests/org.eclipse.jst.j2ee.tests.performance/common/org/eclipse/jst/j2ee/tests/performance/PerformanceTestObject.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Created on Nov 26, 2004
- *
- * TODO To change the template for this generated file go to
- * Window - Preferences - Java - Code Style - Code Templates
- */
-package org.eclipse.jst.j2ee.tests.performance;
-
-/**
- * @author Admin
- *
- * TODO To change the template for this generated type comment go to
- * Window - Preferences - Java - Code Style - Code Templates
- */
-public class PerformanceTestObject {
- int tagging;
- String shortName;
- String name;
- /**
- *
- */
- public PerformanceTestObject(String name,int tagging, String shortname) {
- super();
- this.tagging = tagging;
- this.name = name;
- this.shortName = shortname;
- }
-
- /**
- * @return Returns the name.
- */
- public String getName() {
- return name;
- }
- /**
- * @return Returns the shortName.
- */
- public String getShortName() {
- return shortName;
- }
- /**
- * @return Returns the tagging.
- */
- public int getTagging() {
- return tagging;
- }
-}
diff --git a/tests/org.eclipse.jst.j2ee.tests.performance/common/org/eclipse/jst/j2ee/tests/performance/PerformanceTestSuite.java b/tests/org.eclipse.jst.j2ee.tests.performance/common/org/eclipse/jst/j2ee/tests/performance/PerformanceTestSuite.java
deleted file mode 100644
index ca28315..0000000
--- a/tests/org.eclipse.jst.j2ee.tests.performance/common/org/eclipse/jst/j2ee/tests/performance/PerformanceTestSuite.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/**
- *
- */
-package org.eclipse.jst.j2ee.tests.performance;
-
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
-import org.eclipse.wst.common.tests.BaseTestCase;
-
-/**
- * @author itewk
- *
- */
-public class PerformanceTestSuite extends TestSuite {
- private static final String DEFAULT_SIMPLE_NAME = "Performance Test";
-
- /**
- *
- * @param name
- */
- public PerformanceTestSuite(String name) {
- super(name);
- }
-
- public void addTest(Test test) {
- //must be a BaseTestCase so it can be wrapped in a PerformanceTestCaseWrapper
- if(test instanceof BaseTestCase) {
- PerformanceTestCaseWrapper performanceTest = new PerformanceTestCaseWrapper(
- (BaseTestCase)test,PerformanceTestCaseWrapper.GLOBAL,DEFAULT_SIMPLE_NAME);
- super.addTest(performanceTest);
- }
- }
-
- /**
- *
- */
- public void addTest(Test test, String simpleName) {
- //must be a BaseTestCase so it can be wrapped in a PerformanceTestCaseWrapper
- if(test instanceof BaseTestCase) {
- PerformanceTestCaseWrapper performanceTest = new PerformanceTestCaseWrapper(
- (BaseTestCase)test,PerformanceTestCaseWrapper.GLOBAL,simpleName);
- super.addTest(performanceTest);
- }
- }
-}
diff --git a/tests/org.eclipse.jst.j2ee.tests.performance/common/org/eclipse/jst/j2ee/tests/performance/TestCaseSAXParser.java b/tests/org.eclipse.jst.j2ee.tests.performance/common/org/eclipse/jst/j2ee/tests/performance/TestCaseSAXParser.java
deleted file mode 100644
index 3189ea0..0000000
--- a/tests/org.eclipse.jst.j2ee.tests.performance/common/org/eclipse/jst/j2ee/tests/performance/TestCaseSAXParser.java
+++ /dev/null
@@ -1,139 +0,0 @@
-/*
- * Created on Nov 29, 2004
- *
- * TODO To change the template for this generated file go to
- * Window - Preferences - Java - Code Style - Code Templates
- */
-package org.eclipse.jst.j2ee.tests.performance;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import javax.xml.parsers.ParserConfigurationException;
-import javax.xml.parsers.SAXParser;
-import javax.xml.parsers.SAXParserFactory;
-
-import org.xml.sax.Attributes;
-import org.xml.sax.SAXException;
-import org.xml.sax.helpers.DefaultHandler;
-
-/**
- * @author Admin
- *
- * TODO To change the template for this generated type comment go to
- * Window - Preferences - Java - Code Style - Code Templates
- */
-public class TestCaseSAXParser extends DefaultHandler {
- private static Map performanceCases = null;
- private static final String TEST_CASE = "testCase";
- private static final String CLASS = "class";
- private static final String METHOD = "method";
- private static final String SHORT_NAME = "shortName";
- private static final String TAGGING = "tagging";
- private static final String METHOD_NAME = "name";
- private static final String GLOBAL = "GLOBAL";
- private static final String LOCAL = "LOCAL";
- private static Class currentClazz = null;
-
-
-
- public Map doLoad(File file) {
- performanceCases = new HashMap();
- DefaultHandler handler = new TestCaseSAXParser();
- SAXParserFactory factory = SAXParserFactory.newInstance();
- try {
- SAXParser saxParser = factory.newSAXParser();
- saxParser.parse(file , handler );
- }
- catch (ParserConfigurationException ex) {
- System.err.println ("Failed to create SAX parser:" + ex);
- }
- catch (SAXException ex) {
- System.err.println ("SAX parser exceeption:" + ex);
- }
- catch (IOException ex) {
- System.err.println ("IO exeception:" + ex);
- }
- catch (IllegalArgumentException ex) {
- System.err.println ("Invalid file argument" + ex);
- }
- return performanceCases;
- }
-
- public void startElement(String uri, String localName,
- String qualifiedName, Attributes attributes) throws SAXException {
- if (qualifiedName.equals(TEST_CASE)) {
- for (int i = 0; i< attributes.getLength(); i++) {
- if (attributes.getQName(i).equalsIgnoreCase(CLASS)) {
- try {
- currentClazz = loadClass(attributes.getValue(i));
- if (performanceCases.get(currentClazz) == null) {
- ArrayList methodList = new ArrayList();
- performanceCases.put(currentClazz,methodList);
- }
- } catch (ClassNotFoundException e) {
- currentClazz = null;
- System.err.println ("Failed to load class:" + attributes.getValue(i));
- //e.printStackTrace();
- }
- } // end of if
- } // end of for
- } // end of if TEST_CASE
- else if (qualifiedName.equalsIgnoreCase(METHOD)) {
- String methodName = null;
- int tagging = 0;
- String shortName = null;
-
- if (currentClazz == null) return;
-
- for (int i = 0; i< attributes.getLength(); i++) {
- if (attributes.getQName(i).equalsIgnoreCase(METHOD_NAME)) {
- methodName = attributes.getValue(i);
- }
- else if (attributes.getQName(i).equalsIgnoreCase(TAGGING)){
- if (attributes.getValue(i).equalsIgnoreCase(GLOBAL)) {
- tagging = PerformanceTestCaseWrapper.GLOBAL;
- } else if (attributes.getValue(i).equalsIgnoreCase(LOCAL)) {
- tagging = PerformanceTestCaseWrapper.LOCAL;
- } else {
- tagging = PerformanceTestCaseWrapper.NONE;
- }
- } else if(attributes.getQName(i).equalsIgnoreCase(SHORT_NAME)) {
- shortName = attributes.getValue(i);
- }
- } // end of for
- List methodList = (List) performanceCases.get(currentClazz);
- methodList.add(new PerformanceTestObject(methodName,tagging,shortName));
- }
- }
-
- public void endElement(String uri, String localName, String qualifiedName)
- throws SAXException {
- if (qualifiedName.equals(TEST_CASE)) {
- currentClazz = null;
- }
- }
-
- /**
- * Loads the test suite class.
- */
- private Class loadClass(String className) throws ClassNotFoundException {
- if (className == null)
- return null;
- return getClassLoader().loadClass(className);
- }
-
- /**
- * The class loader to be used for loading tests.
- * Subclasses may override to use another class loader.
- */
- protected ClassLoader getClassLoader() {
- return BasePerformanceTestCase.getClassLoader();
- }
-
-}
-
diff --git a/tests/org.eclipse.jst.j2ee.tests.performance/common/org/eclipse/jst/j2ee/tests/performance/WTPHeadlessPerformanceTests.java b/tests/org.eclipse.jst.j2ee.tests.performance/common/org/eclipse/jst/j2ee/tests/performance/WTPHeadlessPerformanceTests.java
deleted file mode 100644
index 518cdc0..0000000
--- a/tests/org.eclipse.jst.j2ee.tests.performance/common/org/eclipse/jst/j2ee/tests/performance/WTPHeadlessPerformanceTests.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/**
- *
- */
-package org.eclipse.jst.j2ee.tests.performance;
-
-import junit.framework.Test;
-
-import org.eclipse.wtp.j2ee.headless.tests.ear.operations.EARProjectCreationOperationTest;
-
-/**
- * @author itewk
- *
- */
-public class WTPHeadlessPerformanceTests extends PerformanceTestSuite {
- public WTPHeadlessPerformanceTests() {
- super("All WTP Headless Performances Tests");
-
- addTest(new EARProjectCreationOperationTest("testEAR14_WithDependencies"), "Test EAR 1.4 Project Creation with Dependincies");
- }
-
- public static Test suite(){
- return new WTPHeadlessPerformanceTests();
- }
-}
diff --git a/tests/org.eclipse.jst.j2ee.tests.performance/plugin.xml b/tests/org.eclipse.jst.j2ee.tests.performance/plugin.xml
deleted file mode 100644
index 45e55bd..0000000
--- a/tests/org.eclipse.jst.j2ee.tests.performance/plugin.xml
+++ /dev/null
@@ -1,27 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.0"?>
-<plugin
- id="org.eclipse.jst.j2ee.tests.performance"
- name="Performance Plug-in"
- version="1.1.0"
- provider-name=""
- class="org.eclipse.jst.j2ee.tests.performance.PerformancePlugin">
-
- <runtime>
- <library name="performance.jar">
- <export name="*"/>
- </library>
- </runtime>
-
- <requires>
- <import plugin="org.eclipse.ui"/>
- <import plugin="org.eclipse.core.runtime"/>
- <import plugin="org.eclipse.test.performance"/>
- <import plugin="org.junit"/>
- <import plugin="org.eclipse.wst.common.tests"/>
- <import plugin="org.eclipse.jst.j2ee.core"/>
- <import plugin="org.eclipse.jst.j2ee.tests"/>
- <import plugin="org.eclipse.wst.common.project.facet.core"/>
- </requires>
-
-</plugin>
diff --git a/tests/org.eclipse.jst.j2ee.tests/META-INF/MANIFEST.MF b/tests/org.eclipse.jst.j2ee.tests/META-INF/MANIFEST.MF
index 7e1f832..dd70398 100644
--- a/tests/org.eclipse.jst.j2ee.tests/META-INF/MANIFEST.MF
+++ b/tests/org.eclipse.jst.j2ee.tests/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@
Bundle-ManifestVersion: 2
Bundle-Name: J2EE Tests Plug-in
Bundle-SymbolicName: org.eclipse.jst.j2ee.tests; singleton:=true
-Bundle-Version: 1.1.401.qualifier
+Bundle-Version: 1.1.402.qualifier
Bundle-ClassPath: j2ee-tests.jar
Bundle-Activator: org.eclipse.wtp.j2ee.headless.tests.plugin.HeadlessTestsPlugin
Bundle-Localization: plugin
diff --git a/tests/org.eclipse.jst.j2ee.tests/defect-tests/org/eclipse/jst/j2ee/defect/tests/DefectVerificationTests.java b/tests/org.eclipse.jst.j2ee.tests/defect-tests/org/eclipse/jst/j2ee/defect/tests/DefectVerificationTests.java
index 2baca4f..1cc85e0 100644
--- a/tests/org.eclipse.jst.j2ee.tests/defect-tests/org/eclipse/jst/j2ee/defect/tests/DefectVerificationTests.java
+++ b/tests/org.eclipse.jst.j2ee.tests/defect-tests/org/eclipse/jst/j2ee/defect/tests/DefectVerificationTests.java
@@ -225,9 +225,7 @@
}
}
-/*
Assert.assertTrue(foundImportedClasses);
-*/
}
/**
diff --git a/tests/org.eclipse.jst.j2ee.tests/j2ee-tests/org/eclipse/jst/j2ee/classpath/tests/AllTests.java b/tests/org.eclipse.jst.j2ee.tests/j2ee-tests/org/eclipse/jst/j2ee/classpath/tests/AllTests.java
index b7cdc7a..3fee11e 100644
--- a/tests/org.eclipse.jst.j2ee.tests/j2ee-tests/org/eclipse/jst/j2ee/classpath/tests/AllTests.java
+++ b/tests/org.eclipse.jst.j2ee.tests/j2ee-tests/org/eclipse/jst/j2ee/classpath/tests/AllTests.java
@@ -22,8 +22,7 @@
suite.addTest(ClasspathDependencyCreationTests.suite());
//suite.addTest(ClasspathDependencyValidationTests.suite());
suite.addTest(ClasspathDependencyEARTests.suite());
- //[Bug 234409] Temporarily removing these tests until underlying issue is fixed
-// suite.addTest(ClasspathDependencyWebTests.suite());
+ suite.addTest(ClasspathDependencyWebTests.suite());
return suite;
}
diff --git a/tests/org.eclipse.jst.j2ee.tests/j2ee-tests/org/eclipse/jst/j2ee/classpath/tests/ClasspathDependencyEARTests.java b/tests/org.eclipse.jst.j2ee.tests/j2ee-tests/org/eclipse/jst/j2ee/classpath/tests/ClasspathDependencyEARTests.java
index 277673d..adb15ed 100644
--- a/tests/org.eclipse.jst.j2ee.tests/j2ee-tests/org/eclipse/jst/j2ee/classpath/tests/ClasspathDependencyEARTests.java
+++ b/tests/org.eclipse.jst.j2ee.tests/j2ee-tests/org/eclipse/jst/j2ee/classpath/tests/ClasspathDependencyEARTests.java
@@ -16,6 +16,9 @@
import java.util.List;
import java.util.Set;
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IFolder;
import org.eclipse.core.resources.IProject;
@@ -37,6 +40,7 @@
import org.eclipse.jst.j2ee.dependency.tests.util.DependencyCreationUtil;
import org.eclipse.jst.j2ee.dependency.tests.util.ProjectUtil;
import org.eclipse.jst.j2ee.internal.J2EEVersionConstants;
+import org.eclipse.jst.j2ee.internal.classpathdep.ClasspathDependencyEnablement;
import org.eclipse.jst.j2ee.internal.deployables.J2EEFlexProjDeployable;
import org.eclipse.wst.common.componentcore.ComponentCore;
import org.eclipse.wst.common.componentcore.resources.IVirtualComponent;
@@ -46,9 +50,6 @@
import org.eclipse.wst.server.core.model.IModuleResource;
import org.eclipse.wst.server.core.util.ProjectModule;
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
/**
* Tests export and publish behavior for classpath component dependencies on the module projects associated with an EAR.
*/
@@ -69,6 +70,7 @@
//suite.addTest(new ClasspathDependencyEARTests("testEARExportJEE5"));
suite.addTest(new ClasspathDependencyEARTests("testEARPublishJ2EE"));
suite.addTest(new ClasspathDependencyEARTests("testEARPublishJEE5"));
+ suite.addTest(new ClasspathDependencyEARTests("testEARLibPublishJEE5"));
return suite;
}
@@ -97,7 +99,7 @@
// add the attribute to the cp container and "bin" class folder in the utility project and to the "bin" class
// folder in the web project
- addDependencyAttribute();
+ addDependencyAttribute(true);
// verify that the exported EAR does contain the cp container Jars from the utility,
// that the utility MANIFEST classpath includes entries for the cp container
@@ -188,6 +190,10 @@
testEARPublish(true);
}
+ public void testEARLibPublishJEE5() throws Exception {
+ testEARLibPublishJEE5(true);
+ }
+
private void testEARPublish(boolean JEE5) throws Exception {
// create the EAR and module projects
@@ -201,24 +207,53 @@
// verify that the published EAR does not contain the cp container Jars from the utility,
// that the utility MANIFEST classpath does not include entries for the cp container jars and
// that the contents of the util and web "bin" class folders are not included in the exported archives.
- verifyPublishedEAR(earComp, archiveNames, false);
+ verifyPublishedEAR(earComp, archiveNames, false, JEE5);
// add the attribute to the cp container in the utility project
- addDependencyAttribute();
+ addDependencyAttribute(false);
// verify that the published EAR does contain the cp container Jars from the utility,
// that the utility MANIFEST classpath includes entries for the cp container
// jars, that the utility includes the contents of the "bin" class folder and that the web's WEB-INF/classes
// includes the contents of the web's "bin" class folder.
- verifyPublishedEAR(earComp, archiveNames, true);
+ verifyPublishedEAR(earComp, archiveNames, true, JEE5);
}
- private void verifyPublishedEAR(final IVirtualComponent comp, final Set archiveNames, final boolean shouldHaveDependencies) throws Exception {
+ private void testEARLibPublishJEE5(boolean JEE5) throws Exception {
+ IVirtualComponent webComp = createWebProject(JEE5);
+
+ final Set archiveNames = new HashSet();
+ archiveNames.add(ClasspathDependencyTestUtil.TEST1_JAR);
+ archiveNames.add(ClasspathDependencyTestUtil.TEST2_JAR);
+ final IProject earProject = ProjectUtil.getProject(EAR_PROJECT);
+ final IVirtualComponent earComp = ComponentCore.createComponent(earProject);
+
+ verifyPublishedEARLibRef(earComp, archiveNames, false, JEE5);
+
+ addEARLibDependencyAttribute(false);
+
+ verifyPublishedEARLibRef(earComp, archiveNames, true, JEE5);
+ }
+
+ private void verifyPublishedEAR(final IVirtualComponent comp, final Set archiveNames, final boolean shouldHaveDependencies, boolean isEE5) throws Exception {
// verify that the published EAR contains the cp container jars from the Utility
J2EEFlexProjDeployable deployable = new J2EEFlexProjDeployable(comp.getProject(), comp);
try {
- IModuleResource[] members = deployable.members();
+ IModuleResource[] rootmembers = deployable.members();
+ IModuleResource[] members = null;
+ if (isEE5) {
+ for (int i=0; i<rootmembers.length; i++) {
+ String name = rootmembers[i].getName();
+ if (name.equals("lib")) {
+ members = ((IModuleFolder)rootmembers[i]).members();
+ }
+ }
+ }
+
+ if (members == null)
+ members = rootmembers;
+
Iterator it = archiveNames.iterator();
while (it.hasNext()) {
String name = (String) it.next();
@@ -307,7 +342,7 @@
isOnCP = true;
}
}
- if (shouldHaveDependencies) {
+ if (shouldHaveDependencies && ClasspathDependencyEnablement.isAllowClasspathComponentDependency()) {
assertTrue("Utility project MANIFEST.MF classpath in published EAR missing entry for dependency Jar " + name, isOnCP);
} else {
assertFalse("Utility project MANIFEST.MF classpath in published EAR has unexpected entry for dependency Jar " + name, isOnCP);
@@ -346,6 +381,105 @@
}
}
+private void verifyPublishedEARLibRef(final IVirtualComponent comp, final Set archiveNames, final boolean shouldHaveDependencies, boolean isEE5) throws Exception {
+
+ J2EEFlexProjDeployable deployable = new J2EEFlexProjDeployable(comp.getProject(), comp);
+ try {
+ IModuleResource[] rootmembers = deployable.members();
+ IModuleResource[] members = null;
+ if (isEE5) {
+ for (int i=0; i<rootmembers.length; i++) {
+ String name = rootmembers[i].getName();
+ if (name.equals("lib")) {
+ members = ((IModuleFolder)rootmembers[i]).members();
+ }
+ }
+ }
+
+ if (members == null)
+ members = rootmembers;
+
+ Iterator it = archiveNames.iterator();
+ while (it.hasNext()) {
+ String name = (String) it.next();
+ boolean hasArchive = false;
+ for (int i=0; i<members.length; i++) {
+ if (members[i].getName().equals(name)) {
+ hasArchive = true;
+ }
+ }
+ if (shouldHaveDependencies) {
+ assertTrue("Published EAR missing classpath dependency Jar " + name, hasArchive);
+ } else {
+ assertFalse("Published EAR has unexpected classpath dependency Jar " + name, hasArchive);
+ }
+ }
+
+ IModule webModule = null;
+ IModule[] childModules = deployable.getChildModules();
+ for (int i=0; i < childModules.length; i++) {
+ if (childModules[i].getName().equals(WEB_PROJECT)) {
+ webModule = childModules[i];
+ }
+ }
+
+ assertNotNull("Missing entry for web project", webModule);
+
+ J2EEFlexProjDeployable projectModule =(J2EEFlexProjDeployable) webModule.loadAdapter(ProjectModule.class, null);
+ IModuleResource[] moduleMembers = projectModule.members();
+ ArchiveManifest manifest = null;
+ boolean foundMetaInf = false;
+ for (int i=0; i< moduleMembers.length; i++) {
+ String name = moduleMembers[i].getName();
+ if (name.equals("META-INF")) {
+ foundMetaInf = true;
+ IModuleResource manifestResource= ((IModuleFolder)moduleMembers[i]).members()[0];
+ assertTrue(manifestResource.getModuleRelativePath().toString().equals("META-INF"));
+ assertTrue("Expected MANIFEST.MF, got " + manifestResource.getName(), manifestResource.getName().equals("MANIFEST.MF"));
+ java.io.File manifestFile = (java.io.File) manifestResource.getAdapter(java.io.File.class);
+ if (manifestFile == null) {
+ manifestFile = ((IFile) manifestResource.getAdapter(IFile.class)).getLocation().toFile();
+ }
+ assertNotNull(manifestFile);
+ FileInputStream fis = null;
+ try {
+ fis = new FileInputStream(manifestFile);
+ manifest = new ArchiveManifestImpl(fis);
+ } finally {
+ if (fis != null) {
+ fis.close();
+ }
+ }
+ }
+ }
+ if (!foundMetaInf) {
+ assertTrue("members() failed to return META-INF for web project module in published EAR", foundMetaInf);
+ }
+
+ assertNotNull("Failed to retrieve MANIFEST.MF from web project module in published EAR", manifest);
+
+ it = archiveNames.iterator();
+ while (it.hasNext()) {
+ String name = (String) it.next();
+ boolean isOnCP = false;
+ String[] cp = manifest.getClassPathTokenized();
+ for (int j = 0; j < cp.length; j++) {
+ if (cp[j].equals("lib/" + name)) {
+ isOnCP = true;
+ }
+ }
+ if (shouldHaveDependencies && ClasspathDependencyEnablement.isAllowClasspathComponentDependency()) {
+ assertTrue("Utility project MANIFEST.MF classpath in published EAR missing entry for dependency Jar " + name, isOnCP);
+ } else {
+ assertFalse("Utility project MANIFEST.MF classpath in published EAR has unexpected entry for dependency Jar " + name, isOnCP);
+ }
+ }
+
+ } catch (CoreException e) {
+ e.printStackTrace();
+ fail(e.getMessage());
+ }
+ }
private IVirtualComponent createProjects(boolean JEE5) throws Exception {
@@ -388,10 +522,31 @@
return webComp;
}
- /*
- * Add the classpath entry dependency attribute
+ private IVirtualComponent createWebProject(boolean JEE5) throws Exception {
+ // create a Web project
+ int version = J2EEVersionConstants.SERVLET_2_5;
+ if (!JEE5) {
+ version = J2EEVersionConstants.SERVLET_2_4;
+ }
+ final IProject webProject = ProjectUtil.createWebProject(WEB_PROJECT, EAR_PROJECT, version, true);
+ final IJavaProject webJavaProject = JavaCore.create(webProject);
+ final IVirtualComponent webComp = ComponentCore.createComponent(webProject);
+
+ // add a cp dependency to the Utility
+ ClasspathDependencyTestUtil.addCustomClasspathContainer(webJavaProject);
+
+ return webComp;
+ }
+
+
+ /**
+ *
+ * @param verifyClasspathDependencies - true if you want to immediately verify that
+ * the classpath dependencies were added. Set to false if you want to verify this at
+ * a later time (such as thru a members call in export or publish).
+ * @throws Exception
*/
- private void addDependencyAttribute() throws Exception {
+ private void addDependencyAttribute(boolean verifyClasspathDependencies) throws Exception {
final IProject util = ProjectUtil.getProject(UTIL_PROJECT);
final IPath fullUtilBinPath = util.getFullPath().append("bin");
final IJavaProject utilJava = JavaCore.create(util);
@@ -425,7 +580,8 @@
archiveNames.add(ClasspathDependencyTestUtil.TEST1_JAR);
archiveNames.add(ClasspathDependencyTestUtil.TEST2_JAR);
archiveNames.add(fullUtilBinPath.toString());
- ClasspathDependencyTestUtil.verifyClasspathDependencies(utilComp, archiveNames);
+ if (verifyClasspathDependencies)
+ ClasspathDependencyTestUtil.verifyClasspathDependencies(utilComp, archiveNames);
entryPaths.clear();
entryPaths.add(fullWebBinPath);
@@ -446,6 +602,46 @@
// verify that "bin" is a dependency
archiveNames.clear();
archiveNames.add(fullWebBinPath.toString());
- ClasspathDependencyTestUtil.verifyClasspathDependencies(webComp, archiveNames);
+ if (verifyClasspathDependencies)
+ ClasspathDependencyTestUtil.verifyClasspathDependencies(webComp, archiveNames);
+ }
+
+ /**
+ *
+ * @param verifyClasspathDependencies - true if you want to immediately verify that
+ * the classpath dependencies were added. Set to false if you want to verify this at
+ * a later time (such as thru a members call in export or publish)
+ * @throws Exception
+ */
+ private void addEARLibDependencyAttribute(boolean verifyClasspathDependencies) throws Exception {
+
+ final IProject web = ProjectUtil.getProject(WEB_PROJECT);
+ final IJavaProject webJava = JavaCore.create(web);
+ final IVirtualComponent webComp = ComponentCore.createComponent(web);
+
+ final Set entryPaths = new HashSet();
+ entryPaths.add(ClasspathDependencyTestUtil.CUSTOM_CLASSPATH_CONTAINER);
+ // verify that "bin" and the custom cp container are potential entries
+ List entries = ClasspathDependencyTestUtil.verifyPotentialClasspathEntries(webJava, entryPaths);
+ // verify that no entries have the classpath attribute
+ ClasspathDependencyTestUtil.verifyNoClasspathAttributes(webJava);
+ // verify that there are no classpath dependencies
+ ClasspathDependencyTestUtil.verifyNoClasspathDependencies(webComp);
+ IClasspathEntry entry = (IClasspathEntry) entries.get(0);
+
+ // add the dependency attribute to "bin" and the cp container
+ for (Object o: entries) {
+ UpdateClasspathAttributeUtil.addDependencyAttribute(null, web.getName(), (IClasspathEntry) o, new Path("../lib"));
+ }
+ // should no longer have potential entries
+ ClasspathDependencyTestUtil.verifyNoPotentialClasspathEntries(webJava);
+ // verify that "bin" and the cp container have the attribute
+ ClasspathDependencyTestUtil.verifyClasspathAttributes(webJava, entryPaths);
+ // verify that "bin" and the cp container are dependencies
+ final Set archiveNames = new HashSet();
+ archiveNames.add(ClasspathDependencyTestUtil.TEST1_JAR);
+ archiveNames.add(ClasspathDependencyTestUtil.TEST2_JAR);
+ if (verifyClasspathDependencies)
+ ClasspathDependencyTestUtil.verifyClasspathDependencies(webComp, archiveNames);
}
}
diff --git a/tests/org.eclipse.jst.j2ee.tests/j2ee-tests/org/eclipse/jst/j2ee/classpath/tests/ClasspathDependencyWebTests.java b/tests/org.eclipse.jst.j2ee.tests/j2ee-tests/org/eclipse/jst/j2ee/classpath/tests/ClasspathDependencyWebTests.java
index 9cca823..5688ec6 100644
--- a/tests/org.eclipse.jst.j2ee.tests/j2ee-tests/org/eclipse/jst/j2ee/classpath/tests/ClasspathDependencyWebTests.java
+++ b/tests/org.eclipse.jst.j2ee.tests/j2ee-tests/org/eclipse/jst/j2ee/classpath/tests/ClasspathDependencyWebTests.java
@@ -15,6 +15,9 @@
import java.util.List;
import java.util.Set;
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
import org.eclipse.core.resources.IFolder;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.runtime.CoreException;
@@ -35,12 +38,9 @@
import org.eclipse.jst.j2ee.web.componentcore.util.WebArtifactEdit;
import org.eclipse.wst.common.componentcore.ComponentCore;
import org.eclipse.wst.common.componentcore.resources.IVirtualComponent;
-import org.eclipse.wst.server.core.util.ModuleFolder;
+import org.eclipse.wst.server.core.model.IModuleFolder;
import org.eclipse.wst.server.core.model.IModuleResource;
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
/**
* Tests export and publish behavior for classpath component dependencies and web projects.
*/
@@ -60,6 +60,7 @@
//suite.addTest(new ClasspathDependencyWebTests("testWebExportJEE5"));
suite.addTest(new ClasspathDependencyWebTests("testWebPublishJ2EE"));
suite.addTest(new ClasspathDependencyWebTests("testWebPublishJEE5"));
+ suite.addTest(new ClasspathDependencyWebTests("testWebContainerPublishJEE5"));
return suite;
}
@@ -83,7 +84,7 @@
verifyExportedWebInfLibs(webComp, archiveNames, false);
// add the cp dependency attribute to the cp container in the util
- addDependencyAttribute();
+ addDependencyAttribute(false);
// verify that the exported WAR WEB-INF/lib does contain the cp container jars from the Utility
verifyExportedWebInfLibs(webComp, archiveNames, true);
@@ -148,6 +149,10 @@
testWebPublish(true);
}
+ public void testWebContainerPublishJEE5() throws Exception {
+ testWebContainerPublish(true);
+ }
+
private void testWebPublish(boolean JEE5) throws Exception {
// create the web and utility projects
@@ -160,14 +165,27 @@
verifyPublishedWebInfLibs(webComp, archiveNames, false);
// add the cp dependency attribute to the cp container in the util
- addDependencyAttribute();
+ addDependencyAttribute(true);
// verify that the exported WAR WEB-INF/lib does contain the cp container jars from the Utility
verifyPublishedWebInfLibs(webComp, archiveNames, true);
}
+ private void testWebContainerPublish(boolean JEE5) throws Exception {
+ IVirtualComponent webComp = createWebProject(JEE5);
+
+ final Set archiveNames = new HashSet();
+ archiveNames.add(ClasspathDependencyTestUtil.TEST1_JAR);
+ archiveNames.add(ClasspathDependencyTestUtil.TEST2_JAR);
+
+ verifyPublishedWebInfContainer(webComp, archiveNames, false);
+
+ addWebInfContainerDependencyAttribute(false);
+
+ verifyPublishedWebInfContainer(webComp, archiveNames, true);
+ }
+
private void verifyPublishedWebInfLibs(final IVirtualComponent comp, final Set archiveNames, final boolean shouldHaveDependencies) throws Exception {
- // verify that the published WAR's WEB-INF/lib contains the cp container jars from the Utility
J2EEFlexProjDeployable deployable = new J2EEFlexProjDeployable(comp.getProject(), comp);
try {
@@ -177,12 +195,12 @@
for (int i=0; i<members.length; i++) {
String name = members[i].getName();
if (name.equals("WEB-INF")) {
- IModuleResource[] webInf = ((ModuleFolder)members[i]).members();
+ IModuleResource[] webInf = ((IModuleFolder)members[i]).members();
for (int j=0; j<webInf.length; j++) {
IModuleResource webResource = webInf[j];
assertTrue(webResource.getModuleRelativePath().toString().equals("WEB-INF"));
if (webResource.getName().equals("lib")) {
- IModuleResource[] webresMembers = ((ModuleFolder)webResource).members();
+ IModuleResource[] webresMembers = ((IModuleFolder)webResource).members();
Iterator it = archiveNames.iterator();
while (it.hasNext()) {
String archiveName = (String) it.next();
@@ -200,10 +218,10 @@
}
}
} else if (webResource.getName().equals("classes")) {
- IModuleResource[] webresMembers = ((ModuleFolder)webResource).members();
+ IModuleResource[] webresMembers = ((IModuleFolder)webResource).members();
for (j = 0; j < webresMembers.length; j++) {
if (webresMembers[j].getName().equals("nested")) {
- IModuleResource[] nestedMembers = ((ModuleFolder)webresMembers[j]).members();
+ IModuleResource[] nestedMembers = ((IModuleFolder)webresMembers[j]).members();
assertTrue("Published WAR should have have nested folder without class folder dependency", shouldHaveDependencies);
boolean hasNestedTest = false;
if (nestedMembers.length == 1 && nestedMembers[0].getName().equals("test")) {
@@ -227,6 +245,49 @@
}
}
+ private void verifyPublishedWebInfContainer(final IVirtualComponent comp, final Set archiveNames, final boolean shouldHaveDependencies) throws Exception {
+ J2EEFlexProjDeployable deployable = new J2EEFlexProjDeployable(comp.getProject(), comp);
+
+ try {
+ IModuleResource[] members = deployable.members();
+ assertTrue(members.length==2);
+
+ for (int i=0; i<members.length; i++) {
+ String name = members[i].getName();
+ if (name.equals("WEB-INF")) {
+ IModuleResource[] webInf = ((IModuleFolder)members[i]).members();
+ for (int j=0; j<webInf.length; j++) {
+ IModuleResource webResource = webInf[j];
+ assertTrue(webResource.getModuleRelativePath().toString().equals("WEB-INF"));
+ if (webResource.getName().equals("lib")) {
+ IModuleResource[] webresMembers = ((IModuleFolder)webResource).members();
+ Iterator it = archiveNames.iterator();
+ while (it.hasNext()) {
+ String archiveName = (String) it.next();
+ boolean hasArchive = false;
+ for (int k = 0; k < webresMembers.length; k++) {
+ String localName = webresMembers[k].getName();
+ if (localName.equals(archiveName)) {
+ hasArchive= true;
+ }
+ }
+ if (shouldHaveDependencies) {
+ assertTrue("Published WAR missing classpath dependency Jar " + archiveName, hasArchive);
+ } else {
+ assertFalse("Published WAR has unexpected classpath dependency Jar " + archiveName, hasArchive);
+ }
+ }
+ }
+ }
+ }
+ }
+
+ } catch (CoreException e) {
+ e.printStackTrace();
+ fail(e.getMessage());
+ }
+ }
+
private IVirtualComponent createProjects(boolean JEE5) throws Exception {
// create a Utility project
final IProject util = ProjectUtil.createUtilityProject(UTIL_PROJECT, null, true);
@@ -263,7 +324,30 @@
return webComp;
}
- private void addDependencyAttribute() throws Exception {
+ private IVirtualComponent createWebProject(boolean JEE5) throws Exception {
+ // create a Web project
+ int version = J2EEVersionConstants.SERVLET_2_5;
+ if (!JEE5) {
+ version = J2EEVersionConstants.SERVLET_2_4;
+ }
+ final IProject webProject = ProjectUtil.createWebProject(WEB_PROJECT, null, version, true);
+ final IJavaProject webJavaProject = JavaCore.create(webProject);
+ final IVirtualComponent webComp = ComponentCore.createComponent(webProject);
+
+ // add a cp dependency to the Utility
+ ClasspathDependencyTestUtil.addCustomClasspathContainer(webJavaProject);
+
+ return webComp;
+ }
+
+ /**
+ *
+ * @param verifyClasspathDependencies - true if you want to immediately verify that
+ * the classpath dependencies were added. Set to false if you want to verify this at
+ * a later time (such as thru a members call in export or publish)
+ * @throws Exception
+ */
+ private void addDependencyAttribute(boolean verifyClasspathDependencies) throws Exception {
final IProject util = ProjectUtil.getProject(UTIL_PROJECT);
final IJavaProject utilJava = JavaCore.create(util);
final IVirtualComponent utilComp = ComponentCore.createComponent(util);
@@ -308,4 +392,44 @@
archiveNames.add(fullWebBinPath.toString());
ClasspathDependencyTestUtil.verifyClasspathDependencies(webComp, archiveNames);
}
+
+ /**
+ *
+ * @param verifyClasspathDependencies - true if you want to immediately verify that
+ * the classpath dependencies were added. Set to false if you want to verify this at
+ * a later time (such as thru a members call in export or publish)
+ * @throws Exception
+ */
+ private void addWebInfContainerDependencyAttribute(boolean verifyClasspathDependencies) throws Exception {
+
+ final IProject web = ProjectUtil.getProject(WEB_PROJECT);
+ final IJavaProject webJava = JavaCore.create(web);
+ final IVirtualComponent webComp = ComponentCore.createComponent(web);
+
+ final Set entryPaths = new HashSet();
+ entryPaths.add(ClasspathDependencyTestUtil.CUSTOM_CLASSPATH_CONTAINER);
+ // verify that "bin" and the custom cp container are potential entries
+ List entries = ClasspathDependencyTestUtil.verifyPotentialClasspathEntries(webJava, entryPaths);
+ // verify that no entries have the classpath attribute
+ ClasspathDependencyTestUtil.verifyNoClasspathAttributes(webJava);
+ // verify that there are no classpath dependencies
+ ClasspathDependencyTestUtil.verifyNoClasspathDependencies(webComp);
+ IClasspathEntry entry = (IClasspathEntry) entries.get(0);
+
+ // add the dependency attribute to "bin" and the cp container
+ for (Object o: entries) {
+ UpdateClasspathAttributeUtil.addDependencyAttribute(null, web.getName(), (IClasspathEntry) o);
+ }
+ // should no longer have potential entries
+ ClasspathDependencyTestUtil.verifyNoPotentialClasspathEntries(webJava);
+ // verify that "bin" and the cp container have the attribute
+ ClasspathDependencyTestUtil.verifyClasspathAttributes(webJava, entryPaths);
+ // verify that "bin" and the cp container are dependencies
+ final Set archiveNames = new HashSet();
+ archiveNames.add(ClasspathDependencyTestUtil.TEST1_JAR);
+ archiveNames.add(ClasspathDependencyTestUtil.TEST2_JAR);
+ if (verifyClasspathDependencies)
+ ClasspathDependencyTestUtil.verifyClasspathDependencies(webComp, archiveNames);
+ }
+
}
diff --git a/tests/org.eclipse.jst.web_tests.feature.patch/.project b/tests/org.eclipse.jst.web_tests.feature.patch/.project
deleted file mode 100644
index bbec345..0000000
--- a/tests/org.eclipse.jst.web_tests.feature.patch/.project
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.jst.web_tests.feature.patch</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.pde.FeatureBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.FeatureNature</nature>
- </natures>
-</projectDescription>
diff --git a/tests/org.eclipse.jst.web_tests.feature.patch/build.properties b/tests/org.eclipse.jst.web_tests.feature.patch/build.properties
deleted file mode 100644
index 64f93a9..0000000
--- a/tests/org.eclipse.jst.web_tests.feature.patch/build.properties
+++ /dev/null
@@ -1 +0,0 @@
-bin.includes = feature.xml
diff --git a/tests/org.eclipse.jst.web_tests.feature.patch/feature.xml b/tests/org.eclipse.jst.web_tests.feature.patch/feature.xml
deleted file mode 100644
index a0a9cc6..0000000
--- a/tests/org.eclipse.jst.web_tests.feature.patch/feature.xml
+++ /dev/null
@@ -1,18 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<feature
- id="org.eclipse.jst.web_tests.feature.patch"
- label="Patch feature for tests"
- version="3.1.2.qualifier"
- provider-name="Eclipse Web Tools Platform">
-
- <requires>
- <import feature="org.eclipse.jst.web_tests.feature" version="3.1.1.v200908121609-794FZ-EVVFIwFhRtLnWW" patch="true"/>
- </requires>
-
- <plugin
- id="org.eclipse.jst.j2ee.tests"
- download-size="0"
- install-size="0"
- version="0.0.0"/>
-
-</feature>