From 16bcbaf2eb5d15bd52441a5e320c4fc5c12b0185 Mon Sep 17 00:00:00 2001 From: Oliver Lietz Date: Sat, 1 Jun 2024 14:27:54 +0200 Subject: [PATCH] #1087 Drop outdated containers * remove GlassFish Embedded (JEE) container * remove Java EE integration tests * remove sample2 modules --- .../pom.xml | 109 ---- .../EmbeddedGlassFishTestContainer.java | 371 -------------- ...EmbeddedGlassFishTestContainerFactory.java | 44 -- .../embedded/EmbeddedGlassFishLaunchTest.java | 62 --- .../src/test/resources/exam.properties | 1 - .../resources/glassfish-config/domain.xml | 157 ------ .../glassfish-config/logging.properties | 10 - .../src/test/resources/logback.xml | 40 -- itest/javaee/invoker.properties | 1 - itest/javaee/pom.xml | 118 ----- .../src/it/regression-javaee-data/pom.xml | 193 ------- .../src/main/webapp/WEB-INF/beans.xml | 7 - .../javaee/data/AuthorRepositoryTest.java | 48 -- .../regression/javaee/data/TitleTest.java | 48 -- .../META-INF/apache-deltaspike.properties | 1 - .../src/test/resources/META-INF/beans.xml | 7 - .../src/test/resources/exam.properties | 2 - .../resources/glassfish-config/domain.xml | 474 ------------------ .../glassfish-config/logging.properties | 10 - .../src/test/resources/logback.xml | 40 -- .../src/it/regression-javaee-moviefun/pom.xml | 150 ------ .../javaee/moviefun/MoviesEJBTest.java | 78 --- .../src/test/resources/exam.properties | 2 - .../resources/glassfish-config/domain.xml | 474 ------------------ .../glassfish-config/logging.properties | 10 - .../src/test/resources/logback.xml | 40 -- .../src/it/regression-javaee-testng/pom.xml | 132 ----- .../exam/regression/javaee/AuthorTest.java | 60 --- .../pax/exam/regression/javaee/TitleTest.java | 58 --- .../src/test/resources/exam.properties | 2 - .../resources/glassfish-config/domain.xml | 474 ------------------ .../glassfish-config/logging.properties | 10 - .../src/test/resources/logback.xml | 40 -- .../it/regression-javaee-userprobe/pom.xml | 158 ------ .../AnotherUserDefinedProbeTest.java | 49 -- .../userprobe/ProbeConfigurationFactory.java | 47 -- .../userprobe/UserDefinedProbeTest.java | 63 --- .../org.ops4j.pax.exam.ConfigurationFactory | 1 - .../src/test/resources/exam.properties | 2 - .../resources/glassfish-config/domain.xml | 474 ------------------ .../glassfish-config/logging.properties | 10 - .../src/test/resources/logback.xml | 40 -- itest/javaee/src/it/regression-javaee/pom.xml | 169 ------- .../exam/regression/javaee/AbstractTest.java | 47 -- .../exam/regression/javaee/AuthorTest.java | 63 --- .../exam/regression/javaee/Calculator.java | 26 - .../javaee/CalculatorInvokerTest.java | 21 - .../regression/javaee/CalculatorTest.java | 71 --- .../exam/regression/javaee/DerivedTest.java | 27 - .../pax/exam/regression/javaee/TitleTest.java | 48 -- .../src/test/resources/META-INF/beans.xml | 0 .../src/test/resources/exam.properties | 2 - .../resources/glassfish-config/domain.xml | 474 ------------------ .../glassfish-config/logging.properties | 10 - .../src/test/resources/logback.xml | 40 -- itest/pom.xml | 10 - pom.xml | 1 - pom/pom.xml | 17 +- samples/pax-exam-sample2-model/pom.xml | 20 - .../ops4j/pax/exam/sample2/model/Actor.java | 45 -- .../pax/exam/sample2/model/Director.java | 46 -- .../ops4j/pax/exam/sample2/model/Movie.java | 290 ----------- .../ops4j/pax/exam/sample2/model/Person.java | 155 ------ .../ops4j/pax/exam/sample2/model/Rating.java | 119 ----- .../ops4j/pax/exam/sample2/model/Role.java | 102 ---- .../ops4j/pax/exam/sample2/model/User.java | 127 ----- .../main/resources/META-INF/persistence.xml | 31 -- samples/pax-exam-sample2-service/pom.xml | 112 ----- .../sample2/movieimport/MovieDbApiClient.java | 71 --- .../sample2/movieimport/MovieDbException.java | 30 -- .../movieimport/MovieDbImportService.java | 157 ------ .../movieimport/MovieDbJsonMapper.java | 145 ------ .../movieimport/MovieDbLocalStorage.java | 125 ----- .../exam/sample2/service/ActorService.java | 36 -- .../sample2/service/DatabasePopulator.java | 63 --- .../exam/sample2/service/MovieService.java | 50 -- .../pax/exam/sample2/service/UserService.java | 85 ---- .../src/main/resources/META-INF/beans.xml | 5 - .../sample2/dao/DatabasePopulatorRunner.java | 50 -- .../pax/exam/sample2/dao/UserServiceTest.java | 50 -- .../src/test/resources/exam.properties | 2 - .../resources/glassfish-config/domain.xml | 451 ----------------- .../glassfish-config/logging.properties | 10 - .../src/test/resources/logback.xml | 41 -- samples/pom.xml | 2 - 85 files changed, 2 insertions(+), 7561 deletions(-) delete mode 100644 containers/pax-exam-container-glassfish-embedded/pom.xml delete mode 100644 containers/pax-exam-container-glassfish-embedded/src/main/java/org/ops4j/pax/exam/glassfish/embedded/EmbeddedGlassFishTestContainer.java delete mode 100644 containers/pax-exam-container-glassfish-embedded/src/main/java/org/ops4j/pax/exam/glassfish/embedded/EmbeddedGlassFishTestContainerFactory.java delete mode 100644 containers/pax-exam-container-glassfish-embedded/src/test/java/org/ops4j/pax/exam/glassfish/embedded/EmbeddedGlassFishLaunchTest.java delete mode 100644 containers/pax-exam-container-glassfish-embedded/src/test/resources/exam.properties delete mode 100644 containers/pax-exam-container-glassfish-embedded/src/test/resources/glassfish-config/domain.xml delete mode 100644 containers/pax-exam-container-glassfish-embedded/src/test/resources/glassfish-config/logging.properties delete mode 100644 containers/pax-exam-container-glassfish-embedded/src/test/resources/logback.xml delete mode 100644 itest/javaee/invoker.properties delete mode 100644 itest/javaee/pom.xml delete mode 100644 itest/javaee/src/it/regression-javaee-data/pom.xml delete mode 100644 itest/javaee/src/it/regression-javaee-data/src/main/webapp/WEB-INF/beans.xml delete mode 100644 itest/javaee/src/it/regression-javaee-data/src/test/java/org/ops4j/pax/exam/regression/javaee/data/AuthorRepositoryTest.java delete mode 100644 itest/javaee/src/it/regression-javaee-data/src/test/java/org/ops4j/pax/exam/regression/javaee/data/TitleTest.java delete mode 100644 itest/javaee/src/it/regression-javaee-data/src/test/resources/META-INF/apache-deltaspike.properties delete mode 100644 itest/javaee/src/it/regression-javaee-data/src/test/resources/META-INF/beans.xml delete mode 100644 itest/javaee/src/it/regression-javaee-data/src/test/resources/exam.properties delete mode 100644 itest/javaee/src/it/regression-javaee-data/src/test/resources/glassfish-config/domain.xml delete mode 100644 itest/javaee/src/it/regression-javaee-data/src/test/resources/glassfish-config/logging.properties delete mode 100644 itest/javaee/src/it/regression-javaee-data/src/test/resources/logback.xml delete mode 100644 itest/javaee/src/it/regression-javaee-moviefun/pom.xml delete mode 100644 itest/javaee/src/it/regression-javaee-moviefun/src/test/java/org/ops4j/pax/exam/regression/javaee/moviefun/MoviesEJBTest.java delete mode 100644 itest/javaee/src/it/regression-javaee-moviefun/src/test/resources/exam.properties delete mode 100644 itest/javaee/src/it/regression-javaee-moviefun/src/test/resources/glassfish-config/domain.xml delete mode 100644 itest/javaee/src/it/regression-javaee-moviefun/src/test/resources/glassfish-config/logging.properties delete mode 100644 itest/javaee/src/it/regression-javaee-moviefun/src/test/resources/logback.xml delete mode 100644 itest/javaee/src/it/regression-javaee-testng/pom.xml delete mode 100644 itest/javaee/src/it/regression-javaee-testng/src/test/java/org/ops4j/pax/exam/regression/javaee/AuthorTest.java delete mode 100644 itest/javaee/src/it/regression-javaee-testng/src/test/java/org/ops4j/pax/exam/regression/javaee/TitleTest.java delete mode 100644 itest/javaee/src/it/regression-javaee-testng/src/test/resources/exam.properties delete mode 100644 itest/javaee/src/it/regression-javaee-testng/src/test/resources/glassfish-config/domain.xml delete mode 100644 itest/javaee/src/it/regression-javaee-testng/src/test/resources/glassfish-config/logging.properties delete mode 100644 itest/javaee/src/it/regression-javaee-testng/src/test/resources/logback.xml delete mode 100644 itest/javaee/src/it/regression-javaee-userprobe/pom.xml delete mode 100644 itest/javaee/src/it/regression-javaee-userprobe/src/test/java/org/ops4j/pax/exam/regression/javaee/userprobe/AnotherUserDefinedProbeTest.java delete mode 100644 itest/javaee/src/it/regression-javaee-userprobe/src/test/java/org/ops4j/pax/exam/regression/javaee/userprobe/ProbeConfigurationFactory.java delete mode 100644 itest/javaee/src/it/regression-javaee-userprobe/src/test/java/org/ops4j/pax/exam/regression/javaee/userprobe/UserDefinedProbeTest.java delete mode 100644 itest/javaee/src/it/regression-javaee-userprobe/src/test/resources/META-INF/services/org.ops4j.pax.exam.ConfigurationFactory delete mode 100644 itest/javaee/src/it/regression-javaee-userprobe/src/test/resources/exam.properties delete mode 100644 itest/javaee/src/it/regression-javaee-userprobe/src/test/resources/glassfish-config/domain.xml delete mode 100644 itest/javaee/src/it/regression-javaee-userprobe/src/test/resources/glassfish-config/logging.properties delete mode 100644 itest/javaee/src/it/regression-javaee-userprobe/src/test/resources/logback.xml delete mode 100644 itest/javaee/src/it/regression-javaee/pom.xml delete mode 100644 itest/javaee/src/it/regression-javaee/src/test/java/org/ops4j/pax/exam/regression/javaee/AbstractTest.java delete mode 100644 itest/javaee/src/it/regression-javaee/src/test/java/org/ops4j/pax/exam/regression/javaee/AuthorTest.java delete mode 100644 itest/javaee/src/it/regression-javaee/src/test/java/org/ops4j/pax/exam/regression/javaee/Calculator.java delete mode 100644 itest/javaee/src/it/regression-javaee/src/test/java/org/ops4j/pax/exam/regression/javaee/CalculatorInvokerTest.java delete mode 100644 itest/javaee/src/it/regression-javaee/src/test/java/org/ops4j/pax/exam/regression/javaee/CalculatorTest.java delete mode 100644 itest/javaee/src/it/regression-javaee/src/test/java/org/ops4j/pax/exam/regression/javaee/DerivedTest.java delete mode 100644 itest/javaee/src/it/regression-javaee/src/test/java/org/ops4j/pax/exam/regression/javaee/TitleTest.java delete mode 100644 itest/javaee/src/it/regression-javaee/src/test/resources/META-INF/beans.xml delete mode 100644 itest/javaee/src/it/regression-javaee/src/test/resources/exam.properties delete mode 100644 itest/javaee/src/it/regression-javaee/src/test/resources/glassfish-config/domain.xml delete mode 100644 itest/javaee/src/it/regression-javaee/src/test/resources/glassfish-config/logging.properties delete mode 100644 itest/javaee/src/it/regression-javaee/src/test/resources/logback.xml delete mode 100644 samples/pax-exam-sample2-model/pom.xml delete mode 100644 samples/pax-exam-sample2-model/src/main/java/org/ops4j/pax/exam/sample2/model/Actor.java delete mode 100644 samples/pax-exam-sample2-model/src/main/java/org/ops4j/pax/exam/sample2/model/Director.java delete mode 100644 samples/pax-exam-sample2-model/src/main/java/org/ops4j/pax/exam/sample2/model/Movie.java delete mode 100644 samples/pax-exam-sample2-model/src/main/java/org/ops4j/pax/exam/sample2/model/Person.java delete mode 100644 samples/pax-exam-sample2-model/src/main/java/org/ops4j/pax/exam/sample2/model/Rating.java delete mode 100644 samples/pax-exam-sample2-model/src/main/java/org/ops4j/pax/exam/sample2/model/Role.java delete mode 100644 samples/pax-exam-sample2-model/src/main/java/org/ops4j/pax/exam/sample2/model/User.java delete mode 100644 samples/pax-exam-sample2-model/src/main/resources/META-INF/persistence.xml delete mode 100644 samples/pax-exam-sample2-service/pom.xml delete mode 100644 samples/pax-exam-sample2-service/src/main/java/org/ops4j/pax/exam/sample2/movieimport/MovieDbApiClient.java delete mode 100644 samples/pax-exam-sample2-service/src/main/java/org/ops4j/pax/exam/sample2/movieimport/MovieDbException.java delete mode 100644 samples/pax-exam-sample2-service/src/main/java/org/ops4j/pax/exam/sample2/movieimport/MovieDbImportService.java delete mode 100644 samples/pax-exam-sample2-service/src/main/java/org/ops4j/pax/exam/sample2/movieimport/MovieDbJsonMapper.java delete mode 100644 samples/pax-exam-sample2-service/src/main/java/org/ops4j/pax/exam/sample2/movieimport/MovieDbLocalStorage.java delete mode 100644 samples/pax-exam-sample2-service/src/main/java/org/ops4j/pax/exam/sample2/service/ActorService.java delete mode 100644 samples/pax-exam-sample2-service/src/main/java/org/ops4j/pax/exam/sample2/service/DatabasePopulator.java delete mode 100644 samples/pax-exam-sample2-service/src/main/java/org/ops4j/pax/exam/sample2/service/MovieService.java delete mode 100644 samples/pax-exam-sample2-service/src/main/java/org/ops4j/pax/exam/sample2/service/UserService.java delete mode 100644 samples/pax-exam-sample2-service/src/main/resources/META-INF/beans.xml delete mode 100644 samples/pax-exam-sample2-service/src/test/java/org/ops4j/pax/exam/sample2/dao/DatabasePopulatorRunner.java delete mode 100644 samples/pax-exam-sample2-service/src/test/java/org/ops4j/pax/exam/sample2/dao/UserServiceTest.java delete mode 100644 samples/pax-exam-sample2-service/src/test/resources/exam.properties delete mode 100644 samples/pax-exam-sample2-service/src/test/resources/glassfish-config/domain.xml delete mode 100644 samples/pax-exam-sample2-service/src/test/resources/glassfish-config/logging.properties delete mode 100644 samples/pax-exam-sample2-service/src/test/resources/logback.xml diff --git a/containers/pax-exam-container-glassfish-embedded/pom.xml b/containers/pax-exam-container-glassfish-embedded/pom.xml deleted file mode 100644 index 3ea8aab6a..000000000 --- a/containers/pax-exam-container-glassfish-embedded/pom.xml +++ /dev/null @@ -1,109 +0,0 @@ - - 4.0.0 - - org.ops4j.pax - exam - 4.13.6-SNAPSHOT - ../../pom - - org.ops4j.pax.exam - pax-exam-container-glassfish-embedded - - OPS4J Pax Exam Embedded GlassFish Container (non-OSGi) - - - - - - org.slf4j - jcl-over-slf4j - test - - - - org.kohsuke.metainf-services - metainf-services - provided - - - - org.osgi - osgi.core - provided - - - - org.ops4j.pax.exam - pax-exam - ${project.version} - - - - org.ops4j.pax.exam - pax-exam-spi - ${project.version} - - - - org.ops4j.pax.exam - pax-exam-junit4 - ${project.version} - test - - - - org.ops4j.pax.exam - pax-exam-cdi - ${project.version} - test - - - - org.ops4j.pax.exam - pax-exam-invoker-jaxrs2 - ${project.version} - test - - - - org.ops4j.pax.exam - pax-exam-servlet-bridge - ${project.version} - test - - - - - org.ops4j.pax.exam - pax-exam-link-mvn - ${project.version} - test - - - - - ch.qos.logback - logback-core - test - - - - ch.qos.logback - logback-classic - test - - - - org.slf4j - jul-to-slf4j - test - - - - org.glassfish.main.extras - glassfish-embedded-all - - - - - diff --git a/containers/pax-exam-container-glassfish-embedded/src/main/java/org/ops4j/pax/exam/glassfish/embedded/EmbeddedGlassFishTestContainer.java b/containers/pax-exam-container-glassfish-embedded/src/main/java/org/ops4j/pax/exam/glassfish/embedded/EmbeddedGlassFishTestContainer.java deleted file mode 100644 index ccf6328cd..000000000 --- a/containers/pax-exam-container-glassfish-embedded/src/main/java/org/ops4j/pax/exam/glassfish/embedded/EmbeddedGlassFishTestContainer.java +++ /dev/null @@ -1,371 +0,0 @@ -/* - * Copyright 2012 Harald Wellmann - * - * Licensed 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. - */ -package org.ops4j.pax.exam.glassfish.embedded; - -import java.io.File; -import java.io.FileOutputStream; -import java.io.IOException; -import java.io.InputStream; -import java.net.URI; -import java.net.URISyntaxException; -import java.net.URL; -import java.util.Stack; - -import javax.xml.parsers.DocumentBuilder; -import javax.xml.parsers.DocumentBuilderFactory; -import javax.xml.parsers.ParserConfigurationException; -import javax.xml.xpath.XPath; -import javax.xml.xpath.XPathExpressionException; -import javax.xml.xpath.XPathFactory; - -import org.glassfish.embeddable.Deployer; -import org.glassfish.embeddable.GlassFish; -import org.glassfish.embeddable.GlassFishException; -import org.glassfish.embeddable.GlassFishProperties; -import org.glassfish.embeddable.GlassFishRuntime; -import org.ops4j.io.StreamUtils; -import org.ops4j.pax.exam.ConfigurationManager; -import org.ops4j.pax.exam.ExamSystem; -import org.ops4j.pax.exam.ProbeInvoker; -import org.ops4j.pax.exam.ProbeInvokerFactory; -import org.ops4j.pax.exam.TestAddress; -import org.ops4j.pax.exam.TestContainer; -import org.ops4j.pax.exam.TestContainerException; -import org.ops4j.pax.exam.TestDirectory; -import org.ops4j.pax.exam.TestInstantiationInstruction; -import org.ops4j.pax.exam.options.UrlDeploymentOption; -import org.ops4j.pax.exam.options.WarProbeOption; -import org.ops4j.spi.ServiceProviderFinder; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.w3c.dom.Document; -import org.xml.sax.SAXException; - -/** - * A {@link TestContainer} for the GlassFish application server. - *

- * This container uses Embedded GlassFish and only Java EE mode, but not OSGi mode. You deploy WAR - * modules via Pax Exam options (but no OSGi bundles). - *

- * The test probe is a WAR built on the fly from the classpath contents with some default - * exclusions. - *

- * GlassFish logging is redirected from java.util.logging to SLF4J. The necessary artifacts are - * provisioned by this container automatically. - * - * @author Harald Wellmann - * @since 3.0.0 - */ -public class EmbeddedGlassFishTestContainer implements TestContainer { - - /** - * Configuration property key for GlassFish installation configuration file directory. The files - * contained in this directory will be copied to the config directory of the GlassFish instance. - */ - public static final String GLASSFISH_CONFIG_DIR_KEY = "pax.exam.glassfish.config.dir"; - - private static final Logger LOG = LoggerFactory.getLogger(EmbeddedGlassFishTestContainer.class); - - /** - * Name of the probe web application (in Java EE mode). - */ - private static final String PROBE_APPLICATION_NAME = "Pax-Exam-Probe"; - - /** - * XPath to read the HTTP port from the domain.xml configuration file. - */ - private static final String HTTP_PORT_XPATH = "/domain/configs/config/network-config/network-listeners/network-listener[@name='http-listener-1']/@port"; - - /** - * Stack of deployed modules. On shutdown, the modules are undeployed in reverse order. - */ - private Stack deployed = new Stack(); - - private String warProbe; - - /** - * Pax Exam system with configuration options. - */ - private ExamSystem system; - - /** - * GlassFish OSGi service. - */ - private GlassFish glassFish; - - /** - * Test directory which tracks all tests in the current suite. We need to register the context - * URL of the probe web app as access point. - */ - private TestDirectory testDirectory; - - private String configDirName; - - /** - * Creates a GlassFish container, running on top of an OSGi framework. - * - * @param system - * Pax Exam system configuration - */ - public EmbeddedGlassFishTestContainer(ExamSystem system) { - this.system = system; - this.testDirectory = TestDirectory.getInstance(); - } - - /** - * Calls a test with the given address. In Java EE mode, we lookup the test from the test - * directory and invoke it via probe invoker obtained from the Java SE service loader. (This - * invoker uses a servlet bridge,) - */ - public synchronized void call(TestAddress address) { - TestInstantiationInstruction instruction = testDirectory.lookup(address); - ProbeInvokerFactory probeInvokerFactory = ServiceProviderFinder - .loadUniqueServiceProvider(ProbeInvokerFactory.class); - ProbeInvoker invoker = probeInvokerFactory.createProbeInvoker(null, instruction.toString()); - invoker.call(address.arguments()); - } - - /** - * Installs a probe in the test container. - *

- * In Java EE mode, the probe is a WAR, enriched by the Pax Exam servlet bridge which allows us - * to invoke tests running within the container via an HTTP client. - * - * @param location - * bundle location, not used for WAR probes - * @param stream - * input stream containing probe - * @return bundle ID, or -1 for WAR - */ - public synchronized long install(String location, InputStream stream) { - try { - // just make sure we don't get an "option not recognized" warning - system.getOptions(WarProbeOption.class); - - LOG.info("deploying probe"); - Deployer deployer = glassFish.getDeployer(); - - /* - * FIXME The following should work, but does not. For some reason, we cannot directly - * deploy from a stream. As a workaround, we copy the stream to a temp file and deploy - * the file. - * - * deployer.deploy( stream, "--name", "Pax-Exam-Probe", "--contextroot", - * "Pax-Exam-Probe" ); - */ - - File tempFile = File.createTempFile("pax-exam", ".war"); - tempFile.deleteOnExit(); - StreamUtils.copyStream(stream, new FileOutputStream(tempFile), true); - deployer.deploy(tempFile, "--name", PROBE_APPLICATION_NAME, "--contextroot", - PROBE_APPLICATION_NAME); - deployed.push(PROBE_APPLICATION_NAME); - } - catch (GlassFishException exc) { - throw new TestContainerException(exc); - } - catch (IOException exc) { - throw new TestContainerException(exc); - } - return -1; - } - - public synchronized long install(InputStream stream) { - return install("local", stream); - } - - /** - * Deploys all Java EE modules defined in Pax Exam options. For options without an explicit - * application name, names app1, app2 etc. are generated on the fly. The context root defaults - * to the application name if not set in the option. - */ - public void deployModules() { - UrlDeploymentOption[] deploymentOptions = system.getOptions(UrlDeploymentOption.class); - int numModules = 0; - for (UrlDeploymentOption option : deploymentOptions) { - numModules++; - if (option.getName() == null) { - option.name("app" + numModules); - } - deployModule(option); - } - } - - /** - * Deploys the module specified by the given option. - * - * @param option - * deployment option - */ - private void deployModule(UrlDeploymentOption option) { - try { - String url = option.getURL(); - LOG.info("deploying module {}", url); - URI uri = new URL(url).toURI(); - String applicationName = option.getName(); - String contextRoot = option.getContextRoot(); - if (contextRoot == null) { - contextRoot = applicationName; - } - Deployer deployer = glassFish.getDeployer(); - deployer.deploy(uri, "--name", applicationName, "--contextroot", applicationName); - deployed.push(applicationName); - LOG.info("deployed module {}", url); - } - catch (IOException exc) { - throw new TestContainerException(exc); - } - catch (GlassFishException exc) { - throw new TestContainerException(exc); - } - catch (URISyntaxException exc) { - throw new TestContainerException(exc); - } - } - - /** - * Undeploys all modules and shuts down the GlassFish runtime. - */ - public synchronized void cleanup() { - undeployModules(); - try { - glassFish.stop(); - } - catch (GlassFishException exc) { - throw new TestContainerException(exc); - } - } - - /** - * Undeploys all deployed modules in reverse order. - */ - private void undeployModules() { - try { - Deployer deployer = glassFish.getDeployer(); - while (!deployed.isEmpty()) { - String applicationName = deployed.pop(); - deployer.undeploy(applicationName); - } - } - catch (GlassFishException exc) { - throw new TestContainerException(exc); - } - } - - /** - * Starts the GlassFish container. - */ - public TestContainer start() { - System.setProperty("java.protocol.handler.pkgs", "org.ops4j.pax.url"); - ConfigurationManager cm = new ConfigurationManager(); - configDirName = cm.getProperty(GLASSFISH_CONFIG_DIR_KEY, - "src/test/resources/glassfish-config"); - File domainConfig = new File(configDirName, "domain.xml"); - GlassFishProperties gfProps = new GlassFishProperties(); - if (domainConfig.exists()) { - gfProps.setConfigFileURI(domainConfig.toURI().toString()); - } - - try { - glassFish = GlassFishRuntime.bootstrap().newGlassFish(gfProps); - glassFish.start(); - - // set access point in test directory - String portNumber = getPortNumber(domainConfig); - testDirectory.setAccessPoint(new URI("http://localhost:" + portNumber - + "/Pax-Exam-Probe/")); - - deployModules(); - } - catch (GlassFishException e) { - throw new TestContainerException("Problem starting test container.", e); - } - catch (URISyntaxException e) { - throw new TestContainerException("Problem starting test container.", e); - } - return this; - } - - /** - * Reads the first port number from the domain.xml configuration. - * - * @param domainConfig - * @return port number as string - */ - private String getPortNumber(File domainConfig) { - try { - DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); - DocumentBuilder builder; - builder = factory.newDocumentBuilder(); - Document doc = builder.parse(domainConfig); - XPathFactory xpf = XPathFactory.newInstance(); - XPath xPath = xpf.newXPath(); - String port = xPath.evaluate(HTTP_PORT_XPATH, doc); - return port; - } - catch (ParserConfigurationException exc) { - throw new IllegalArgumentException(exc); - } - catch (SAXException exc) { - throw new IllegalArgumentException(exc); - } - catch (IOException exc) { - throw new IllegalArgumentException(exc); - } - catch (XPathExpressionException exc) { - throw new IllegalArgumentException(exc); - } - } - - /** - * Stops the test container gracefully, undeploying all modules and uninstalling all bundles. - */ - public TestContainer stop() { - if (glassFish != null) { - cleanup(); - system.clear(); - } - else { - LOG.warn("Framework does not exist. Called start() before ? "); - } - return this; - } - - @Override - public String toString() { - return "EmbeddedGlassFish"; - } - - @Override - public long installProbe(InputStream stream) { - install(stream); - this.warProbe = deployed.pop(); - return -1; - } - - @Override - public void uninstallProbe() { - try { - glassFish.getDeployer().undeploy(warProbe); - this.warProbe = null; - } - catch (GlassFishException exc) { - throw new TestContainerException(exc); - } - } -} diff --git a/containers/pax-exam-container-glassfish-embedded/src/main/java/org/ops4j/pax/exam/glassfish/embedded/EmbeddedGlassFishTestContainerFactory.java b/containers/pax-exam-container-glassfish-embedded/src/main/java/org/ops4j/pax/exam/glassfish/embedded/EmbeddedGlassFishTestContainerFactory.java deleted file mode 100644 index 2084fb4fb..000000000 --- a/containers/pax-exam-container-glassfish-embedded/src/main/java/org/ops4j/pax/exam/glassfish/embedded/EmbeddedGlassFishTestContainerFactory.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright 2012 Harald Wellmann - * - * Licensed 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. - */ -package org.ops4j.pax.exam.glassfish.embedded; - -import org.kohsuke.MetaInfServices; -import org.ops4j.pax.exam.ExamSystem; -import org.ops4j.pax.exam.TestContainer; -import org.ops4j.pax.exam.TestContainerFactory; - -/** - * A {@link TestContainerFactory} for GlassFish test containers. This factory is published in - * META-INF/services. - * - * @author Harald Wellmann - * @since 3.0.0 - */ -@MetaInfServices -public class EmbeddedGlassFishTestContainerFactory implements TestContainerFactory { - - /** - * Creates an Embedded GlassFish test container for the given exam system. - * - * @return array with one element - */ - public TestContainer[] create(ExamSystem system) { - EmbeddedGlassFishTestContainer container = new EmbeddedGlassFishTestContainer(system); - return new TestContainer[] { container }; - } -} diff --git a/containers/pax-exam-container-glassfish-embedded/src/test/java/org/ops4j/pax/exam/glassfish/embedded/EmbeddedGlassFishLaunchTest.java b/containers/pax-exam-container-glassfish-embedded/src/test/java/org/ops4j/pax/exam/glassfish/embedded/EmbeddedGlassFishLaunchTest.java deleted file mode 100644 index ad3cdda03..000000000 --- a/containers/pax-exam-container-glassfish-embedded/src/test/java/org/ops4j/pax/exam/glassfish/embedded/EmbeddedGlassFishLaunchTest.java +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Copyright 2012 Harald Wellmann - * - * Licensed 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. - */ -package org.ops4j.pax.exam.glassfish.embedded; - -import java.net.URI; - -import org.glassfish.embeddable.Deployer; -import org.glassfish.embeddable.GlassFish; -import org.glassfish.embeddable.GlassFishProperties; -import org.glassfish.embeddable.GlassFishRuntime; -import org.junit.Test; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -public class EmbeddedGlassFishLaunchTest { - - private static Logger log = LoggerFactory.getLogger(EmbeddedGlassFishLaunchTest.class); - - @Test - public void launchGlassFish() throws Exception { - System.setProperty("java.protocol.handler.pkgs", "org.ops4j.pax.url"); - System.setProperty("java.util.logging.config.file", - "src/test/resources/glassfish-config/logging.properties"); - - GlassFishProperties gfProps = new GlassFishProperties(); - GlassFish gf = GlassFishRuntime.bootstrap().newGlassFish(gfProps); - gf.start(); - - Deployer deployer = gf.getDeployer(); - for (String appName : deployer.getDeployedApplications()) { - log.info("undeploying " + appName); - deployer.undeploy(appName); - } - - URI sampleWarUri = new URI("mvn:org.apache.wicket/wicket-examples/1.5.3/war"); - String sampleAppName = "wicket-examples"; - - log.info("deploying " + sampleAppName); - deployer.deploy(sampleWarUri, "--name", sampleAppName, "--contextroot", sampleAppName); - - log.info("undeploying " + sampleAppName); - deployer.undeploy(sampleAppName); - - log.info("stopping GlassFish"); - gf.stop(); - } -} diff --git a/containers/pax-exam-container-glassfish-embedded/src/test/resources/exam.properties b/containers/pax-exam-container-glassfish-embedded/src/test/resources/exam.properties deleted file mode 100644 index 5839663a3..000000000 --- a/containers/pax-exam-container-glassfish-embedded/src/test/resources/exam.properties +++ /dev/null @@ -1 +0,0 @@ -pax.exam.system = javaee diff --git a/containers/pax-exam-container-glassfish-embedded/src/test/resources/glassfish-config/domain.xml b/containers/pax-exam-container-glassfish-embedded/src/test/resources/glassfish-config/domain.xml deleted file mode 100644 index 00e784df1..000000000 --- a/containers/pax-exam-container-glassfish-embedded/src/test/resources/glassfish-config/domain.xml +++ /dev/null @@ -1,157 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Djavax.net.ssl.keyStore=${com.sun.aas.instanceRoot}/config/keystore.jks - -Djavax.net.ssl.trustStore=${com.sun.aas.instanceRoot}/config/cacerts.jks - -Dorg.glassfish.jms.InitializeOnDemand=true - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/containers/pax-exam-container-glassfish-embedded/src/test/resources/glassfish-config/logging.properties b/containers/pax-exam-container-glassfish-embedded/src/test/resources/glassfish-config/logging.properties deleted file mode 100644 index 88be40f40..000000000 --- a/containers/pax-exam-container-glassfish-embedded/src/test/resources/glassfish-config/logging.properties +++ /dev/null @@ -1,10 +0,0 @@ -handlers = org.slf4j.bridge.SLF4JBridgeHandler -com.sun.enterprise.server.logging.GFFileHandler.flushFrequency=1 -com.sun.enterprise.server.logging.GFFileHandler.file=${com.sun.aas.instanceRoot}/logs/server.log -com.sun.enterprise.server.logging.GFFileHandler.rotationTimelimitInMinutes=0 -com.sun.enterprise.server.logging.GFFileHandler.logtoConsole=false -com.sun.enterprise.server.logging.GFFileHandler.rotationLimitInBytes=2000000 -com.sun.enterprise.server.logging.GFFileHandler.alarms=false -com.sun.enterprise.server.logging.GFFileHandler.formatter=com.sun.enterprise.server.logging.UniformLogFormatter -com.sun.enterprise.server.logging.GFFileHandler.retainErrorsStasticsForHours=0 -#org.jboss.weld.level = FINEST diff --git a/containers/pax-exam-container-glassfish-embedded/src/test/resources/logback.xml b/containers/pax-exam-container-glassfish-embedded/src/test/resources/logback.xml deleted file mode 100644 index 7f8b99f47..000000000 --- a/containers/pax-exam-container-glassfish-embedded/src/test/resources/logback.xml +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - - - %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n - - - - - - target/test.log - - %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n - - - - - - - - - - \ No newline at end of file diff --git a/itest/javaee/invoker.properties b/itest/javaee/invoker.properties deleted file mode 100644 index d5a1730bb..000000000 --- a/itest/javaee/invoker.properties +++ /dev/null @@ -1 +0,0 @@ -invoker.goals = clean test diff --git a/itest/javaee/pom.xml b/itest/javaee/pom.xml deleted file mode 100644 index 847460d36..000000000 --- a/itest/javaee/pom.xml +++ /dev/null @@ -1,118 +0,0 @@ - - - - - 4.0.0 - - - org.ops4j.pax - exam - 4.13.6-SNAPSHOT - ../../pom - - - org.ops4j.pax.exam.itest - exam-itest-javaee - pom - - OPS4J Pax Exam Java EE Integration Tests - - - - - matrix - - src/it/regression-javaee - src/it/regression-javaee-testng - src/it/regression-javaee-userprobe - src/it/regression-javaee-moviefun - - - - - invoker - - true - - - - - org.apache.maven.plugins - maven-invoker-plugin - - true - - - - glassfish-embedded - - run - - - - glassfish-embedded - - ${project.build.directory}/glassfish-embedded - - regression-javaee-data/pom.xml - - - - - - - - - - - glassfish-embedded - - false - - - glassfish-embedded - - - - org.ops4j.pax.exam - pax-exam-container-glassfish-embedded - ${project.version} - test - - - - - - org.apache.maven.plugins - maven-surefire-plugin - - - src/test/resources/glassfish-config - - - - - - - - - - - - - org.apache.maven.plugins - maven-surefire-plugin - - none - provided - - ${pax.exam.container} - ${pax.exam.framework} - - - - - - - diff --git a/itest/javaee/src/it/regression-javaee-data/pom.xml b/itest/javaee/src/it/regression-javaee-data/pom.xml deleted file mode 100644 index a8e5ecc10..000000000 --- a/itest/javaee/src/it/regression-javaee-data/pom.xml +++ /dev/null @@ -1,193 +0,0 @@ - - - - - 4.0.0 - - - org.ops4j.pax.exam.itest - exam-itest-javaee - 4.13.6-SNAPSHOT - ../../.. - - - regression-javaee-data - jar - - OPS4J Pax Exam Java EE Regression Tests - DeltaSpike Data - - - - - org.ops4j.pax.exam - pax-exam-invoker-jaxrs2 - ${project.version} - test - - - - org.jboss.resteasy - resteasy-client - test - - - - org.ops4j.pax.exam - pax-exam-servlet-bridge - ${project.version} - test - - - - org.ops4j.pax.exam.samples - pax-exam-sample1-repo - ${project.version} - test - - - - org.ops4j.pax.exam.samples - pax-exam-sample1-service - ${project.version} - test - - - - org.ops4j.pax.exam - pax-exam-junit4 - ${project.version} - test - - - - org.ops4j.pax.exam - pax-exam-cdi - ${project.version} - test - - - - org.ops4j.pax.exam - pax-exam-link-assembly - ${project.version} - test - - - - org.ops4j.pax.url - pax-url-link - test - - - - org.ops4j.pax.url - pax-url-classpath - test - - - - org.ops4j.pax.url - pax-url-aether - test - - - - - ch.qos.logback - logback-core - test - - - - ch.qos.logback - logback-classic - test - - - - org.slf4j - jul-to-slf4j - test - - - - org.slf4j - jcl-over-slf4j - test - - - - org.slf4j - slf4j-api - test - - - - jakarta.inject - jakarta.inject-api - provided - - - - jakarta.enterprise - jakarta.enterprise.cdi-api - test - - - - org.apache.deltaspike.modules - deltaspike-jpa-module-impl - - - - org.apache.deltaspike.modules - deltaspike-data-module-impl - - - - jakarta.platform - jakarta.jakartaee-api - provided - - - - - - - - src/test/resources - true - - - - - - - org.apache.maven.plugins - maven-surefire-plugin - - - persuite - - - **/perclass/*.java - - - - - - true - none - provided - - ${pax.exam.container} - ${pax.exam.framework} - 6666 - - - - - - - diff --git a/itest/javaee/src/it/regression-javaee-data/src/main/webapp/WEB-INF/beans.xml b/itest/javaee/src/it/regression-javaee-data/src/main/webapp/WEB-INF/beans.xml deleted file mode 100644 index d37a5afdb..000000000 --- a/itest/javaee/src/it/regression-javaee-data/src/main/webapp/WEB-INF/beans.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - org.apache.deltaspike.jpa.impl.transaction.TransactionalInterceptor - - diff --git a/itest/javaee/src/it/regression-javaee-data/src/test/java/org/ops4j/pax/exam/regression/javaee/data/AuthorRepositoryTest.java b/itest/javaee/src/it/regression-javaee-data/src/test/java/org/ops4j/pax/exam/regression/javaee/data/AuthorRepositoryTest.java deleted file mode 100644 index 63083583c..000000000 --- a/itest/javaee/src/it/regression-javaee-data/src/test/java/org/ops4j/pax/exam/regression/javaee/data/AuthorRepositoryTest.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright 2013 Harald Wellmann - * - * Licensed 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. - * - */ -package org.ops4j.pax.exam.regression.javaee.data; - -import static org.hamcrest.CoreMatchers.is; -import static org.junit.Assert.assertThat; - -import javax.inject.Inject; - -import org.junit.Test; -import org.junit.runner.RunWith; -import org.ops4j.pax.exam.junit.PaxExam; -import org.ops4j.pax.exam.sample1.model.Author; -import org.ops4j.pax.exam.sample1.repo.AuthorRepository; -import org.ops4j.pax.exam.spi.reactors.ExamReactorStrategy; -import org.ops4j.pax.exam.spi.reactors.PerSuite; - -@RunWith(PaxExam.class) -@ExamReactorStrategy(PerSuite.class) -public class AuthorRepositoryTest { - - @Inject - private AuthorRepository repo; - - @Test - public void byAuthor() { - Author author = new Author(); - author.setFirstName("Heinrich"); - author.setLastName("Heine"); - repo.saveAndFlush(author); - - assertThat(repo.count(), is(3L)); - } -} diff --git a/itest/javaee/src/it/regression-javaee-data/src/test/java/org/ops4j/pax/exam/regression/javaee/data/TitleTest.java b/itest/javaee/src/it/regression-javaee-data/src/test/java/org/ops4j/pax/exam/regression/javaee/data/TitleTest.java deleted file mode 100644 index d673ddf5d..000000000 --- a/itest/javaee/src/it/regression-javaee-data/src/test/java/org/ops4j/pax/exam/regression/javaee/data/TitleTest.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright 2013 Harald Wellmann - * - * Licensed 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. - * - */ -package org.ops4j.pax.exam.regression.javaee.data; - -import static org.junit.Assert.assertEquals; - -import java.util.List; - -import javax.inject.Inject; - -import org.junit.Test; -import org.junit.runner.RunWith; -import org.ops4j.pax.exam.junit.PaxExam; -import org.ops4j.pax.exam.sample1.model.Book; -import org.ops4j.pax.exam.sample1.repo.BookRepository; -import org.ops4j.pax.exam.spi.reactors.ExamReactorStrategy; -import org.ops4j.pax.exam.spi.reactors.PerSuite; - -@RunWith(PaxExam.class) -@ExamReactorStrategy(PerSuite.class) -public class TitleTest { - - @Inject - private BookRepository bookRepo; - - @Test - public void byTitle() { - List books = bookRepo.findByTitle("East of Eden"); - assertEquals(1, books.size()); - - Book book = books.get(0); - assertEquals("Steinbeck", book.getAuthor().getLastName()); - } -} diff --git a/itest/javaee/src/it/regression-javaee-data/src/test/resources/META-INF/apache-deltaspike.properties b/itest/javaee/src/it/regression-javaee-data/src/test/resources/META-INF/apache-deltaspike.properties deleted file mode 100644 index a861ad729..000000000 --- a/itest/javaee/src/it/regression-javaee-data/src/test/resources/META-INF/apache-deltaspike.properties +++ /dev/null @@ -1 +0,0 @@ -globalAlternatives.org.apache.deltaspike.jpa.spi.transaction.TransactionStrategy=org.apache.deltaspike.jpa.impl.transaction.BeanManagedUserTransactionStrategy diff --git a/itest/javaee/src/it/regression-javaee-data/src/test/resources/META-INF/beans.xml b/itest/javaee/src/it/regression-javaee-data/src/test/resources/META-INF/beans.xml deleted file mode 100644 index bf49c83be..000000000 --- a/itest/javaee/src/it/regression-javaee-data/src/test/resources/META-INF/beans.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - org.apache.deltaspike.jpa.impl.transaction.TransactionalInterceptor - - diff --git a/itest/javaee/src/it/regression-javaee-data/src/test/resources/exam.properties b/itest/javaee/src/it/regression-javaee-data/src/test/resources/exam.properties deleted file mode 100644 index 2f25d5f6b..000000000 --- a/itest/javaee/src/it/regression-javaee-data/src/test/resources/exam.properties +++ /dev/null @@ -1,2 +0,0 @@ -pax.exam.system = javaee -pax.exam.glassfish.config.overwrite = true diff --git a/itest/javaee/src/it/regression-javaee-data/src/test/resources/glassfish-config/domain.xml b/itest/javaee/src/it/regression-javaee-data/src/test/resources/glassfish-config/domain.xml deleted file mode 100644 index 17859a9f7..000000000 --- a/itest/javaee/src/it/regression-javaee-data/src/test/resources/glassfish-config/domain.xml +++ /dev/null @@ -1,474 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -XX:MaxPermSize=192m - -client - -Djava.awt.headless=true - -Djavax.management.builder.initial=com.sun.enterprise.v3.admin.AppServerMBeanServerBuilder - -XX:+UnlockDiagnosticVMOptions - -Djava.endorsed.dirs=${com.sun.aas.installRoot}/modules/endorsed${path.separator}${com.sun.aas.installRoot}/lib/endorsed - -Djava.security.policy=${com.sun.aas.instanceRoot}/config/server.policy - -Djava.security.auth.login.config=${com.sun.aas.instanceRoot}/config/login.conf - -Dcom.sun.enterprise.security.httpsOutboundKeyAlias=s1as - -Xmx512m - -DwriteDefaultElementsToXml=true - -Djavax.net.ssl.keyStore=${com.sun.aas.instanceRoot}/config/keystore.jks - -Djavax.net.ssl.trustStore=${com.sun.aas.instanceRoot}/config/cacerts.jks - -Djava.ext.dirs=${com.sun.aas.javaRoot}/lib/ext${path.separator}${com.sun.aas.javaRoot}/jre/lib/ext${path.separator}${com.sun.aas.instanceRoot}/lib/ext - -Djdbc.drivers=org.apache.derby.jdbc.ClientDriver - -DANTLR_USE_DIRECT_CLASS_LOADING=true - -Dcom.sun.enterprise.config.config_environment_factory_class=com.sun.enterprise.config.serverbeans.AppserverConfigEnvironmentFactory - -Dorg.glassfish.additionalOSGiBundlesToStart=org.apache.felix.shell,org.apache.felix.gogo.runtime,org.apache.felix.gogo.shell,org.apache.felix.gogo.command,org.apache.felix.shell.remote,org.apache.felix.fileinstall - -Dosgi.shell.telnet.port=6666 - -Dosgi.shell.telnet.maxconn=1 - -Dosgi.shell.telnet.ip=127.0.0.1 - -Dgosh.args=--nointeractive - -Dfelix.fileinstall.dir=${com.sun.aas.installRoot}/modules/autostart/ - -Dfelix.fileinstall.poll=5000 - -Dfelix.fileinstall.log.level=2 - -Dfelix.fileinstall.bundles.new.start=true - -Dfelix.fileinstall.bundles.startTransient=true - -Dfelix.fileinstall.disableConfigSave=false - -Duser.language=en - -XX:NewRatio=2 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -XX:MaxPermSize=192m - -server - -Djava.awt.headless=true - -XX:+UnlockDiagnosticVMOptions - -Djava.endorsed.dirs=${com.sun.aas.installRoot}/modules/endorsed${path.separator}${com.sun.aas.installRoot}/lib/endorsed - -Djava.security.policy=${com.sun.aas.instanceRoot}/config/server.policy - -Djava.security.auth.login.config=${com.sun.aas.instanceRoot}/config/login.conf - -Dcom.sun.enterprise.security.httpsOutboundKeyAlias=s1as - -Djavax.net.ssl.keyStore=${com.sun.aas.instanceRoot}/config/keystore.jks - -Djavax.net.ssl.trustStore=${com.sun.aas.instanceRoot}/config/cacerts.jks - -Djava.ext.dirs=${com.sun.aas.javaRoot}/lib/ext${path.separator}${com.sun.aas.javaRoot}/jre/lib/ext${path.separator}${com.sun.aas.instanceRoot}/lib/ext - -Djdbc.drivers=org.apache.derby.jdbc.ClientDriver - -DANTLR_USE_DIRECT_CLASS_LOADING=true - -Dcom.sun.enterprise.config.config_environment_factory_class=com.sun.enterprise.config.serverbeans.AppserverConfigEnvironmentFactory - -XX:NewRatio=2 - -Xmx512m - -Dorg.glassfish.additionalOSGiBundlesToStart=org.apache.felix.shell,org.apache.felix.gogo.runtime,org.apache.felix.gogo.shell,org.apache.felix.gogo.command,org.apache.felix.fileinstall - -Dosgi.shell.telnet.port=${OSGI_SHELL_TELNET_PORT} - -Dosgi.shell.telnet.maxconn=1 - -Dosgi.shell.telnet.ip=127.0.0.1 - -Dgosh.args=--noshutdown -c noop=true - -Dfelix.fileinstall.dir=${com.sun.aas.installRoot}/modules/autostart/ - -Dfelix.fileinstall.poll=5000 - -Dfelix.fileinstall.log.level=3 - -Dfelix.fileinstall.bundles.new.start=true - -Dfelix.fileinstall.bundles.startTransient=true - -Dfelix.fileinstall.disableConfigSave=false - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/itest/javaee/src/it/regression-javaee-data/src/test/resources/glassfish-config/logging.properties b/itest/javaee/src/it/regression-javaee-data/src/test/resources/glassfish-config/logging.properties deleted file mode 100644 index 88be40f40..000000000 --- a/itest/javaee/src/it/regression-javaee-data/src/test/resources/glassfish-config/logging.properties +++ /dev/null @@ -1,10 +0,0 @@ -handlers = org.slf4j.bridge.SLF4JBridgeHandler -com.sun.enterprise.server.logging.GFFileHandler.flushFrequency=1 -com.sun.enterprise.server.logging.GFFileHandler.file=${com.sun.aas.instanceRoot}/logs/server.log -com.sun.enterprise.server.logging.GFFileHandler.rotationTimelimitInMinutes=0 -com.sun.enterprise.server.logging.GFFileHandler.logtoConsole=false -com.sun.enterprise.server.logging.GFFileHandler.rotationLimitInBytes=2000000 -com.sun.enterprise.server.logging.GFFileHandler.alarms=false -com.sun.enterprise.server.logging.GFFileHandler.formatter=com.sun.enterprise.server.logging.UniformLogFormatter -com.sun.enterprise.server.logging.GFFileHandler.retainErrorsStasticsForHours=0 -#org.jboss.weld.level = FINEST diff --git a/itest/javaee/src/it/regression-javaee-data/src/test/resources/logback.xml b/itest/javaee/src/it/regression-javaee-data/src/test/resources/logback.xml deleted file mode 100644 index bba0e7638..000000000 --- a/itest/javaee/src/it/regression-javaee-data/src/test/resources/logback.xml +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - - - %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n - - - - - - target/test.log - - %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n - - - - - - - - - - \ No newline at end of file diff --git a/itest/javaee/src/it/regression-javaee-moviefun/pom.xml b/itest/javaee/src/it/regression-javaee-moviefun/pom.xml deleted file mode 100644 index 204b2bb42..000000000 --- a/itest/javaee/src/it/regression-javaee-moviefun/pom.xml +++ /dev/null @@ -1,150 +0,0 @@ - - - - - 4.0.0 - - - org.ops4j.pax.exam.itest - exam-itest-javaee - 4.13.6-SNAPSHOT - ../../.. - - - regression-javaee-moviefun - jar - - OPS4J Pax Exam Java EE Tests - MovieFun - - - - - org.ops4j.pax.exam - pax-exam-invoker-jaxrs2 - ${project.version} - test - - - - org.jboss.resteasy - resteasy-client - test - - - - org.ops4j.pax.exam - pax-exam-servlet-bridge - ${project.version} - test - - - - org.ops4j.pax.exam.samples - pax-exam-sample7-service - ${project.version} - test - - - org.ops4j.pax.exam - pax-exam-junit4 - ${project.version} - test - - - - org.ops4j.pax.exam - pax-exam-cdi - ${project.version} - test - - - - org.ops4j.pax.exam - pax-exam-link-assembly - ${project.version} - test - - - - org.ops4j.pax.url - pax-url-link - test - - - - org.ops4j.pax.url - pax-url-classpath - test - - - - - ch.qos.logback - logback-core - test - - - - ch.qos.logback - logback-classic - test - - - - org.slf4j - jul-to-slf4j - test - - - - org.slf4j - jcl-over-slf4j - test - - - - org.slf4j - slf4j-api - test - - - - jakarta.inject - jakarta.inject-api - provided - - - - - - - - - org.apache.maven.plugins - maven-surefire-plugin - - - persuite - - - **/perclass/*.java - - - - - - true - none - provided - - ${pax.exam.container} - ${pax.exam.framework} - 6666 - - - - - - - diff --git a/itest/javaee/src/it/regression-javaee-moviefun/src/test/java/org/ops4j/pax/exam/regression/javaee/moviefun/MoviesEJBTest.java b/itest/javaee/src/it/regression-javaee-moviefun/src/test/java/org/ops4j/pax/exam/regression/javaee/moviefun/MoviesEJBTest.java deleted file mode 100644 index 3c4481285..000000000 --- a/itest/javaee/src/it/regression-javaee-moviefun/src/test/java/org/ops4j/pax/exam/regression/javaee/moviefun/MoviesEJBTest.java +++ /dev/null @@ -1,78 +0,0 @@ -/** - * 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. - */ -package org.ops4j.pax.exam.regression.javaee.moviefun; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; - -import java.util.List; - -import javax.inject.Inject; - -import org.junit.After; -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.ops4j.pax.exam.junit.PaxExam; -import org.superbiz.moviefun.Movie; -import org.superbiz.moviefun.Movies; -import org.superbiz.moviefun.setup.Setup; - -@RunWith(PaxExam.class) -public class MoviesEJBTest { - - @Inject - private Movies movies; - - @Inject - private Setup setup; - - @Before - @After - public void clean() { - movies.clean(); - } - - @Test - public void shouldBeAbleToAddAMovie() throws Exception { - assertNotNull("Verify that the ejb was injected", movies); - assertNotNull("Verify that the setup CDI bean was injected", setup); - - setup.setup(); - - assertEquals(7, movies.getMovies().size()); - - Movie movie = new Movie(); - movie.setDirector("Michael Bay"); - movie.setGenre("Action"); - movie.setRating(9); - movie.setTitle("Bad Boys"); - movie.setYear(1995); - movies.addMovie(movie); - - assertEquals(8, movies.count()); - List moviesFound = movies.findByTitle("Bad Boys"); - - assertEquals(1, moviesFound.size()); - assertEquals("Michael Bay", moviesFound.get(0).getDirector()); - assertEquals("Action", moviesFound.get(0).getGenre()); - assertEquals(9, moviesFound.get(0).getRating()); - assertEquals("Bad Boys", moviesFound.get(0).getTitle()); - assertEquals(1995, moviesFound.get(0).getYear()); - } - -} diff --git a/itest/javaee/src/it/regression-javaee-moviefun/src/test/resources/exam.properties b/itest/javaee/src/it/regression-javaee-moviefun/src/test/resources/exam.properties deleted file mode 100644 index 2f25d5f6b..000000000 --- a/itest/javaee/src/it/regression-javaee-moviefun/src/test/resources/exam.properties +++ /dev/null @@ -1,2 +0,0 @@ -pax.exam.system = javaee -pax.exam.glassfish.config.overwrite = true diff --git a/itest/javaee/src/it/regression-javaee-moviefun/src/test/resources/glassfish-config/domain.xml b/itest/javaee/src/it/regression-javaee-moviefun/src/test/resources/glassfish-config/domain.xml deleted file mode 100644 index 17859a9f7..000000000 --- a/itest/javaee/src/it/regression-javaee-moviefun/src/test/resources/glassfish-config/domain.xml +++ /dev/null @@ -1,474 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -XX:MaxPermSize=192m - -client - -Djava.awt.headless=true - -Djavax.management.builder.initial=com.sun.enterprise.v3.admin.AppServerMBeanServerBuilder - -XX:+UnlockDiagnosticVMOptions - -Djava.endorsed.dirs=${com.sun.aas.installRoot}/modules/endorsed${path.separator}${com.sun.aas.installRoot}/lib/endorsed - -Djava.security.policy=${com.sun.aas.instanceRoot}/config/server.policy - -Djava.security.auth.login.config=${com.sun.aas.instanceRoot}/config/login.conf - -Dcom.sun.enterprise.security.httpsOutboundKeyAlias=s1as - -Xmx512m - -DwriteDefaultElementsToXml=true - -Djavax.net.ssl.keyStore=${com.sun.aas.instanceRoot}/config/keystore.jks - -Djavax.net.ssl.trustStore=${com.sun.aas.instanceRoot}/config/cacerts.jks - -Djava.ext.dirs=${com.sun.aas.javaRoot}/lib/ext${path.separator}${com.sun.aas.javaRoot}/jre/lib/ext${path.separator}${com.sun.aas.instanceRoot}/lib/ext - -Djdbc.drivers=org.apache.derby.jdbc.ClientDriver - -DANTLR_USE_DIRECT_CLASS_LOADING=true - -Dcom.sun.enterprise.config.config_environment_factory_class=com.sun.enterprise.config.serverbeans.AppserverConfigEnvironmentFactory - -Dorg.glassfish.additionalOSGiBundlesToStart=org.apache.felix.shell,org.apache.felix.gogo.runtime,org.apache.felix.gogo.shell,org.apache.felix.gogo.command,org.apache.felix.shell.remote,org.apache.felix.fileinstall - -Dosgi.shell.telnet.port=6666 - -Dosgi.shell.telnet.maxconn=1 - -Dosgi.shell.telnet.ip=127.0.0.1 - -Dgosh.args=--nointeractive - -Dfelix.fileinstall.dir=${com.sun.aas.installRoot}/modules/autostart/ - -Dfelix.fileinstall.poll=5000 - -Dfelix.fileinstall.log.level=2 - -Dfelix.fileinstall.bundles.new.start=true - -Dfelix.fileinstall.bundles.startTransient=true - -Dfelix.fileinstall.disableConfigSave=false - -Duser.language=en - -XX:NewRatio=2 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -XX:MaxPermSize=192m - -server - -Djava.awt.headless=true - -XX:+UnlockDiagnosticVMOptions - -Djava.endorsed.dirs=${com.sun.aas.installRoot}/modules/endorsed${path.separator}${com.sun.aas.installRoot}/lib/endorsed - -Djava.security.policy=${com.sun.aas.instanceRoot}/config/server.policy - -Djava.security.auth.login.config=${com.sun.aas.instanceRoot}/config/login.conf - -Dcom.sun.enterprise.security.httpsOutboundKeyAlias=s1as - -Djavax.net.ssl.keyStore=${com.sun.aas.instanceRoot}/config/keystore.jks - -Djavax.net.ssl.trustStore=${com.sun.aas.instanceRoot}/config/cacerts.jks - -Djava.ext.dirs=${com.sun.aas.javaRoot}/lib/ext${path.separator}${com.sun.aas.javaRoot}/jre/lib/ext${path.separator}${com.sun.aas.instanceRoot}/lib/ext - -Djdbc.drivers=org.apache.derby.jdbc.ClientDriver - -DANTLR_USE_DIRECT_CLASS_LOADING=true - -Dcom.sun.enterprise.config.config_environment_factory_class=com.sun.enterprise.config.serverbeans.AppserverConfigEnvironmentFactory - -XX:NewRatio=2 - -Xmx512m - -Dorg.glassfish.additionalOSGiBundlesToStart=org.apache.felix.shell,org.apache.felix.gogo.runtime,org.apache.felix.gogo.shell,org.apache.felix.gogo.command,org.apache.felix.fileinstall - -Dosgi.shell.telnet.port=${OSGI_SHELL_TELNET_PORT} - -Dosgi.shell.telnet.maxconn=1 - -Dosgi.shell.telnet.ip=127.0.0.1 - -Dgosh.args=--noshutdown -c noop=true - -Dfelix.fileinstall.dir=${com.sun.aas.installRoot}/modules/autostart/ - -Dfelix.fileinstall.poll=5000 - -Dfelix.fileinstall.log.level=3 - -Dfelix.fileinstall.bundles.new.start=true - -Dfelix.fileinstall.bundles.startTransient=true - -Dfelix.fileinstall.disableConfigSave=false - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/itest/javaee/src/it/regression-javaee-moviefun/src/test/resources/glassfish-config/logging.properties b/itest/javaee/src/it/regression-javaee-moviefun/src/test/resources/glassfish-config/logging.properties deleted file mode 100644 index 88be40f40..000000000 --- a/itest/javaee/src/it/regression-javaee-moviefun/src/test/resources/glassfish-config/logging.properties +++ /dev/null @@ -1,10 +0,0 @@ -handlers = org.slf4j.bridge.SLF4JBridgeHandler -com.sun.enterprise.server.logging.GFFileHandler.flushFrequency=1 -com.sun.enterprise.server.logging.GFFileHandler.file=${com.sun.aas.instanceRoot}/logs/server.log -com.sun.enterprise.server.logging.GFFileHandler.rotationTimelimitInMinutes=0 -com.sun.enterprise.server.logging.GFFileHandler.logtoConsole=false -com.sun.enterprise.server.logging.GFFileHandler.rotationLimitInBytes=2000000 -com.sun.enterprise.server.logging.GFFileHandler.alarms=false -com.sun.enterprise.server.logging.GFFileHandler.formatter=com.sun.enterprise.server.logging.UniformLogFormatter -com.sun.enterprise.server.logging.GFFileHandler.retainErrorsStasticsForHours=0 -#org.jboss.weld.level = FINEST diff --git a/itest/javaee/src/it/regression-javaee-moviefun/src/test/resources/logback.xml b/itest/javaee/src/it/regression-javaee-moviefun/src/test/resources/logback.xml deleted file mode 100644 index 7f8b99f47..000000000 --- a/itest/javaee/src/it/regression-javaee-moviefun/src/test/resources/logback.xml +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - - - %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n - - - - - - target/test.log - - %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n - - - - - - - - - - \ No newline at end of file diff --git a/itest/javaee/src/it/regression-javaee-testng/pom.xml b/itest/javaee/src/it/regression-javaee-testng/pom.xml deleted file mode 100644 index 937a3d172..000000000 --- a/itest/javaee/src/it/regression-javaee-testng/pom.xml +++ /dev/null @@ -1,132 +0,0 @@ - - - - - 4.0.0 - - - org.ops4j.pax.exam.itest - exam-itest-javaee - 4.13.6-SNAPSHOT - ../../.. - - - regression-javaee-testng - jar - - OPS4J Pax Exam Java EE Container Regression Tests with TestNG - - - - org.ops4j.pax.exam - pax-exam-testng-servlet-bridge - ${project.version} - test - - - - - org.ops4j.pax.exam.samples - pax-exam-sample1-service - ${project.version} - test - - - org.ops4j.pax.exam - pax-exam-testng - ${project.version} - test - - - - org.ops4j.pax.exam - pax-exam-cdi - ${project.version} - test - - - - org.ops4j.pax.exam - pax-exam-link-assembly - ${project.version} - test - - - org.ops4j.pax.url - pax-url-link - test - - - org.ops4j.pax.url - pax-url-classpath - test - - - - - ch.qos.logback - logback-core - test - - - - ch.qos.logback - logback-classic - test - - - - org.slf4j - jul-to-slf4j - test - - - - org.slf4j - jcl-over-slf4j - test - - - - org.slf4j - slf4j-api - test - - - - org.slf4j - slf4j-ext - test - - - - jakarta.platform - jakarta.jakartaee-api - provided - - - - - - - - - org.apache.maven.plugins - maven-surefire-plugin - - true - none - provided - - ${pax.exam.container} - ${pax.exam.framework} - 6666 - - - - - - - - diff --git a/itest/javaee/src/it/regression-javaee-testng/src/test/java/org/ops4j/pax/exam/regression/javaee/AuthorTest.java b/itest/javaee/src/it/regression-javaee-testng/src/test/java/org/ops4j/pax/exam/regression/javaee/AuthorTest.java deleted file mode 100644 index f1538cecd..000000000 --- a/itest/javaee/src/it/regression-javaee-testng/src/test/java/org/ops4j/pax/exam/regression/javaee/AuthorTest.java +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright 2012 Harald Wellmann - * - * Licensed 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. - * - */ - -package org.ops4j.pax.exam.regression.javaee; - -import static org.testng.Assert.assertEquals; - -import java.util.List; - -import javax.inject.Inject; - -import org.ops4j.pax.exam.sample1.model.Book; -import org.ops4j.pax.exam.sample1.service.LibraryService; -import org.ops4j.pax.exam.testng.listener.PaxExam; -import org.ops4j.pax.exam.util.Transactional; -import org.testng.annotations.Listeners; -import org.testng.annotations.Test; - -@Listeners(PaxExam.class) -public class AuthorTest { - - @Inject - private LibraryService service; - - @Test - public void byAuthor() { - List books = service.findBooksByAuthor("Mann"); - assertEquals(1, books.size()); - - Book book = books.get(0); - assertEquals("Buddenbrooks", book.getTitle()); - } - - @Test - @Transactional - public void numAuthors() { - assertEquals(2, service.getNumAuthors()); - service.createAuthor("Theodor", "Storm"); - assertEquals(3, service.getNumAuthors()); - } - - @Test - public void numAuthorsAfterTransaction() { - assertEquals(2, service.getNumAuthors()); - } -} diff --git a/itest/javaee/src/it/regression-javaee-testng/src/test/java/org/ops4j/pax/exam/regression/javaee/TitleTest.java b/itest/javaee/src/it/regression-javaee-testng/src/test/java/org/ops4j/pax/exam/regression/javaee/TitleTest.java deleted file mode 100644 index 8decbf42f..000000000 --- a/itest/javaee/src/it/regression-javaee-testng/src/test/java/org/ops4j/pax/exam/regression/javaee/TitleTest.java +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright 2012 Harald Wellmann - * - * Licensed 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. - * - */ -package org.ops4j.pax.exam.regression.javaee; - -import static org.testng.Assert.assertEquals; - -import java.util.List; - -import javax.inject.Inject; - -import org.ops4j.pax.exam.sample1.model.Book; -import org.ops4j.pax.exam.sample1.service.LibraryService; -import org.ops4j.pax.exam.testng.listener.PaxExam; -import org.testng.annotations.AfterMethod; -import org.testng.annotations.BeforeMethod; -import org.testng.annotations.Listeners; -import org.testng.annotations.Test; - -@Listeners(PaxExam.class) -public class TitleTest { - - @Inject - private LibraryService service; - - @BeforeMethod - public void setUp() { - System.out.println("********** beforeMethod"); - } - - @AfterMethod - public void tearDown() { - System.out.println("********** afterMethod"); - } - - @Test - public void byTitle() { - System.out.println("********** byTitle"); - List books = service.findBooksByTitle("East of Eden"); - assertEquals(1, books.size()); - - Book book = books.get(0); - assertEquals("Steinbeck", book.getAuthor().getLastName()); - } -} diff --git a/itest/javaee/src/it/regression-javaee-testng/src/test/resources/exam.properties b/itest/javaee/src/it/regression-javaee-testng/src/test/resources/exam.properties deleted file mode 100644 index 2f25d5f6b..000000000 --- a/itest/javaee/src/it/regression-javaee-testng/src/test/resources/exam.properties +++ /dev/null @@ -1,2 +0,0 @@ -pax.exam.system = javaee -pax.exam.glassfish.config.overwrite = true diff --git a/itest/javaee/src/it/regression-javaee-testng/src/test/resources/glassfish-config/domain.xml b/itest/javaee/src/it/regression-javaee-testng/src/test/resources/glassfish-config/domain.xml deleted file mode 100644 index 17859a9f7..000000000 --- a/itest/javaee/src/it/regression-javaee-testng/src/test/resources/glassfish-config/domain.xml +++ /dev/null @@ -1,474 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -XX:MaxPermSize=192m - -client - -Djava.awt.headless=true - -Djavax.management.builder.initial=com.sun.enterprise.v3.admin.AppServerMBeanServerBuilder - -XX:+UnlockDiagnosticVMOptions - -Djava.endorsed.dirs=${com.sun.aas.installRoot}/modules/endorsed${path.separator}${com.sun.aas.installRoot}/lib/endorsed - -Djava.security.policy=${com.sun.aas.instanceRoot}/config/server.policy - -Djava.security.auth.login.config=${com.sun.aas.instanceRoot}/config/login.conf - -Dcom.sun.enterprise.security.httpsOutboundKeyAlias=s1as - -Xmx512m - -DwriteDefaultElementsToXml=true - -Djavax.net.ssl.keyStore=${com.sun.aas.instanceRoot}/config/keystore.jks - -Djavax.net.ssl.trustStore=${com.sun.aas.instanceRoot}/config/cacerts.jks - -Djava.ext.dirs=${com.sun.aas.javaRoot}/lib/ext${path.separator}${com.sun.aas.javaRoot}/jre/lib/ext${path.separator}${com.sun.aas.instanceRoot}/lib/ext - -Djdbc.drivers=org.apache.derby.jdbc.ClientDriver - -DANTLR_USE_DIRECT_CLASS_LOADING=true - -Dcom.sun.enterprise.config.config_environment_factory_class=com.sun.enterprise.config.serverbeans.AppserverConfigEnvironmentFactory - -Dorg.glassfish.additionalOSGiBundlesToStart=org.apache.felix.shell,org.apache.felix.gogo.runtime,org.apache.felix.gogo.shell,org.apache.felix.gogo.command,org.apache.felix.shell.remote,org.apache.felix.fileinstall - -Dosgi.shell.telnet.port=6666 - -Dosgi.shell.telnet.maxconn=1 - -Dosgi.shell.telnet.ip=127.0.0.1 - -Dgosh.args=--nointeractive - -Dfelix.fileinstall.dir=${com.sun.aas.installRoot}/modules/autostart/ - -Dfelix.fileinstall.poll=5000 - -Dfelix.fileinstall.log.level=2 - -Dfelix.fileinstall.bundles.new.start=true - -Dfelix.fileinstall.bundles.startTransient=true - -Dfelix.fileinstall.disableConfigSave=false - -Duser.language=en - -XX:NewRatio=2 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -XX:MaxPermSize=192m - -server - -Djava.awt.headless=true - -XX:+UnlockDiagnosticVMOptions - -Djava.endorsed.dirs=${com.sun.aas.installRoot}/modules/endorsed${path.separator}${com.sun.aas.installRoot}/lib/endorsed - -Djava.security.policy=${com.sun.aas.instanceRoot}/config/server.policy - -Djava.security.auth.login.config=${com.sun.aas.instanceRoot}/config/login.conf - -Dcom.sun.enterprise.security.httpsOutboundKeyAlias=s1as - -Djavax.net.ssl.keyStore=${com.sun.aas.instanceRoot}/config/keystore.jks - -Djavax.net.ssl.trustStore=${com.sun.aas.instanceRoot}/config/cacerts.jks - -Djava.ext.dirs=${com.sun.aas.javaRoot}/lib/ext${path.separator}${com.sun.aas.javaRoot}/jre/lib/ext${path.separator}${com.sun.aas.instanceRoot}/lib/ext - -Djdbc.drivers=org.apache.derby.jdbc.ClientDriver - -DANTLR_USE_DIRECT_CLASS_LOADING=true - -Dcom.sun.enterprise.config.config_environment_factory_class=com.sun.enterprise.config.serverbeans.AppserverConfigEnvironmentFactory - -XX:NewRatio=2 - -Xmx512m - -Dorg.glassfish.additionalOSGiBundlesToStart=org.apache.felix.shell,org.apache.felix.gogo.runtime,org.apache.felix.gogo.shell,org.apache.felix.gogo.command,org.apache.felix.fileinstall - -Dosgi.shell.telnet.port=${OSGI_SHELL_TELNET_PORT} - -Dosgi.shell.telnet.maxconn=1 - -Dosgi.shell.telnet.ip=127.0.0.1 - -Dgosh.args=--noshutdown -c noop=true - -Dfelix.fileinstall.dir=${com.sun.aas.installRoot}/modules/autostart/ - -Dfelix.fileinstall.poll=5000 - -Dfelix.fileinstall.log.level=3 - -Dfelix.fileinstall.bundles.new.start=true - -Dfelix.fileinstall.bundles.startTransient=true - -Dfelix.fileinstall.disableConfigSave=false - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/itest/javaee/src/it/regression-javaee-testng/src/test/resources/glassfish-config/logging.properties b/itest/javaee/src/it/regression-javaee-testng/src/test/resources/glassfish-config/logging.properties deleted file mode 100644 index 88be40f40..000000000 --- a/itest/javaee/src/it/regression-javaee-testng/src/test/resources/glassfish-config/logging.properties +++ /dev/null @@ -1,10 +0,0 @@ -handlers = org.slf4j.bridge.SLF4JBridgeHandler -com.sun.enterprise.server.logging.GFFileHandler.flushFrequency=1 -com.sun.enterprise.server.logging.GFFileHandler.file=${com.sun.aas.instanceRoot}/logs/server.log -com.sun.enterprise.server.logging.GFFileHandler.rotationTimelimitInMinutes=0 -com.sun.enterprise.server.logging.GFFileHandler.logtoConsole=false -com.sun.enterprise.server.logging.GFFileHandler.rotationLimitInBytes=2000000 -com.sun.enterprise.server.logging.GFFileHandler.alarms=false -com.sun.enterprise.server.logging.GFFileHandler.formatter=com.sun.enterprise.server.logging.UniformLogFormatter -com.sun.enterprise.server.logging.GFFileHandler.retainErrorsStasticsForHours=0 -#org.jboss.weld.level = FINEST diff --git a/itest/javaee/src/it/regression-javaee-testng/src/test/resources/logback.xml b/itest/javaee/src/it/regression-javaee-testng/src/test/resources/logback.xml deleted file mode 100644 index 7f8b99f47..000000000 --- a/itest/javaee/src/it/regression-javaee-testng/src/test/resources/logback.xml +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - - - %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n - - - - - - target/test.log - - %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n - - - - - - - - - - \ No newline at end of file diff --git a/itest/javaee/src/it/regression-javaee-userprobe/pom.xml b/itest/javaee/src/it/regression-javaee-userprobe/pom.xml deleted file mode 100644 index 0705bcbf0..000000000 --- a/itest/javaee/src/it/regression-javaee-userprobe/pom.xml +++ /dev/null @@ -1,158 +0,0 @@ - - - - - 4.0.0 - - - org.ops4j.pax.exam.itest - exam-itest-javaee - 4.13.6-SNAPSHOT - ../../.. - - - - regression-javaee-userprobe - jar - - OPS4J Pax Exam Java EE Regression Tests with User-Defined Probe - - - - - org.ops4j.pax.exam - pax-exam-invoker-jaxrs2 - ${project.version} - test - - - - org.jboss.resteasy - resteasy-client - test - - - - org.ops4j.pax.exam.samples - pax-exam-sample1-service - ${project.version} - test - - - - org.ops4j.pax.exam - pax-exam-junit4 - ${project.version} - test - - - - org.ops4j.pax.exam - pax-exam-cdi - ${project.version} - test - - - - org.ops4j.pax.exam - pax-exam-link-mvn - ${project.version} - test - - - - org.ops4j.pax.url - pax-url-link - test - - - - org.ops4j.pax.url - pax-url-classpath - test - - - - org.ops4j.pax.url - pax-url-aether - test - - - - - ch.qos.logback - logback-core - test - - - - ch.qos.logback - logback-classic - test - - - - org.slf4j - jul-to-slf4j - test - - - - org.slf4j - jcl-over-slf4j - test - - - - org.slf4j - slf4j-api - test - - - - jakarta.inject - jakarta.inject-api - provided - - - - - - - - org.apache.maven.plugins - maven-surefire-plugin - - - persuite - - - **/perclass/*.java - - - - - - - true - none - provided - - ${pax.exam.container} - ${pax.exam.framework} - 6666 - - - - - - - diff --git a/itest/javaee/src/it/regression-javaee-userprobe/src/test/java/org/ops4j/pax/exam/regression/javaee/userprobe/AnotherUserDefinedProbeTest.java b/itest/javaee/src/it/regression-javaee-userprobe/src/test/java/org/ops4j/pax/exam/regression/javaee/userprobe/AnotherUserDefinedProbeTest.java deleted file mode 100644 index 77a1c74cb..000000000 --- a/itest/javaee/src/it/regression-javaee-userprobe/src/test/java/org/ops4j/pax/exam/regression/javaee/userprobe/AnotherUserDefinedProbeTest.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright 2012 Harald Wellmann - * - * Licensed 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. - * - */ - -package org.ops4j.pax.exam.regression.javaee.userprobe; - -import static org.junit.Assert.assertEquals; - -import java.util.List; - -import javax.inject.Inject; - -import org.junit.Test; -import org.junit.runner.RunWith; -import org.ops4j.pax.exam.junit.PaxExam; -import org.ops4j.pax.exam.sample1.model.Book; -import org.ops4j.pax.exam.sample1.service.LibraryService; -import org.ops4j.pax.exam.spi.reactors.ExamReactorStrategy; -import org.ops4j.pax.exam.spi.reactors.PerSuite; - -@RunWith(PaxExam.class) -@ExamReactorStrategy(PerSuite.class) -public class AnotherUserDefinedProbeTest { - - @Inject - private LibraryService service; - - @Test - public void byAuthor() { - List books = service.findBooksByAuthor("Mann"); - assertEquals(1, books.size()); - - Book book = books.get(0); - assertEquals("Buddenbrooks", book.getTitle()); - } -} diff --git a/itest/javaee/src/it/regression-javaee-userprobe/src/test/java/org/ops4j/pax/exam/regression/javaee/userprobe/ProbeConfigurationFactory.java b/itest/javaee/src/it/regression-javaee-userprobe/src/test/java/org/ops4j/pax/exam/regression/javaee/userprobe/ProbeConfigurationFactory.java deleted file mode 100644 index e557eeb34..000000000 --- a/itest/javaee/src/it/regression-javaee-userprobe/src/test/java/org/ops4j/pax/exam/regression/javaee/userprobe/ProbeConfigurationFactory.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright 2012 Harald Wellmann. - * - * Licensed 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. - */ -package org.ops4j.pax.exam.regression.javaee.userprobe; - -import static org.ops4j.pax.exam.CoreOptions.maven; -import static org.ops4j.pax.exam.CoreOptions.options; -import static org.ops4j.pax.exam.CoreOptions.warProbe; -import static org.ops4j.pax.exam.Info.getOps4jBaseVersion; -import static org.ops4j.pax.exam.Info.getPaxExamVersion; - -import org.ops4j.pax.exam.ConfigurationFactory; -import org.ops4j.pax.exam.Option; - -public class ProbeConfigurationFactory implements ConfigurationFactory { - - @Override - public Option[] createConfiguration() { - return options( - warProbe() - .library("target/test-classes") - .library( - maven("org.ops4j.pax.exam.samples", "pax-exam-sample1-service", getPaxExamVersion())) - .library( - maven("org.ops4j.pax.exam.samples", "pax-exam-sample1-model", getPaxExamVersion())) - .library(maven("org.ops4j.pax.exam", "pax-exam-servlet-bridge", getPaxExamVersion())) - .library(maven("org.ops4j.pax.exam", "pax-exam-cdi", getPaxExamVersion())) - .library(maven("org.ops4j.pax.exam", "pax-exam", getPaxExamVersion())) - .library(maven("org.ops4j.base", "ops4j-base-spi", getOps4jBaseVersion())) - .library(maven("junit", "junit", "4.9")) - ); - } -} diff --git a/itest/javaee/src/it/regression-javaee-userprobe/src/test/java/org/ops4j/pax/exam/regression/javaee/userprobe/UserDefinedProbeTest.java b/itest/javaee/src/it/regression-javaee-userprobe/src/test/java/org/ops4j/pax/exam/regression/javaee/userprobe/UserDefinedProbeTest.java deleted file mode 100644 index 9145e7f37..000000000 --- a/itest/javaee/src/it/regression-javaee-userprobe/src/test/java/org/ops4j/pax/exam/regression/javaee/userprobe/UserDefinedProbeTest.java +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Copyright 2012 Harald Wellmann - * - * Licensed 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. - * - */ - -package org.ops4j.pax.exam.regression.javaee.userprobe; - -import static org.junit.Assert.assertEquals; - -import java.util.List; - -import javax.inject.Inject; - -import org.junit.Test; -import org.junit.runner.RunWith; -import org.ops4j.pax.exam.junit.PaxExam; -import org.ops4j.pax.exam.sample1.model.Book; -import org.ops4j.pax.exam.sample1.service.LibraryService; -import org.ops4j.pax.exam.spi.reactors.ExamReactorStrategy; -import org.ops4j.pax.exam.spi.reactors.PerSuite; -import org.ops4j.pax.exam.util.Transactional; - -@RunWith(PaxExam.class) -@ExamReactorStrategy(PerSuite.class) -public class UserDefinedProbeTest { - - @Inject - private LibraryService service; - - @Test - public void byAuthor() { - List books = service.findBooksByAuthor("Mann"); - assertEquals(1, books.size()); - - Book book = books.get(0); - assertEquals("Buddenbrooks", book.getTitle()); - } - - @Test - @Transactional - public void numAuthors() { - assertEquals(2, service.getNumAuthors()); - service.createAuthor("Theodor", "Storm"); - assertEquals(3, service.getNumAuthors()); - } - - @Test - public void numAuthorsAfterTransaction() { - assertEquals(2, service.getNumAuthors()); - } -} diff --git a/itest/javaee/src/it/regression-javaee-userprobe/src/test/resources/META-INF/services/org.ops4j.pax.exam.ConfigurationFactory b/itest/javaee/src/it/regression-javaee-userprobe/src/test/resources/META-INF/services/org.ops4j.pax.exam.ConfigurationFactory deleted file mode 100644 index 48fa83baa..000000000 --- a/itest/javaee/src/it/regression-javaee-userprobe/src/test/resources/META-INF/services/org.ops4j.pax.exam.ConfigurationFactory +++ /dev/null @@ -1 +0,0 @@ -org.ops4j.pax.exam.regression.javaee.userprobe.ProbeConfigurationFactory diff --git a/itest/javaee/src/it/regression-javaee-userprobe/src/test/resources/exam.properties b/itest/javaee/src/it/regression-javaee-userprobe/src/test/resources/exam.properties deleted file mode 100644 index 2f25d5f6b..000000000 --- a/itest/javaee/src/it/regression-javaee-userprobe/src/test/resources/exam.properties +++ /dev/null @@ -1,2 +0,0 @@ -pax.exam.system = javaee -pax.exam.glassfish.config.overwrite = true diff --git a/itest/javaee/src/it/regression-javaee-userprobe/src/test/resources/glassfish-config/domain.xml b/itest/javaee/src/it/regression-javaee-userprobe/src/test/resources/glassfish-config/domain.xml deleted file mode 100644 index 17859a9f7..000000000 --- a/itest/javaee/src/it/regression-javaee-userprobe/src/test/resources/glassfish-config/domain.xml +++ /dev/null @@ -1,474 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -XX:MaxPermSize=192m - -client - -Djava.awt.headless=true - -Djavax.management.builder.initial=com.sun.enterprise.v3.admin.AppServerMBeanServerBuilder - -XX:+UnlockDiagnosticVMOptions - -Djava.endorsed.dirs=${com.sun.aas.installRoot}/modules/endorsed${path.separator}${com.sun.aas.installRoot}/lib/endorsed - -Djava.security.policy=${com.sun.aas.instanceRoot}/config/server.policy - -Djava.security.auth.login.config=${com.sun.aas.instanceRoot}/config/login.conf - -Dcom.sun.enterprise.security.httpsOutboundKeyAlias=s1as - -Xmx512m - -DwriteDefaultElementsToXml=true - -Djavax.net.ssl.keyStore=${com.sun.aas.instanceRoot}/config/keystore.jks - -Djavax.net.ssl.trustStore=${com.sun.aas.instanceRoot}/config/cacerts.jks - -Djava.ext.dirs=${com.sun.aas.javaRoot}/lib/ext${path.separator}${com.sun.aas.javaRoot}/jre/lib/ext${path.separator}${com.sun.aas.instanceRoot}/lib/ext - -Djdbc.drivers=org.apache.derby.jdbc.ClientDriver - -DANTLR_USE_DIRECT_CLASS_LOADING=true - -Dcom.sun.enterprise.config.config_environment_factory_class=com.sun.enterprise.config.serverbeans.AppserverConfigEnvironmentFactory - -Dorg.glassfish.additionalOSGiBundlesToStart=org.apache.felix.shell,org.apache.felix.gogo.runtime,org.apache.felix.gogo.shell,org.apache.felix.gogo.command,org.apache.felix.shell.remote,org.apache.felix.fileinstall - -Dosgi.shell.telnet.port=6666 - -Dosgi.shell.telnet.maxconn=1 - -Dosgi.shell.telnet.ip=127.0.0.1 - -Dgosh.args=--nointeractive - -Dfelix.fileinstall.dir=${com.sun.aas.installRoot}/modules/autostart/ - -Dfelix.fileinstall.poll=5000 - -Dfelix.fileinstall.log.level=2 - -Dfelix.fileinstall.bundles.new.start=true - -Dfelix.fileinstall.bundles.startTransient=true - -Dfelix.fileinstall.disableConfigSave=false - -Duser.language=en - -XX:NewRatio=2 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -XX:MaxPermSize=192m - -server - -Djava.awt.headless=true - -XX:+UnlockDiagnosticVMOptions - -Djava.endorsed.dirs=${com.sun.aas.installRoot}/modules/endorsed${path.separator}${com.sun.aas.installRoot}/lib/endorsed - -Djava.security.policy=${com.sun.aas.instanceRoot}/config/server.policy - -Djava.security.auth.login.config=${com.sun.aas.instanceRoot}/config/login.conf - -Dcom.sun.enterprise.security.httpsOutboundKeyAlias=s1as - -Djavax.net.ssl.keyStore=${com.sun.aas.instanceRoot}/config/keystore.jks - -Djavax.net.ssl.trustStore=${com.sun.aas.instanceRoot}/config/cacerts.jks - -Djava.ext.dirs=${com.sun.aas.javaRoot}/lib/ext${path.separator}${com.sun.aas.javaRoot}/jre/lib/ext${path.separator}${com.sun.aas.instanceRoot}/lib/ext - -Djdbc.drivers=org.apache.derby.jdbc.ClientDriver - -DANTLR_USE_DIRECT_CLASS_LOADING=true - -Dcom.sun.enterprise.config.config_environment_factory_class=com.sun.enterprise.config.serverbeans.AppserverConfigEnvironmentFactory - -XX:NewRatio=2 - -Xmx512m - -Dorg.glassfish.additionalOSGiBundlesToStart=org.apache.felix.shell,org.apache.felix.gogo.runtime,org.apache.felix.gogo.shell,org.apache.felix.gogo.command,org.apache.felix.fileinstall - -Dosgi.shell.telnet.port=${OSGI_SHELL_TELNET_PORT} - -Dosgi.shell.telnet.maxconn=1 - -Dosgi.shell.telnet.ip=127.0.0.1 - -Dgosh.args=--noshutdown -c noop=true - -Dfelix.fileinstall.dir=${com.sun.aas.installRoot}/modules/autostart/ - -Dfelix.fileinstall.poll=5000 - -Dfelix.fileinstall.log.level=3 - -Dfelix.fileinstall.bundles.new.start=true - -Dfelix.fileinstall.bundles.startTransient=true - -Dfelix.fileinstall.disableConfigSave=false - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/itest/javaee/src/it/regression-javaee-userprobe/src/test/resources/glassfish-config/logging.properties b/itest/javaee/src/it/regression-javaee-userprobe/src/test/resources/glassfish-config/logging.properties deleted file mode 100644 index 88be40f40..000000000 --- a/itest/javaee/src/it/regression-javaee-userprobe/src/test/resources/glassfish-config/logging.properties +++ /dev/null @@ -1,10 +0,0 @@ -handlers = org.slf4j.bridge.SLF4JBridgeHandler -com.sun.enterprise.server.logging.GFFileHandler.flushFrequency=1 -com.sun.enterprise.server.logging.GFFileHandler.file=${com.sun.aas.instanceRoot}/logs/server.log -com.sun.enterprise.server.logging.GFFileHandler.rotationTimelimitInMinutes=0 -com.sun.enterprise.server.logging.GFFileHandler.logtoConsole=false -com.sun.enterprise.server.logging.GFFileHandler.rotationLimitInBytes=2000000 -com.sun.enterprise.server.logging.GFFileHandler.alarms=false -com.sun.enterprise.server.logging.GFFileHandler.formatter=com.sun.enterprise.server.logging.UniformLogFormatter -com.sun.enterprise.server.logging.GFFileHandler.retainErrorsStasticsForHours=0 -#org.jboss.weld.level = FINEST diff --git a/itest/javaee/src/it/regression-javaee-userprobe/src/test/resources/logback.xml b/itest/javaee/src/it/regression-javaee-userprobe/src/test/resources/logback.xml deleted file mode 100644 index 7f8b99f47..000000000 --- a/itest/javaee/src/it/regression-javaee-userprobe/src/test/resources/logback.xml +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - - - %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n - - - - - - target/test.log - - %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n - - - - - - - - - - \ No newline at end of file diff --git a/itest/javaee/src/it/regression-javaee/pom.xml b/itest/javaee/src/it/regression-javaee/pom.xml deleted file mode 100644 index 751609ea8..000000000 --- a/itest/javaee/src/it/regression-javaee/pom.xml +++ /dev/null @@ -1,169 +0,0 @@ - - - - - 4.0.0 - - - org.ops4j.pax.exam.itest - exam-itest-javaee - 4.13.6-SNAPSHOT - ../../.. - - - regression-javaee - jar - - OPS4J Pax Exam Java EE Container Regression Tests - - - - org.ops4j.pax.exam - pax-exam-invoker-jaxrs2 - ${project.version} - test - - - - org.jboss.resteasy - resteasy-client - test - - - - org.ops4j.pax.exam - pax-exam-servlet-bridge - ${project.version} - test - - - - org.ops4j.pax.exam.samples - pax-exam-sample1-service - ${project.version} - test - - - org.ops4j.pax.exam - pax-exam-junit4 - ${project.version} - test - - - - org.ops4j.pax.exam - pax-exam-cdi - ${project.version} - test - - - - org.ops4j.pax.exam - pax-exam-link-assembly - ${project.version} - test - - - - org.ops4j.pax.url - pax-url-link - test - - - - org.ops4j.pax.url - pax-url-classpath - test - - - - org.ops4j.pax.url - pax-url-aether - test - - - - - ch.qos.logback - logback-core - test - - - - ch.qos.logback - logback-classic - test - - - - org.slf4j - jul-to-slf4j - test - - - - org.slf4j - jcl-over-slf4j - test - - - - org.slf4j - slf4j-api - test - - - - org.slf4j - slf4j-ext - test - - - - jakarta.inject - jakarta.inject-api - provided - - - - - - - - - src/test/resources - true - - - - - - - org.apache.maven.plugins - maven-surefire-plugin - - - persuite - - - **/perclass/*.java - - - - - - true - none - provided - - ${pax.exam.container} - ${pax.exam.framework} - 6666 - - - - - - - diff --git a/itest/javaee/src/it/regression-javaee/src/test/java/org/ops4j/pax/exam/regression/javaee/AbstractTest.java b/itest/javaee/src/it/regression-javaee/src/test/java/org/ops4j/pax/exam/regression/javaee/AbstractTest.java deleted file mode 100644 index 9c59caad9..000000000 --- a/itest/javaee/src/it/regression-javaee/src/test/java/org/ops4j/pax/exam/regression/javaee/AbstractTest.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright 2014 Harald Wellmann - * - * Licensed 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. - * - */ - -package org.ops4j.pax.exam.regression.javaee; - -import static org.hamcrest.CoreMatchers.is; -import static org.junit.Assert.assertThat; - -import javax.inject.Inject; - -import org.junit.Test; -import org.junit.runner.RunWith; -import org.ops4j.pax.exam.junit.PaxExam; -import org.ops4j.pax.exam.sample1.service.LibraryService; -import org.ops4j.pax.exam.spi.reactors.ExamReactorStrategy; -import org.ops4j.pax.exam.spi.reactors.PerSuite; -import org.ops4j.pax.exam.util.Transactional; - -@RunWith(PaxExam.class) -@ExamReactorStrategy(PerSuite.class) -public abstract class AbstractTest { - - @Inject - private LibraryService service; - - @Test - @Transactional - public void numAuthors() { - assertThat(service.getNumAuthors(), is(getExpectedNumAuthors())); - } - - protected abstract long getExpectedNumAuthors(); -} diff --git a/itest/javaee/src/it/regression-javaee/src/test/java/org/ops4j/pax/exam/regression/javaee/AuthorTest.java b/itest/javaee/src/it/regression-javaee/src/test/java/org/ops4j/pax/exam/regression/javaee/AuthorTest.java deleted file mode 100644 index 64e095bcc..000000000 --- a/itest/javaee/src/it/regression-javaee/src/test/java/org/ops4j/pax/exam/regression/javaee/AuthorTest.java +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Copyright 2010 Harald Wellmann - * - * Licensed 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. - * - */ - -package org.ops4j.pax.exam.regression.javaee; - -import static org.junit.Assert.assertEquals; - -import java.util.List; - -import javax.inject.Inject; - -import org.junit.Test; -import org.junit.runner.RunWith; -import org.ops4j.pax.exam.junit.PaxExam; -import org.ops4j.pax.exam.sample1.model.Book; -import org.ops4j.pax.exam.sample1.service.LibraryService; -import org.ops4j.pax.exam.spi.reactors.ExamReactorStrategy; -import org.ops4j.pax.exam.spi.reactors.PerSuite; -import org.ops4j.pax.exam.util.Transactional; - -@RunWith(PaxExam.class) -@ExamReactorStrategy(PerSuite.class) -public class AuthorTest { - - @Inject - private LibraryService service; - - @Test - public void byAuthor() { - List books = service.findBooksByAuthor("Mann"); - assertEquals(1, books.size()); - - Book book = books.get(0); - assertEquals("Buddenbrooks", book.getTitle()); - } - - @Test - @Transactional - public void numAuthors() { - assertEquals(2, service.getNumAuthors()); - service.createAuthor("Theodor", "Storm"); - assertEquals(3, service.getNumAuthors()); - } - - @Test - public void numAuthorsAfterTransaction() { - assertEquals(2, service.getNumAuthors()); - } -} diff --git a/itest/javaee/src/it/regression-javaee/src/test/java/org/ops4j/pax/exam/regression/javaee/Calculator.java b/itest/javaee/src/it/regression-javaee/src/test/java/org/ops4j/pax/exam/regression/javaee/Calculator.java deleted file mode 100644 index 11d411c56..000000000 --- a/itest/javaee/src/it/regression-javaee/src/test/java/org/ops4j/pax/exam/regression/javaee/Calculator.java +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright 2013 Harald Wellmann - * - * Licensed 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. - * - */ - -package org.ops4j.pax.exam.regression.javaee; - - -public class Calculator { - - public int add(int a, int b) { - return a + b; - } -} diff --git a/itest/javaee/src/it/regression-javaee/src/test/java/org/ops4j/pax/exam/regression/javaee/CalculatorInvokerTest.java b/itest/javaee/src/it/regression-javaee/src/test/java/org/ops4j/pax/exam/regression/javaee/CalculatorInvokerTest.java deleted file mode 100644 index 03e6b7616..000000000 --- a/itest/javaee/src/it/regression-javaee/src/test/java/org/ops4j/pax/exam/regression/javaee/CalculatorInvokerTest.java +++ /dev/null @@ -1,21 +0,0 @@ -package org.ops4j.pax.exam.regression.javaee; - -import static org.hamcrest.CoreMatchers.is; -import static org.junit.Assert.assertThat; - -import org.junit.Ignore; -import org.junit.Test; -import org.junit.runner.JUnitCore; -import org.junit.runner.Result; - -@Ignore -public class CalculatorInvokerTest { - - @Test - public void invokeParameterizedTest() { - JUnitCore junit = new JUnitCore(); - Result result = junit.run(CalculatorTest.class); - assertThat(result.getRunCount(), is(2)); - assertThat(result.getFailureCount(), is(0)); - } -} diff --git a/itest/javaee/src/it/regression-javaee/src/test/java/org/ops4j/pax/exam/regression/javaee/CalculatorTest.java b/itest/javaee/src/it/regression-javaee/src/test/java/org/ops4j/pax/exam/regression/javaee/CalculatorTest.java deleted file mode 100644 index 2bf977d83..000000000 --- a/itest/javaee/src/it/regression-javaee/src/test/java/org/ops4j/pax/exam/regression/javaee/CalculatorTest.java +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Copyright 2013 Harald Wellmann - * - * Licensed 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. - * - */ - -package org.ops4j.pax.exam.regression.javaee; - -import static org.hamcrest.CoreMatchers.is; -import static org.junit.Assert.assertThat; - -import java.util.Arrays; -import java.util.List; - -import javax.inject.Inject; - -import org.junit.Test; -import org.junit.runner.RunWith; -import org.junit.runners.Parameterized.Parameters; -import org.ops4j.pax.exam.junit.PaxExamParameterized; - -@RunWith(PaxExamParameterized.class) -public class CalculatorTest { - - private static int paramIndex; - - @Inject - private Calculator calculator; - - private int a; - private int b; - private int sum; - - - @Parameters - public static List getParameters() { - return Arrays.asList(new Object[][] { - {2, 3, 5}, - {5, 6, 11}, - {6, 2, 8} - }); - } - - - - public CalculatorTest(int a, int b, int sum) { - this.a = a; - this.b = b; - this.sum = sum; - } - - @Test - public void add() { - assertThat(calculator.add(a, b), is(sum)); - - // ordering of parameter sets must be preserved - assertThat((Integer) getParameters().get(paramIndex)[0], is(a)); - paramIndex++; - } -} diff --git a/itest/javaee/src/it/regression-javaee/src/test/java/org/ops4j/pax/exam/regression/javaee/DerivedTest.java b/itest/javaee/src/it/regression-javaee/src/test/java/org/ops4j/pax/exam/regression/javaee/DerivedTest.java deleted file mode 100644 index 24e3ba478..000000000 --- a/itest/javaee/src/it/regression-javaee/src/test/java/org/ops4j/pax/exam/regression/javaee/DerivedTest.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright 2014 Harald Wellmann - * - * Licensed 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. - * - */ - -package org.ops4j.pax.exam.regression.javaee; - - -public class DerivedTest extends AbstractTest { - - @Override - protected long getExpectedNumAuthors() { - return 2; - } -} diff --git a/itest/javaee/src/it/regression-javaee/src/test/java/org/ops4j/pax/exam/regression/javaee/TitleTest.java b/itest/javaee/src/it/regression-javaee/src/test/java/org/ops4j/pax/exam/regression/javaee/TitleTest.java deleted file mode 100644 index bac84ef2a..000000000 --- a/itest/javaee/src/it/regression-javaee/src/test/java/org/ops4j/pax/exam/regression/javaee/TitleTest.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright 2012 Harald Wellmann - * - * Licensed 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. - * - */ -package org.ops4j.pax.exam.regression.javaee; - -import static org.junit.Assert.assertEquals; - -import java.util.List; - -import javax.inject.Inject; - -import org.junit.Test; -import org.junit.runner.RunWith; -import org.ops4j.pax.exam.junit.PaxExam; -import org.ops4j.pax.exam.sample1.model.Book; -import org.ops4j.pax.exam.sample1.service.LibraryService; -import org.ops4j.pax.exam.spi.reactors.ExamReactorStrategy; -import org.ops4j.pax.exam.spi.reactors.PerSuite; - -@RunWith(PaxExam.class) -@ExamReactorStrategy(PerSuite.class) -public class TitleTest { - - @Inject - private LibraryService service; - - @Test - public void byTitle() { - List books = service.findBooksByTitle("East of Eden"); - assertEquals(1, books.size()); - - Book book = books.get(0); - assertEquals("Steinbeck", book.getAuthor().getLastName()); - } -} diff --git a/itest/javaee/src/it/regression-javaee/src/test/resources/META-INF/beans.xml b/itest/javaee/src/it/regression-javaee/src/test/resources/META-INF/beans.xml deleted file mode 100644 index e69de29bb..000000000 diff --git a/itest/javaee/src/it/regression-javaee/src/test/resources/exam.properties b/itest/javaee/src/it/regression-javaee/src/test/resources/exam.properties deleted file mode 100644 index 2f25d5f6b..000000000 --- a/itest/javaee/src/it/regression-javaee/src/test/resources/exam.properties +++ /dev/null @@ -1,2 +0,0 @@ -pax.exam.system = javaee -pax.exam.glassfish.config.overwrite = true diff --git a/itest/javaee/src/it/regression-javaee/src/test/resources/glassfish-config/domain.xml b/itest/javaee/src/it/regression-javaee/src/test/resources/glassfish-config/domain.xml deleted file mode 100644 index 17859a9f7..000000000 --- a/itest/javaee/src/it/regression-javaee/src/test/resources/glassfish-config/domain.xml +++ /dev/null @@ -1,474 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -XX:MaxPermSize=192m - -client - -Djava.awt.headless=true - -Djavax.management.builder.initial=com.sun.enterprise.v3.admin.AppServerMBeanServerBuilder - -XX:+UnlockDiagnosticVMOptions - -Djava.endorsed.dirs=${com.sun.aas.installRoot}/modules/endorsed${path.separator}${com.sun.aas.installRoot}/lib/endorsed - -Djava.security.policy=${com.sun.aas.instanceRoot}/config/server.policy - -Djava.security.auth.login.config=${com.sun.aas.instanceRoot}/config/login.conf - -Dcom.sun.enterprise.security.httpsOutboundKeyAlias=s1as - -Xmx512m - -DwriteDefaultElementsToXml=true - -Djavax.net.ssl.keyStore=${com.sun.aas.instanceRoot}/config/keystore.jks - -Djavax.net.ssl.trustStore=${com.sun.aas.instanceRoot}/config/cacerts.jks - -Djava.ext.dirs=${com.sun.aas.javaRoot}/lib/ext${path.separator}${com.sun.aas.javaRoot}/jre/lib/ext${path.separator}${com.sun.aas.instanceRoot}/lib/ext - -Djdbc.drivers=org.apache.derby.jdbc.ClientDriver - -DANTLR_USE_DIRECT_CLASS_LOADING=true - -Dcom.sun.enterprise.config.config_environment_factory_class=com.sun.enterprise.config.serverbeans.AppserverConfigEnvironmentFactory - -Dorg.glassfish.additionalOSGiBundlesToStart=org.apache.felix.shell,org.apache.felix.gogo.runtime,org.apache.felix.gogo.shell,org.apache.felix.gogo.command,org.apache.felix.shell.remote,org.apache.felix.fileinstall - -Dosgi.shell.telnet.port=6666 - -Dosgi.shell.telnet.maxconn=1 - -Dosgi.shell.telnet.ip=127.0.0.1 - -Dgosh.args=--nointeractive - -Dfelix.fileinstall.dir=${com.sun.aas.installRoot}/modules/autostart/ - -Dfelix.fileinstall.poll=5000 - -Dfelix.fileinstall.log.level=2 - -Dfelix.fileinstall.bundles.new.start=true - -Dfelix.fileinstall.bundles.startTransient=true - -Dfelix.fileinstall.disableConfigSave=false - -Duser.language=en - -XX:NewRatio=2 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -XX:MaxPermSize=192m - -server - -Djava.awt.headless=true - -XX:+UnlockDiagnosticVMOptions - -Djava.endorsed.dirs=${com.sun.aas.installRoot}/modules/endorsed${path.separator}${com.sun.aas.installRoot}/lib/endorsed - -Djava.security.policy=${com.sun.aas.instanceRoot}/config/server.policy - -Djava.security.auth.login.config=${com.sun.aas.instanceRoot}/config/login.conf - -Dcom.sun.enterprise.security.httpsOutboundKeyAlias=s1as - -Djavax.net.ssl.keyStore=${com.sun.aas.instanceRoot}/config/keystore.jks - -Djavax.net.ssl.trustStore=${com.sun.aas.instanceRoot}/config/cacerts.jks - -Djava.ext.dirs=${com.sun.aas.javaRoot}/lib/ext${path.separator}${com.sun.aas.javaRoot}/jre/lib/ext${path.separator}${com.sun.aas.instanceRoot}/lib/ext - -Djdbc.drivers=org.apache.derby.jdbc.ClientDriver - -DANTLR_USE_DIRECT_CLASS_LOADING=true - -Dcom.sun.enterprise.config.config_environment_factory_class=com.sun.enterprise.config.serverbeans.AppserverConfigEnvironmentFactory - -XX:NewRatio=2 - -Xmx512m - -Dorg.glassfish.additionalOSGiBundlesToStart=org.apache.felix.shell,org.apache.felix.gogo.runtime,org.apache.felix.gogo.shell,org.apache.felix.gogo.command,org.apache.felix.fileinstall - -Dosgi.shell.telnet.port=${OSGI_SHELL_TELNET_PORT} - -Dosgi.shell.telnet.maxconn=1 - -Dosgi.shell.telnet.ip=127.0.0.1 - -Dgosh.args=--noshutdown -c noop=true - -Dfelix.fileinstall.dir=${com.sun.aas.installRoot}/modules/autostart/ - -Dfelix.fileinstall.poll=5000 - -Dfelix.fileinstall.log.level=3 - -Dfelix.fileinstall.bundles.new.start=true - -Dfelix.fileinstall.bundles.startTransient=true - -Dfelix.fileinstall.disableConfigSave=false - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/itest/javaee/src/it/regression-javaee/src/test/resources/glassfish-config/logging.properties b/itest/javaee/src/it/regression-javaee/src/test/resources/glassfish-config/logging.properties deleted file mode 100644 index 88be40f40..000000000 --- a/itest/javaee/src/it/regression-javaee/src/test/resources/glassfish-config/logging.properties +++ /dev/null @@ -1,10 +0,0 @@ -handlers = org.slf4j.bridge.SLF4JBridgeHandler -com.sun.enterprise.server.logging.GFFileHandler.flushFrequency=1 -com.sun.enterprise.server.logging.GFFileHandler.file=${com.sun.aas.instanceRoot}/logs/server.log -com.sun.enterprise.server.logging.GFFileHandler.rotationTimelimitInMinutes=0 -com.sun.enterprise.server.logging.GFFileHandler.logtoConsole=false -com.sun.enterprise.server.logging.GFFileHandler.rotationLimitInBytes=2000000 -com.sun.enterprise.server.logging.GFFileHandler.alarms=false -com.sun.enterprise.server.logging.GFFileHandler.formatter=com.sun.enterprise.server.logging.UniformLogFormatter -com.sun.enterprise.server.logging.GFFileHandler.retainErrorsStasticsForHours=0 -#org.jboss.weld.level = FINEST diff --git a/itest/javaee/src/it/regression-javaee/src/test/resources/logback.xml b/itest/javaee/src/it/regression-javaee/src/test/resources/logback.xml deleted file mode 100644 index 7f8b99f47..000000000 --- a/itest/javaee/src/it/regression-javaee/src/test/resources/logback.xml +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - - - %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n - - - - - - target/test.log - - %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n - - - - - - - - - - \ No newline at end of file diff --git a/itest/pom.xml b/itest/pom.xml index 844b8ebdb..f98f42dcd 100644 --- a/itest/pom.xml +++ b/itest/pom.xml @@ -30,16 +30,6 @@ - - javaee - - false - - - javaee - - - karaf diff --git a/pom.xml b/pom.xml index ccd7de7bf..29dece504 100644 --- a/pom.xml +++ b/pom.xml @@ -49,7 +49,6 @@ containers/pax-exam-container-native containers/pax-exam-container-remote containers/pax-exam-container-forked - containers/pax-exam-container-glassfish-embedded containers/pax-exam-container-weld containers/pax-exam-container-tomcat containers/pax-exam-container-karaf diff --git a/pom/pom.xml b/pom/pom.xml index d06e17b87..81221940b 100644 --- a/pom/pom.xml +++ b/pom/pom.xml @@ -484,18 +484,6 @@ 1.11 - - org.glassfish.main.common - simple-glassfish-api - ${dependency.glassfish.version} - - - - org.glassfish.main.extras - glassfish-embedded-all - ${dependency.glassfish.version} - - org.jboss.weld.se weld-se-core @@ -665,7 +653,6 @@ org.hibernate hibernate-entitymanager 5.6.15.Final - test @@ -827,7 +814,7 @@ org.jboss.resteasy resteasy-client - 5.0.7.Final + 5.0.9.Final org.slf4j @@ -839,7 +826,7 @@ org.glassfish.jersey.core jersey-client - 2.41 + 2.42 diff --git a/samples/pax-exam-sample2-model/pom.xml b/samples/pax-exam-sample2-model/pom.xml deleted file mode 100644 index ebd14ad79..000000000 --- a/samples/pax-exam-sample2-model/pom.xml +++ /dev/null @@ -1,20 +0,0 @@ - - 4.0.0 - - pax-exam-samples - org.ops4j.pax.exam - 4.13.6-SNAPSHOT - ../pom.xml - - org.ops4j.pax.exam.samples - pax-exam-sample2-model - OPS4J Pax Exam Sample2 Model - - - - jakarta.platform - jakarta.jakartaee-api - provided - - - \ No newline at end of file diff --git a/samples/pax-exam-sample2-model/src/main/java/org/ops4j/pax/exam/sample2/model/Actor.java b/samples/pax-exam-sample2-model/src/main/java/org/ops4j/pax/exam/sample2/model/Actor.java deleted file mode 100644 index 5388e8e4a..000000000 --- a/samples/pax-exam-sample2-model/src/main/java/org/ops4j/pax/exam/sample2/model/Actor.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright 2012 Harald Wellmann - * - * Licensed 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. - * - */ -package org.ops4j.pax.exam.sample2.model; - -import java.util.List; - -import javax.persistence.Entity; -import javax.persistence.OneToMany; - -@Entity -public class Actor extends Person { - - @OneToMany(mappedBy = "actor") - private List roles; - - /** - * @return the roles - */ - public List getRoles() { - return roles; - } - - /** - * @param roles - * the roles to set - */ - public void setRoles(List roles) { - this.roles = roles; - } - -} diff --git a/samples/pax-exam-sample2-model/src/main/java/org/ops4j/pax/exam/sample2/model/Director.java b/samples/pax-exam-sample2-model/src/main/java/org/ops4j/pax/exam/sample2/model/Director.java deleted file mode 100644 index 174bff0be..000000000 --- a/samples/pax-exam-sample2-model/src/main/java/org/ops4j/pax/exam/sample2/model/Director.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright 2012 Harald Wellmann - * - * Licensed 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. - * - */ -package org.ops4j.pax.exam.sample2.model; - -import java.util.ArrayList; -import java.util.List; - -import javax.persistence.Entity; -import javax.persistence.OneToMany; - -@Entity -public class Director extends Actor { - - @OneToMany(mappedBy = "director") - private List movies = new ArrayList(); - - /** - * @return the movies - */ - public List getMovies() { - return movies; - } - - /** - * @param movies - * the movies to set - */ - public void setMovies(List movies) { - this.movies = movies; - } - -} diff --git a/samples/pax-exam-sample2-model/src/main/java/org/ops4j/pax/exam/sample2/model/Movie.java b/samples/pax-exam-sample2-model/src/main/java/org/ops4j/pax/exam/sample2/model/Movie.java deleted file mode 100644 index b3d1da7e7..000000000 --- a/samples/pax-exam-sample2-model/src/main/java/org/ops4j/pax/exam/sample2/model/Movie.java +++ /dev/null @@ -1,290 +0,0 @@ -/* - * Copyright 2012 Harald Wellmann - * - * Licensed 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. - * - */ -package org.ops4j.pax.exam.sample2.model; - -import java.util.ArrayList; -import java.util.List; - -import javax.persistence.Entity; -import javax.persistence.Id; -import javax.persistence.JoinTable; -import javax.persistence.Lob; -import javax.persistence.ManyToMany; -import javax.persistence.ManyToOne; -import javax.persistence.OneToMany; -import javax.persistence.Table; - -@Entity -@Table(name = "movie") -public class Movie { - - @Id - private int id; - - private String imdbId; - private String youtubeId; - private String title; - - @Lob - private String description; - - private String language; - private String tagline; - private String trailer; - private Integer runtime; - private String homepage; - private String imageUrl; - - @ManyToOne - private Director director; - - @ManyToMany - @JoinTable(name = "movie_person") - private List actors = new ArrayList(); - - @OneToMany(mappedBy = "movie") - private List roles = new ArrayList(); - - @OneToMany(mappedBy = "movie") - private List ratings; - - /** - * @return the id - */ - public int getId() { - return id; - } - - /** - * @param id - * the id to set - */ - public void setId(int id) { - this.id = id; - } - - /** - * @return the imdbId - */ - public String getImdbId() { - return imdbId; - } - - /** - * @param imdbId - * the imdbId to set - */ - public void setImdbId(String imdbId) { - this.imdbId = imdbId; - } - - /** - * @return the youtubeId - */ - public String getYoutubeId() { - return youtubeId; - } - - /** - * @param youtubeId - * the youtubeId to set - */ - public void setYoutubeId(String youtubeId) { - this.youtubeId = youtubeId; - } - - /** - * @return the title - */ - public String getTitle() { - return title; - } - - /** - * @param title - * the title to set - */ - public void setTitle(String title) { - this.title = title; - } - - /** - * @return the description - */ - public String getDescription() { - return description; - } - - /** - * @param description - * the description to set - */ - public void setDescription(String description) { - this.description = description; - } - - /** - * @return the language - */ - public String getLanguage() { - return language; - } - - /** - * @param language - * the language to set - */ - public void setLanguage(String language) { - this.language = language; - } - - /** - * @return the tagline - */ - public String getTagline() { - return tagline; - } - - /** - * @param tagline - * the tagline to set - */ - public void setTagline(String tagline) { - this.tagline = tagline; - } - - /** - * @return the trailer - */ - public String getTrailer() { - return trailer; - } - - /** - * @param trailer - * the trailer to set - */ - public void setTrailer(String trailer) { - this.trailer = trailer; - } - - /** - * @return the runtime - */ - public Integer getRuntime() { - return runtime; - } - - /** - * @param runtime - * the runtime to set - */ - public void setRuntime(Integer runtime) { - this.runtime = runtime; - } - - /** - * @return the homepage - */ - public String getHomepage() { - return homepage; - } - - /** - * @param homepage - * the homepage to set - */ - public void setHomepage(String homepage) { - this.homepage = homepage; - } - - /** - * @return the imageUrl - */ - public String getImageUrl() { - return imageUrl; - } - - /** - * @param imageUrl - * the imageUrl to set - */ - public void setImageUrl(String imageUrl) { - this.imageUrl = imageUrl; - } - - /** - * @return the actors - */ - public List getActors() { - return actors; - } - - /** - * @param actors - * the actors to set - */ - public void setActors(List actors) { - this.actors = actors; - } - - /** - * @return the roles - */ - public List getRoles() { - return roles; - } - - /** - * @param roles - * the roles to set - */ - public void setRoles(List roles) { - this.roles = roles; - } - - /** - * @return the ratings - */ - public List getRatings() { - return ratings; - } - - /** - * @param ratings - * the ratings to set - */ - public void setRatings(List ratings) { - this.ratings = ratings; - } - - /** - * @return the director - */ - public Director getDirector() { - return director; - } - - /** - * @param director - * the director to set - */ - public void setDirector(Director director) { - this.director = director; - } - -} diff --git a/samples/pax-exam-sample2-model/src/main/java/org/ops4j/pax/exam/sample2/model/Person.java b/samples/pax-exam-sample2-model/src/main/java/org/ops4j/pax/exam/sample2/model/Person.java deleted file mode 100644 index 0dfb59ff5..000000000 --- a/samples/pax-exam-sample2-model/src/main/java/org/ops4j/pax/exam/sample2/model/Person.java +++ /dev/null @@ -1,155 +0,0 @@ -/* - * Copyright 2012 Harald Wellmann - * - * Licensed 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. - * - */ -package org.ops4j.pax.exam.sample2.model; - -import java.util.Date; - -import javax.persistence.Entity; -import javax.persistence.Id; -import javax.persistence.Lob; -import javax.persistence.Table; -import javax.persistence.Temporal; -import javax.persistence.TemporalType; - -@Entity -@Table(name = "person") -public class Person { - - @Id - private int id; - - private String name; - - private String birthplace; - - @Lob - private String biography; - - private String profileImageUrl; - - @Temporal(TemporalType.DATE) - private Date birthday; - - @Temporal(TemporalType.TIMESTAMP) - private Date lastModified; - - /** - * @return the id - */ - public int getId() { - return id; - } - - /** - * @param id - * the id to set - */ - public void setId(int id) { - this.id = id; - } - - /** - * @return the name - */ - public String getName() { - return name; - } - - /** - * @param name - * the name to set - */ - public void setName(String name) { - this.name = name; - } - - /** - * @return the birthplace - */ - public String getBirthplace() { - return birthplace; - } - - /** - * @param birthplace - * the birthplace to set - */ - public void setBirthplace(String birthplace) { - this.birthplace = birthplace; - } - - /** - * @return the biography - */ - public String getBiography() { - return biography; - } - - /** - * @param biography - * the biography to set - */ - public void setBiography(String biography) { - this.biography = biography; - } - - /** - * @return the profileImageUrl - */ - public String getProfileImageUrl() { - return profileImageUrl; - } - - /** - * @param profileImageUrl - * the profileImageUrl to set - */ - public void setProfileImageUrl(String profileImageUrl) { - this.profileImageUrl = profileImageUrl; - } - - /** - * @return the birthday - */ - public Date getBirthday() { - return birthday; - } - - /** - * @param birthday - * the birthday to set - */ - public void setBirthday(Date birthday) { - this.birthday = birthday; - } - - /** - * @return the lastModified - */ - public Date getLastModified() { - return lastModified; - } - - /** - * @param lastModified - * the lastModified to set - */ - public void setLastModified(Date lastModified) { - this.lastModified = lastModified; - } - -} diff --git a/samples/pax-exam-sample2-model/src/main/java/org/ops4j/pax/exam/sample2/model/Rating.java b/samples/pax-exam-sample2-model/src/main/java/org/ops4j/pax/exam/sample2/model/Rating.java deleted file mode 100644 index 0188ac1c4..000000000 --- a/samples/pax-exam-sample2-model/src/main/java/org/ops4j/pax/exam/sample2/model/Rating.java +++ /dev/null @@ -1,119 +0,0 @@ -/* - * Copyright 2012 Harald Wellmann - * - * Licensed 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. - * - */ -package org.ops4j.pax.exam.sample2.model; - -import javax.persistence.Entity; -import javax.persistence.GeneratedValue; -import javax.persistence.GenerationType; -import javax.persistence.Id; -import javax.persistence.Lob; -import javax.persistence.ManyToOne; -import javax.persistence.Table; - -@Entity -@Table(name = "rating") -public class Rating { - - @Id - @GeneratedValue(strategy = GenerationType.AUTO) - private int id; - - private int stars; - - @Lob - private String comment; - - @ManyToOne - private User user; - @ManyToOne - private Movie movie; - - /** - * @return the id - */ - public int getId() { - return id; - } - - /** - * @param id - * the id to set - */ - public void setId(int id) { - this.id = id; - } - - /** - * @return the stars - */ - public int getStars() { - return stars; - } - - /** - * @param stars - * the stars to set - */ - public void setStars(int stars) { - this.stars = stars; - } - - /** - * @return the comment - */ - public String getComment() { - return comment; - } - - /** - * @param comment - * the comment to set - */ - public void setComment(String comment) { - this.comment = comment; - } - - /** - * @return the user - */ - public User getUser() { - return user; - } - - /** - * @param user - * the user to set - */ - public void setUser(User user) { - this.user = user; - } - - /** - * @return the movie - */ - public Movie getMovie() { - return movie; - } - - /** - * @param movie - * the movie to set - */ - public void setMovie(Movie movie) { - this.movie = movie; - } -} diff --git a/samples/pax-exam-sample2-model/src/main/java/org/ops4j/pax/exam/sample2/model/Role.java b/samples/pax-exam-sample2-model/src/main/java/org/ops4j/pax/exam/sample2/model/Role.java deleted file mode 100644 index c21c5fbe1..000000000 --- a/samples/pax-exam-sample2-model/src/main/java/org/ops4j/pax/exam/sample2/model/Role.java +++ /dev/null @@ -1,102 +0,0 @@ -/* - * Copyright 2012 Harald Wellmann - * - * Licensed 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. - * - */ -package org.ops4j.pax.exam.sample2.model; - -import javax.persistence.Entity; -import javax.persistence.GeneratedValue; -import javax.persistence.GenerationType; -import javax.persistence.Id; -import javax.persistence.ManyToOne; -import javax.persistence.Table; - -@Entity -@Table(name = "role") -public class Role { - - @Id - @GeneratedValue(strategy = GenerationType.AUTO) - private int id; - - private String name; - - @ManyToOne - private Actor actor; - - @ManyToOne - private Movie movie; - - /** - * @return the id - */ - public int getId() { - return id; - } - - /** - * @param id - * the id to set - */ - public void setId(int id) { - this.id = id; - } - - /** - * @return the name - */ - public String getName() { - return name; - } - - /** - * @param name - * the name to set - */ - public void setName(String name) { - this.name = name; - } - - /** - * @return the actor - */ - public Actor getActor() { - return actor; - } - - /** - * @param actor - * the actor to set - */ - public void setActor(Actor actor) { - this.actor = actor; - } - - /** - * @return the movie - */ - public Movie getMovie() { - return movie; - } - - /** - * @param movie - * the movie to set - */ - public void setMovie(Movie movie) { - this.movie = movie; - } - -} diff --git a/samples/pax-exam-sample2-model/src/main/java/org/ops4j/pax/exam/sample2/model/User.java b/samples/pax-exam-sample2-model/src/main/java/org/ops4j/pax/exam/sample2/model/User.java deleted file mode 100644 index dc3eddaf6..000000000 --- a/samples/pax-exam-sample2-model/src/main/java/org/ops4j/pax/exam/sample2/model/User.java +++ /dev/null @@ -1,127 +0,0 @@ -/* - * Copyright 2012 Harald Wellmann - * - * Licensed 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. - * - */ -package org.ops4j.pax.exam.sample2.model; - -import java.io.Serializable; -import java.util.ArrayList; -import java.util.List; - -import javax.persistence.Entity; -import javax.persistence.Id; -import javax.persistence.ManyToMany; -import javax.persistence.Table; - -/** - * User entity. Note that {@code USER} is a reserved word in Derby SQL, so we override the default - * table name. - * - * @author Harald Wellmann - * - */ -@Entity -@Table(name = "usr") -public class User implements Serializable { - - private static final long serialVersionUID = 1L; - - @Id - private String id; - - private String name; - private String password; - - @ManyToMany - private List friends = new ArrayList(); - - @ManyToMany - private List ratings = new ArrayList(); - - /** - * @return the id - */ - public String getId() { - return id; - } - - /** - * @param id - * the id to set - */ - public void setId(String id) { - this.id = id; - } - - /** - * @return the name - */ - public String getName() { - return name; - } - - /** - * @param name - * the name to set - */ - public void setName(String name) { - this.name = name; - } - - /** - * @return the password - */ - public String getPassword() { - return password; - } - - /** - * @param password - * the password to set - */ - public void setPassword(String password) { - this.password = password; - } - - /** - * @return the friends - */ - public List getFriends() { - return friends; - } - - /** - * @param friends - * the friends to set - */ - public void setFriends(List friends) { - this.friends = friends; - } - - /** - * @return the ratings - */ - public List getRatings() { - return ratings; - } - - /** - * @param ratings - * the ratings to set - */ - public void setRatings(List ratings) { - this.ratings = ratings; - } -} diff --git a/samples/pax-exam-sample2-model/src/main/resources/META-INF/persistence.xml b/samples/pax-exam-sample2-model/src/main/resources/META-INF/persistence.xml deleted file mode 100644 index 28072f2e8..000000000 --- a/samples/pax-exam-sample2-model/src/main/resources/META-INF/persistence.xml +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - jdbc/cineasts - - - - - - - - - diff --git a/samples/pax-exam-sample2-service/pom.xml b/samples/pax-exam-sample2-service/pom.xml deleted file mode 100644 index 7f3dc0e55..000000000 --- a/samples/pax-exam-sample2-service/pom.xml +++ /dev/null @@ -1,112 +0,0 @@ - - 4.0.0 - - pax-exam-samples - org.ops4j.pax.exam - 4.13.6-SNAPSHOT - - - org.ops4j.pax.exam.samples - pax-exam-sample2-service - - OPS4J Pax Exam Sample2 Service - - - - org.ops4j.pax.exam.samples - pax-exam-sample2-model - ${project.version} - - - org.codehaus.jackson - jackson-mapper-asl - - - - org.ops4j.pax.exam - pax-exam-container-glassfish-embedded - ${project.version} - test - - - org.ops4j.pax.exam - pax-exam-junit4 - ${project.version} - test - - - org.ops4j.pax.exam - pax-exam-invoker-jaxrs2 - ${project.version} - test - - - org.ops4j.pax.exam - pax-exam-servlet-bridge - ${project.version} - test - - - org.ops4j.pax.exam - pax-exam-cdi - ${project.version} - test - - - - org.ops4j.pax.exam - pax-exam-link-assembly - ${project.version} - test - - - - org.ops4j.pax.url - pax-url-link - test - - - org.ops4j.pax.url - pax-url-aether - test - - - org.ops4j.pax.url - pax-url-classpath - test - - - - jakarta.platform - jakarta.jakartaee-api - provided - - - - - ch.qos.logback - logback-core - test - - - - ch.qos.logback - logback-classic - test - - - - org.slf4j - slf4j-api - provided - - - - org.slf4j - jul-to-slf4j - test - - - - - \ No newline at end of file diff --git a/samples/pax-exam-sample2-service/src/main/java/org/ops4j/pax/exam/sample2/movieimport/MovieDbApiClient.java b/samples/pax-exam-sample2-service/src/main/java/org/ops4j/pax/exam/sample2/movieimport/MovieDbApiClient.java deleted file mode 100644 index a023f0886..000000000 --- a/samples/pax-exam-sample2-service/src/main/java/org/ops4j/pax/exam/sample2/movieimport/MovieDbApiClient.java +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Copyright 2012 Harald Wellmann - * - * Licensed 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. - * - */ -package org.ops4j.pax.exam.sample2.movieimport; - -import java.net.URL; -import java.util.Collections; -import java.util.List; -import java.util.Map; - -import org.codehaus.jackson.map.ObjectMapper; - -public class MovieDbApiClient { - - protected final ObjectMapper mapper; - private final String baseUrl = "http://api.themoviedb.org/"; - private final String apiKey; - - public MovieDbApiClient() { - this("926d2a79e82920b62f03b1cb57e532e6"); - } - - public MovieDbApiClient(String apiKey) { - this.apiKey = apiKey; - mapper = new ObjectMapper(); - } - - public Map getMovie(String id) { - return loadJsonData(id, buildMovieUrl(id)); - } - - @SuppressWarnings("unchecked") - private Map loadJsonData(String id, String url) { - try { - List value = mapper.readValue(new URL(url), List.class); - if (value.isEmpty() || value.get(0).equals("Nothing found.")) { - return Collections.singletonMap("not_found", System.currentTimeMillis()); - } - return (Map) value.get(0); - } - // CHECKSTYLE:SKIP : catch all wanted - catch (Exception e) { - throw new RuntimeException("Failed to get data from " + url, e); - } - } - - private String buildMovieUrl(String movieId) { - return String.format("%s2.1/Movie.getInfo/en/json/%s/%s", baseUrl, apiKey, movieId); - } - - public Map getPerson(String id) { - return loadJsonData(id, buildPersonUrl(id)); - } - - private String buildPersonUrl(String personId) { - return String.format("%s2.1/Person.getInfo/en/json/%s/%s", baseUrl, apiKey, personId); - } -} diff --git a/samples/pax-exam-sample2-service/src/main/java/org/ops4j/pax/exam/sample2/movieimport/MovieDbException.java b/samples/pax-exam-sample2-service/src/main/java/org/ops4j/pax/exam/sample2/movieimport/MovieDbException.java deleted file mode 100644 index 4a7139d1e..000000000 --- a/samples/pax-exam-sample2-service/src/main/java/org/ops4j/pax/exam/sample2/movieimport/MovieDbException.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright 2012 Harald Wellmann - * - * Licensed 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. - * - */ -package org.ops4j.pax.exam.sample2.movieimport; - -public class MovieDbException extends RuntimeException { - - private static final long serialVersionUID = 1L; - - public MovieDbException(String message) { - super(message); - } - - public MovieDbException(String message, Throwable cause) { - super(message, cause); - } -} diff --git a/samples/pax-exam-sample2-service/src/main/java/org/ops4j/pax/exam/sample2/movieimport/MovieDbImportService.java b/samples/pax-exam-sample2-service/src/main/java/org/ops4j/pax/exam/sample2/movieimport/MovieDbImportService.java deleted file mode 100644 index b60b77b68..000000000 --- a/samples/pax-exam-sample2-service/src/main/java/org/ops4j/pax/exam/sample2/movieimport/MovieDbImportService.java +++ /dev/null @@ -1,157 +0,0 @@ -/* - * Copyright 2012 Harald Wellmann - * - * Licensed 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. - * - */ -package org.ops4j.pax.exam.sample2.movieimport; - -import java.util.Collection; -import java.util.LinkedHashMap; -import java.util.Map; - -import javax.ejb.Stateless; -import javax.inject.Inject; -import javax.persistence.EntityManager; -import javax.persistence.PersistenceContext; - -import org.ops4j.pax.exam.sample2.model.Actor; -import org.ops4j.pax.exam.sample2.model.Director; -import org.ops4j.pax.exam.sample2.model.Movie; -import org.ops4j.pax.exam.sample2.model.Person; -import org.ops4j.pax.exam.sample2.model.Role; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@Stateless -public class MovieDbImportService { - - private static Logger logger = LoggerFactory.getLogger(MovieDbImportService.class); - private MovieDbJsonMapper movieDbJsonMapper = new MovieDbJsonMapper(); - - @PersistenceContext - private EntityManager em; - - @Inject - private MovieDbApiClient client; - - @Inject - private MovieDbLocalStorage localStorage; - - public Map importMovies(Map ranges) { - final Map movies = new LinkedHashMap(); - for (Map.Entry entry : ranges.entrySet()) { - for (int id = entry.getKey(); id <= entry.getValue(); id++) { - String result = importMovieFailsafe(id); - movies.put(id, result); - } - } - return movies; - } - - private String importMovieFailsafe(Integer id) { - try { - Movie movie = doImportMovie(id); - return movie.getTitle(); - } - // CHECKSTYLE:SKIP : catch all wanted - catch (Exception e) { - return e.getMessage(); - } - } - - public Movie importMovie(Integer movieId) { - return doImportMovie(movieId); - } - - private Movie doImportMovie(Integer movieId) { - logger.info("Importing movie " + movieId); - - Movie movie = new Movie(); - movie.setId(movieId); - - Map data = loadMovieData(movieId); - if (data.containsKey("not_found")) { - throw new RuntimeException("Data for Movie " + movieId + " not found."); - } - movieDbJsonMapper.mapToMovie(data, movie); - relatePersonsToMovie(movie, data); - em.persist(movie); - return movie; - } - - private Map loadMovieData(Integer id) { - String movieId = Integer.toString(id); - if (localStorage.hasMovie(movieId)) { - return localStorage.loadMovie(movieId); - } - - Map data = client.getMovie(movieId); - localStorage.storeMovie(movieId, data); - return data; - } - - private void relatePersonsToMovie(Movie movie, Map data) { - @SuppressWarnings("unchecked") - Collection> cast = (Collection>) data.get("cast"); - for (Map entry : cast) { - Integer id = (Integer) entry.get("id"); - String jobName = (String) entry.get("job"); - if ("Actor".equals(jobName)) { - Actor actor = new Actor(); - actor.setId(id); - doImportPerson(actor); - Role role = new Role(); - role.setActor(actor); - role.setMovie(movie); - role.setName((String) entry.get("character")); - em.persist(role); - movie.getRoles().add(role); - } - else if ("Director".equals(jobName)) { - Director director = new Director(); - director.setId(id); - director.getMovies().add(movie); - doImportPerson(director); - movie.setDirector(director); - } - else { - logger.info("Could not add person with job {} {}", jobName, entry); - continue; - } - } - } - - private void doImportPerson(Person person) { - String personId = Integer.toString(person.getId()); - logger.info("Importing person " + personId); - Map data = loadPersonData(personId); - if (data.containsKey("not_found")) { - throw new RuntimeException("Data for Person " + personId + " not found."); - } - movieDbJsonMapper.mapToPerson(data, person); - Person persistentPerson = em.find(Person.class, person.getId()); - if (persistentPerson == null) { - em.persist(person); - } - } - - private Map loadPersonData(String personId) { - if (localStorage.hasPerson(personId)) { - return localStorage.loadPerson(personId); - } - Map data = client.getPerson(personId); - localStorage.storePerson(personId, data); - return localStorage.loadPerson(personId); - } -} diff --git a/samples/pax-exam-sample2-service/src/main/java/org/ops4j/pax/exam/sample2/movieimport/MovieDbJsonMapper.java b/samples/pax-exam-sample2-service/src/main/java/org/ops4j/pax/exam/sample2/movieimport/MovieDbJsonMapper.java deleted file mode 100644 index 1bc394248..000000000 --- a/samples/pax-exam-sample2-service/src/main/java/org/ops4j/pax/exam/sample2/movieimport/MovieDbJsonMapper.java +++ /dev/null @@ -1,145 +0,0 @@ -/* - * Copyright 2012 Harald Wellmann - * - * Licensed 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. - * - */ -package org.ops4j.pax.exam.sample2.movieimport; - -import java.text.ParseException; -import java.text.SimpleDateFormat; -import java.util.Date; -import java.util.List; -import java.util.Map; - -import org.ops4j.pax.exam.sample2.model.Movie; -import org.ops4j.pax.exam.sample2.model.Person; - -@SuppressWarnings({ "unchecked", "rawtypes" }) -public class MovieDbJsonMapper { - - public void mapToMovie(Map data, Movie movie) { - try { - movie.setTitle((String) data.get("name")); - movie.setLanguage((String) data.get("language")); - movie.setImdbId((String) data.get("imdb_id")); - movie.setTagline((String) data.get("tagline")); - movie.setDescription(limit((String) data.get("overview"), 500)); - // movie.setReleaseDate(toDate(data, "released", "yyyy-MM-dd")); - movie.setRuntime((Integer) data.get("runtime")); - movie.setHomepage((String) data.get("homepage")); - Object trailer = data.get("trailer"); - if (trailer != null) { - String trailerUrl = (String) trailer; - movie.setTrailer(trailerUrl); - String youtubeId = getYoutubeId(trailerUrl); - if (youtubeId != null) { - movie.setYoutubeId(youtubeId); - } - } - // movie.setGenre(extractFirst(data, "genres", "name")); - // movie.setStudio(extractFirst(data,"studios", "name")); - // movie.setVersion((Integer)data.get("version")); - // movie.setLastModified(toDate(data,"last_modified_at","yyyy-MM-dd HH:mm:ss")); - movie.setImageUrl(selectImageUrl((List) data.get("posters"), "poster", "mid")); - } - // CHECKSTYLE:SKIP : catch all wanted - catch (Exception e) { - throw new MovieDbException("Failed to map json for movie", e); - } - } - - public String getYoutubeId(String trailerUrl) { - if (trailerUrl == null || !trailerUrl.contains("youtu")) { - return null; - } - String[] parts = trailerUrl.split("[=/]"); - int numberOfParts = parts.length; - return numberOfParts > 0 ? parts[numberOfParts - 1] : null; - } - - private String selectImageUrl(List data, final String type, final String size) { - if (data == null) { - return null; - } - for (Map entry : data) { - Map image = (Map) entry.get("image"); - if (image.get("type").equals(type) && image.get("size").equals(size)) { - return (String) image.get("url"); - } - } - return null; - } - - @SuppressWarnings("unused") - private String extractFirst(Map data, String field, String property) { - List inner = (List) data.get(field); - if (inner == null || inner.isEmpty()) { - return null; - } - return (String) inner.get(0).get(property); - } - - private Date toDate(Map data, String field, final String pattern) { - try { - String dateString = (String) data.get(field); - if (dateString == null || dateString.isEmpty()) { - return null; - } - return new SimpleDateFormat(pattern).parse(dateString); - } - catch (ParseException e) { - return null; - } - } - - public void mapToPerson(Map data, Person person) { - try { - person.setName((String) data.get("name")); - person.setBirthday(toDate(data, "birthday", "yyyy-MM-dd")); - String birthplace = (String) data.get("birthplace"); - if (birthplace != null) { - person.setBirthplace(birthplace); - } - String biography = (String) data.get("biography"); - person.setBiography(limit(biography, 500)); - // person.setVersion((Integer) data.get("version")); - String imageUrl = selectImageUrl((List) data.get("profile"), "profile", "profile"); - if (imageUrl != null) { - person.setProfileImageUrl(imageUrl); - } - person.setLastModified(toDate(data, "last_modified_at", "yyyy-MM-dd HH:mm:ss")); - } - // CHECKSTYLE:SKIP : catch all wanted - catch (Exception e) { - throw new MovieDbException("Failed to map json for person", e); - } - } - - private String limit(String text, int limit) { - if (text == null || text.length() < limit) { - return text; - } - return text.substring(0, limit); - } - - // public Roles mapToRole(String roleString) { - // if (roleString.equals("Actor")) { - // return Roles.ACTS_IN; - // } - // if (roleString.equals("Director")) { - // return Roles.DIRECTED; - // } - // return null; - // } -} diff --git a/samples/pax-exam-sample2-service/src/main/java/org/ops4j/pax/exam/sample2/movieimport/MovieDbLocalStorage.java b/samples/pax-exam-sample2-service/src/main/java/org/ops4j/pax/exam/sample2/movieimport/MovieDbLocalStorage.java deleted file mode 100644 index 86258b7d4..000000000 --- a/samples/pax-exam-sample2-service/src/main/java/org/ops4j/pax/exam/sample2/movieimport/MovieDbLocalStorage.java +++ /dev/null @@ -1,125 +0,0 @@ -/* - * Copyright 2012 Harald Wellmann - * - * Licensed 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. - * - */ -package org.ops4j.pax.exam.sample2.movieimport; - -import java.io.File; -import java.util.Collections; -import java.util.List; -import java.util.Map; - -import org.codehaus.jackson.map.ObjectMapper; - -public class MovieDbLocalStorage { - - private String storagePath; - private ObjectMapper mapper; - - public MovieDbLocalStorage() { - this("moviedb-json"); - } - - public MovieDbLocalStorage(String storagePath) { - this.storagePath = storagePath; - ensureStorageDirectoryExists(); - mapper = new ObjectMapper(); - } - - private void ensureStorageDirectoryExists() { - File storageDirectory = new File(storagePath); - if (!storageDirectory.isDirectory()) { - if (!storageDirectory.mkdirs()) { - throw new MovieDbException("Failed to create storage dir"); - } - } - } - - public boolean hasMovie(String movieId) { - return fileForMovie(movieId).exists(); - } - - private File fileForMovie(String movieId) { - return new File(storagePath, String.format("movie_%s.json", movieId)); - } - - public Map loadMovie(String movieId) { - File storageFile = fileForMovie(movieId); - return loadJsonValue(storageFile); - } - - private Map loadJsonValue(File storageFile) { - try { - final Object value = mapper.readValue(storageFile, Object.class); - if (value instanceof List) { - List list = (List) value; - if (list.isEmpty() || list.get(0).equals("Nothing found.")) { - return Collections.singletonMap("not_found", System.currentTimeMillis()); - } - return asMap(list.get(0)); - } - return asMap(value); - } - // CHECKSTYLE:SKIP : catch all wanted - catch (Exception e) { - throw new MovieDbException("Failed to load JSON from storage for file " - + storageFile.getPath(), e); - } - } - - @SuppressWarnings("unchecked") - private Map asMap(Object value) { - if (value instanceof Map) { - return Map.class.cast(value); - } - final String typeInformation = value == null ? "null" : value.getClass().getSimpleName(); - throw new MovieDbException("Wrong movie data format, expected Map/JSON-Object but was " - + typeInformation); - } - - public void storeMovie(String movieId, Object movieData) { - File storageFile = fileForMovie(movieId); - storeJsonValue(movieData, storageFile); - } - - private void storeJsonValue(Object jsonData, File storageFile) { - try { - mapper.writeValue(storageFile, jsonData); - } - // CHECKSTYLE:SKIP : catch all wanted - catch (Exception e) { - throw new MovieDbException("Failed to store JSON to storage for file " - + storageFile.getPath(), e); - } - } - - public boolean hasPerson(String personId) { - return fileForPerson(personId).exists(); - } - - private File fileForPerson(String personId) { - return new File(storagePath, String.format("person_%s.json", personId)); - } - - public Map loadPerson(String personId) { - File storageFile = fileForPerson(personId); - return loadJsonValue(storageFile); - } - - public void storePerson(String personId, Object personJson) { - File storageFile = fileForPerson(personId); - storeJsonValue(personJson, storageFile); - } -} diff --git a/samples/pax-exam-sample2-service/src/main/java/org/ops4j/pax/exam/sample2/service/ActorService.java b/samples/pax-exam-sample2-service/src/main/java/org/ops4j/pax/exam/sample2/service/ActorService.java deleted file mode 100644 index 1c20b69f0..000000000 --- a/samples/pax-exam-sample2-service/src/main/java/org/ops4j/pax/exam/sample2/service/ActorService.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright 2012 Harald Wellmann - * - * Licensed 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. - * - */ -package org.ops4j.pax.exam.sample2.service; - -import javax.ejb.Stateless; -import javax.persistence.EntityManager; -import javax.persistence.PersistenceContext; - -import org.ops4j.pax.exam.sample2.model.Actor; - -@Stateless -public class ActorService { - - @PersistenceContext - private EntityManager em; - - public Actor findById(int id) { - Actor actor = em.find(Actor.class, id); - actor.getRoles(); - return actor; - } -} diff --git a/samples/pax-exam-sample2-service/src/main/java/org/ops4j/pax/exam/sample2/service/DatabasePopulator.java b/samples/pax-exam-sample2-service/src/main/java/org/ops4j/pax/exam/sample2/service/DatabasePopulator.java deleted file mode 100644 index f79433a4a..000000000 --- a/samples/pax-exam-sample2-service/src/main/java/org/ops4j/pax/exam/sample2/service/DatabasePopulator.java +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Copyright 2012 Harald Wellmann - * - * Licensed 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. - * - */ -package org.ops4j.pax.exam.sample2.service; - -import static java.util.Arrays.asList; - -import java.util.ArrayList; -import java.util.List; - -import javax.inject.Inject; - -import org.ops4j.pax.exam.sample2.model.Movie; -import org.ops4j.pax.exam.sample2.model.User; -import org.ops4j.pax.exam.sample2.movieimport.MovieDbImportService; - -/** - * @author mh - * @since 04.03.11 - */ -public class DatabasePopulator { - - @Inject - private UserService userService; - - @Inject - private MovieService movieService; - - @Inject - private MovieDbImportService importService; - - public List populateDatabase() { - - User micha = userService.register("micha", "Micha", "password"); - userService.register("ollie", "Olliver", "password"); - userService.addFriend(micha, "ollie"); - - List ids = asList(19995, 194, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, - 13, 20526, 11, 1893, 1892, 1894, 168, 193, 200, 157, 152, 201, 154, 12155, 58, 285, - 118, 22, 392, 5255, 568, 9800, 497, 101, 120, 121, 122); - List result = new ArrayList(ids.size()); - for (Integer id : ids) { - result.add(importService.importMovie(id)); - } - - final Movie movie = movieService.findById(603); - userService.rate(micha, movie, 5, "Best of the series"); - return result; - } -} diff --git a/samples/pax-exam-sample2-service/src/main/java/org/ops4j/pax/exam/sample2/service/MovieService.java b/samples/pax-exam-sample2-service/src/main/java/org/ops4j/pax/exam/sample2/service/MovieService.java deleted file mode 100644 index 0c3fbd96f..000000000 --- a/samples/pax-exam-sample2-service/src/main/java/org/ops4j/pax/exam/sample2/service/MovieService.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright 2012 Harald Wellmann - * - * Licensed 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. - * - */ -package org.ops4j.pax.exam.sample2.service; - -import java.util.List; - -import javax.ejb.Stateless; -import javax.persistence.EntityManager; -import javax.persistence.PersistenceContext; -import javax.persistence.TypedQuery; - -import org.ops4j.pax.exam.sample2.model.Movie; - -@Stateless -public class MovieService { - - @PersistenceContext - private EntityManager em; - - public Movie findById(int id) { - Movie movie = em.find(Movie.class, id); - movie.getActors(); - movie.getRoles(); - movie.getRatings(); - return movie; - } - - public List findByTitleLike(String substring, int limit, int offset) { - String jpql = "select m from Movie m where m.title like :substring order by m.title"; - TypedQuery query = em.createQuery(jpql, Movie.class); - query.setParameter("substring", "%" + substring + "%"); - - List movies = query.setFirstResult(offset).setMaxResults(limit).getResultList(); - return movies; - } -} diff --git a/samples/pax-exam-sample2-service/src/main/java/org/ops4j/pax/exam/sample2/service/UserService.java b/samples/pax-exam-sample2-service/src/main/java/org/ops4j/pax/exam/sample2/service/UserService.java deleted file mode 100644 index a528648e6..000000000 --- a/samples/pax-exam-sample2-service/src/main/java/org/ops4j/pax/exam/sample2/service/UserService.java +++ /dev/null @@ -1,85 +0,0 @@ -/* - * Copyright 2012 Harald Wellmann - * - * Licensed 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. - * - */ -package org.ops4j.pax.exam.sample2.service; - -import javax.ejb.Stateless; -import javax.persistence.EntityManager; -import javax.persistence.PersistenceContext; - -import org.ops4j.pax.exam.sample2.model.Movie; -import org.ops4j.pax.exam.sample2.model.Rating; -import org.ops4j.pax.exam.sample2.model.User; -import org.ops4j.pax.exam.sample2.movieimport.MovieDbException; - -@Stateless -public class UserService { - - @PersistenceContext - private EntityManager em; - - public User findByLogin(String login) { - return em.find(User.class, login); - } - - public long getNumUsers() { - String jpql = "select count(u) from User u"; - return em.createQuery(jpql, Long.class).getSingleResult(); - } - - public User authenticate(String login, String password) { - User user = em.find(User.class, login); - if (user != null) { - if (password.equals(user.getPassword())) { - return user; - } - } - return null; - } - - public User register(String login, String name, String password) { - if (findByLogin(login) != null) { - throw new MovieDbException("login is already taken"); - } - User user = new User(); - user.setId(login); - user.setName(name); - user.setPassword(password); - em.persist(user); - return user; - } - - public Rating rate(User user, Movie movie, int stars, String comment) { - Rating rating = new Rating(); - rating.setUser(user); - rating.setMovie(movie); - rating.setStars(stars); - rating.setComment(comment); - em.persist(rating); - return rating; - } - - public void addFriend(User user, String friendLogin) { - User friend = findByLogin(friendLogin); - if (friend != null && !friend.equals(user)) { - user.getFriends().add(friend); - } - } - - public boolean areFriends(User currentUser, User otherUser) { - return currentUser.getFriends().contains(otherUser); - } -} diff --git a/samples/pax-exam-sample2-service/src/main/resources/META-INF/beans.xml b/samples/pax-exam-sample2-service/src/main/resources/META-INF/beans.xml deleted file mode 100644 index 13d6ec2c4..000000000 --- a/samples/pax-exam-sample2-service/src/main/resources/META-INF/beans.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - \ No newline at end of file diff --git a/samples/pax-exam-sample2-service/src/test/java/org/ops4j/pax/exam/sample2/dao/DatabasePopulatorRunner.java b/samples/pax-exam-sample2-service/src/test/java/org/ops4j/pax/exam/sample2/dao/DatabasePopulatorRunner.java deleted file mode 100644 index f802669f9..000000000 --- a/samples/pax-exam-sample2-service/src/test/java/org/ops4j/pax/exam/sample2/dao/DatabasePopulatorRunner.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright 2012 Harald Wellmann - * - * Licensed 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. - * - */ -package org.ops4j.pax.exam.sample2.dao; - -import static org.hamcrest.CoreMatchers.is; -import static org.junit.Assert.assertThat; - -import java.util.List; - -import javax.inject.Inject; - -import org.junit.Test; -import org.junit.runner.RunWith; -import org.ops4j.pax.exam.junit.PaxExam; -import org.ops4j.pax.exam.sample2.model.Movie; -import org.ops4j.pax.exam.sample2.service.DatabasePopulator; - -/** - * Run this class to populate the database. - *

- * Not an automatic test, hence not named *Test. - * - * @author Harald Wellmann - */ -@RunWith(PaxExam.class) -public class DatabasePopulatorRunner { - - @Inject - private DatabasePopulator populator; - - @Test - public void populateDatabase() { - List movies = populator.populateDatabase(); - assertThat(movies.isEmpty(), is(false)); - } -} diff --git a/samples/pax-exam-sample2-service/src/test/java/org/ops4j/pax/exam/sample2/dao/UserServiceTest.java b/samples/pax-exam-sample2-service/src/test/java/org/ops4j/pax/exam/sample2/dao/UserServiceTest.java deleted file mode 100644 index fa93cf901..000000000 --- a/samples/pax-exam-sample2-service/src/test/java/org/ops4j/pax/exam/sample2/dao/UserServiceTest.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright 2012 Harald Wellmann - * - * Licensed 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. - * - */ -package org.ops4j.pax.exam.sample2.dao; - -import static org.hamcrest.CoreMatchers.is; -import static org.hamcrest.CoreMatchers.notNullValue; -import static org.junit.Assert.assertThat; - -import javax.inject.Inject; - -import org.junit.Ignore; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.ops4j.pax.exam.junit.PaxExam; -import org.ops4j.pax.exam.sample2.model.User; -import org.ops4j.pax.exam.sample2.service.UserService; -import org.ops4j.pax.exam.util.Transactional; - -@RunWith(PaxExam.class) -@Transactional -public class UserServiceTest { - - @Inject - private UserService userService; - - @Test - @Ignore - public void authenticateValidUser() { - userService.register("bilbo", "Bilbo Baggins", "treasure"); - User user = userService.authenticate("bilbo", "treasure"); - assertThat(user, is(notNullValue())); - assertThat(user.getId(), is("bilbo")); - assertThat(user.getName(), is("Bilbo Baggins")); - assertThat(user.getPassword(), is("treasure")); - } -} diff --git a/samples/pax-exam-sample2-service/src/test/resources/exam.properties b/samples/pax-exam-sample2-service/src/test/resources/exam.properties deleted file mode 100644 index 18c317b81..000000000 --- a/samples/pax-exam-sample2-service/src/test/resources/exam.properties +++ /dev/null @@ -1,2 +0,0 @@ -pax.exam.system = javaee - diff --git a/samples/pax-exam-sample2-service/src/test/resources/glassfish-config/domain.xml b/samples/pax-exam-sample2-service/src/test/resources/glassfish-config/domain.xml deleted file mode 100644 index 6cac17ef4..000000000 --- a/samples/pax-exam-sample2-service/src/test/resources/glassfish-config/domain.xml +++ /dev/null @@ -1,451 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -XX:MaxPermSize=192m - -client - -Djava.awt.headless=true - -Djavax.management.builder.initial=com.sun.enterprise.v3.admin.AppServerMBeanServerBuilder - -XX:+UnlockDiagnosticVMOptions - -Djava.endorsed.dirs=${com.sun.aas.installRoot}/modules/endorsed${path.separator}${com.sun.aas.installRoot}/lib/endorsed - -Djava.security.policy=${com.sun.aas.instanceRoot}/config/server.policy - -Djava.security.auth.login.config=${com.sun.aas.instanceRoot}/config/login.conf - -Dcom.sun.enterprise.security.httpsOutboundKeyAlias=s1as - -Xmx512m - -DwriteDefaultElementsToXml=true - -Djavax.net.ssl.keyStore=${com.sun.aas.instanceRoot}/config/keystore.jks - -Djavax.net.ssl.trustStore=${com.sun.aas.instanceRoot}/config/cacerts.jks - -Djava.ext.dirs=${com.sun.aas.javaRoot}/lib/ext${path.separator}${com.sun.aas.javaRoot}/jre/lib/ext${path.separator}${com.sun.aas.instanceRoot}/lib/ext - -Djdbc.drivers=org.apache.derby.jdbc.ClientDriver - -DANTLR_USE_DIRECT_CLASS_LOADING=true - -Dcom.sun.enterprise.config.config_environment_factory_class=com.sun.enterprise.config.serverbeans.AppserverConfigEnvironmentFactory - -Dorg.glassfish.additionalOSGiBundlesToStart=org.apache.felix.shell,org.apache.felix.gogo.runtime,org.apache.felix.gogo.shell,org.apache.felix.gogo.command,org.apache.felix.shell.remote,org.apache.felix.fileinstall - -Dosgi.shell.telnet.port=6666 - -Dosgi.shell.telnet.maxconn=1 - -Dosgi.shell.telnet.ip=127.0.0.1 - -Dgosh.args=--nointeractive - -Dfelix.fileinstall.dir=${com.sun.aas.installRoot}/modules/autostart/ - -Dfelix.fileinstall.poll=5000 - -Dfelix.fileinstall.log.level=2 - -Dfelix.fileinstall.bundles.new.start=true - -Dfelix.fileinstall.bundles.startTransient=true - -Dfelix.fileinstall.disableConfigSave=false - -Duser.language=en - -XX:NewRatio=2 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -XX:MaxPermSize=192m - -server - -Djava.awt.headless=true - -XX:+UnlockDiagnosticVMOptions - -Djava.endorsed.dirs=${com.sun.aas.installRoot}/modules/endorsed${path.separator}${com.sun.aas.installRoot}/lib/endorsed - -Djava.security.policy=${com.sun.aas.instanceRoot}/config/server.policy - -Djava.security.auth.login.config=${com.sun.aas.instanceRoot}/config/login.conf - -Dcom.sun.enterprise.security.httpsOutboundKeyAlias=s1as - -Djavax.net.ssl.keyStore=${com.sun.aas.instanceRoot}/config/keystore.jks - -Djavax.net.ssl.trustStore=${com.sun.aas.instanceRoot}/config/cacerts.jks - -Djava.ext.dirs=${com.sun.aas.javaRoot}/lib/ext${path.separator}${com.sun.aas.javaRoot}/jre/lib/ext${path.separator}${com.sun.aas.instanceRoot}/lib/ext - -Djdbc.drivers=org.apache.derby.jdbc.ClientDriver - -DANTLR_USE_DIRECT_CLASS_LOADING=true - -Dcom.sun.enterprise.config.config_environment_factory_class=com.sun.enterprise.config.serverbeans.AppserverConfigEnvironmentFactory - -XX:NewRatio=2 - -Xmx512m - -Dorg.glassfish.additionalOSGiBundlesToStart=org.apache.felix.shell,org.apache.felix.gogo.runtime,org.apache.felix.gogo.shell,org.apache.felix.gogo.command,org.apache.felix.fileinstall - -Dosgi.shell.telnet.port=${OSGI_SHELL_TELNET_PORT} - -Dosgi.shell.telnet.maxconn=1 - -Dosgi.shell.telnet.ip=127.0.0.1 - -Dgosh.args=--noshutdown -c noop=true - -Dfelix.fileinstall.dir=${com.sun.aas.installRoot}/modules/autostart/ - -Dfelix.fileinstall.poll=5000 - -Dfelix.fileinstall.log.level=3 - -Dfelix.fileinstall.bundles.new.start=true - -Dfelix.fileinstall.bundles.startTransient=true - -Dfelix.fileinstall.disableConfigSave=false - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/samples/pax-exam-sample2-service/src/test/resources/glassfish-config/logging.properties b/samples/pax-exam-sample2-service/src/test/resources/glassfish-config/logging.properties deleted file mode 100644 index 88be40f40..000000000 --- a/samples/pax-exam-sample2-service/src/test/resources/glassfish-config/logging.properties +++ /dev/null @@ -1,10 +0,0 @@ -handlers = org.slf4j.bridge.SLF4JBridgeHandler -com.sun.enterprise.server.logging.GFFileHandler.flushFrequency=1 -com.sun.enterprise.server.logging.GFFileHandler.file=${com.sun.aas.instanceRoot}/logs/server.log -com.sun.enterprise.server.logging.GFFileHandler.rotationTimelimitInMinutes=0 -com.sun.enterprise.server.logging.GFFileHandler.logtoConsole=false -com.sun.enterprise.server.logging.GFFileHandler.rotationLimitInBytes=2000000 -com.sun.enterprise.server.logging.GFFileHandler.alarms=false -com.sun.enterprise.server.logging.GFFileHandler.formatter=com.sun.enterprise.server.logging.UniformLogFormatter -com.sun.enterprise.server.logging.GFFileHandler.retainErrorsStasticsForHours=0 -#org.jboss.weld.level = FINEST diff --git a/samples/pax-exam-sample2-service/src/test/resources/logback.xml b/samples/pax-exam-sample2-service/src/test/resources/logback.xml deleted file mode 100644 index 49f9db05b..000000000 --- a/samples/pax-exam-sample2-service/src/test/resources/logback.xml +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - - %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n - - - - - - target/test.log - - %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n - - - - - - - - - - - \ No newline at end of file diff --git a/samples/pom.xml b/samples/pom.xml index be08a8d5b..9fd560dae 100644 --- a/samples/pom.xml +++ b/samples/pom.xml @@ -16,8 +16,6 @@ pax-exam-sample1-repo pax-exam-sample1-service pax-exam-sample1-web - pax-exam-sample2-model - pax-exam-sample2-service pax-exam-sample3-beans pax-exam-sample4-model pax-exam-sample4-service