This is an automated email from the ASF dual-hosted git repository. jgallimore pushed a commit to branch tomee-7.1.x in repository https://gitbox.apache.org/repos/asf/tomee.git
The following commit(s) were added to refs/heads/tomee-7.1.x by this push: new 048fb62 Fixing build TomEE 7.1.x new c101ad4 Merge pull request #450 from danielsoro/tomee-7.1.x-fix-build 048fb62 is described below commit 048fb62100cdc84f410c98784e3867d58ab18a75 Author: Daniel Cunha (soro) <daniels...@apache.org> AuthorDate: Fri Mar 22 00:33:17 2019 -0300 Fixing build TomEE 7.1.x --- examples/multi-jpa-provider-testing/pom.xml | 2 +- examples/rest-on-ejb/pom.xml | 2 +- examples/simple-cmp2/pom.xml | 2 +- .../moviefun/DeployInWebAppsDirectoryTest.java | 2 +- .../moviefun/MoviesArquillianHtmlUnitTest.java | 2 +- .../cxf/rs/johnzon/JsonbJaxrsProviderTest.java | 127 --------------------- .../src/test/java/org/apache/tomee/TomEECliIT.java | 61 ++++++++-- 7 files changed, 58 insertions(+), 140 deletions(-) diff --git a/examples/multi-jpa-provider-testing/pom.xml b/examples/multi-jpa-provider-testing/pom.xml index 40505a8..756c4e6 100644 --- a/examples/multi-jpa-provider-testing/pom.xml +++ b/examples/multi-jpa-provider-testing/pom.xml @@ -71,7 +71,7 @@ </goals> <configuration> <skip>${maven.test.skip}</skip> - <argLine>"-javaagent:${settings.localRepository}/org/apache/tomee/openejb-javaagent/7.1.1-SNAPSHOT/openejb-javaagent-7.1.1-SNAPSHOT.jar"</argLine> + <argLine>"-javaagent:${settings.localRepository}/org/apache/tomee/openejb-javaagent/${project.version}/openejb-javaagent-${project.version}.jar"</argLine> <systemPropertyVariables> <javax.persistence.provider>org.apache.openjpa.persistence.PersistenceProviderImpl</javax.persistence.provider> </systemPropertyVariables> diff --git a/examples/rest-on-ejb/pom.xml b/examples/rest-on-ejb/pom.xml index 802d5fe..a508302 100644 --- a/examples/rest-on-ejb/pom.xml +++ b/examples/rest-on-ejb/pom.xml @@ -51,7 +51,7 @@ <artifactId>maven-surefire-plugin</artifactId> <version>2.18.1</version> <configuration> - <argLine>"-javaagent:${settings.localRepository}/org/apache/tomee/openejb-javaagent/7.1.1-SNAPSHOT/openejb-javaagent-7.1.1-SNAPSHOT.jar"</argLine> + <argLine>"-javaagent:${settings.localRepository}/org/apache/tomee/openejb-javaagent/${project.version}/openejb-javaagent-${project.version}.jar"</argLine> </configuration> </plugin> </plugins> diff --git a/examples/simple-cmp2/pom.xml b/examples/simple-cmp2/pom.xml index 492a891..3e6f8e5 100644 --- a/examples/simple-cmp2/pom.xml +++ b/examples/simple-cmp2/pom.xml @@ -51,7 +51,7 @@ <artifactId>maven-surefire-plugin</artifactId> <version>2.18.1</version> <configuration> - <argLine>-javaagent:${basedir}/target/openejb-javaagent-7.1.1-SNAPSHOT.jar</argLine> + <argLine>-javaagent:${basedir}/target/openejb-javaagent-${project.version}.jar</argLine> <workingDirectory>${basedir}/target</workingDirectory> </configuration> </plugin> diff --git a/examples/simple-ear/moviefun-functional-tests/src/test/java/org/superbiz/moviefun/DeployInWebAppsDirectoryTest.java b/examples/simple-ear/moviefun-functional-tests/src/test/java/org/superbiz/moviefun/DeployInWebAppsDirectoryTest.java index d50a7bd..3b84295 100644 --- a/examples/simple-ear/moviefun-functional-tests/src/test/java/org/superbiz/moviefun/DeployInWebAppsDirectoryTest.java +++ b/examples/simple-ear/moviefun-functional-tests/src/test/java/org/superbiz/moviefun/DeployInWebAppsDirectoryTest.java @@ -58,7 +58,7 @@ public class DeployInWebAppsDirectoryTest { final File webapps = new File(configuration.getDir(), "apache-tomee-" + configuration.getClassifier() + "-" + configuration.getVersion() + "/webapps"); webapps.mkdirs(); - final File enterpriseArchive = Maven.resolver().resolve("org.superbiz:moviefun-ear:ear:1.1.0-SNAPSHOT") + final File enterpriseArchive = Maven.resolver().resolve("org.superbiz:moviefun-ear:ear:7.1.1-SNAPSHOT") .withoutTransitivity().asSingleFile(); IO.copy(enterpriseArchive, new File(webapps, "moviefun-ear.ear")); diff --git a/examples/simple-ear/moviefun-functional-tests/src/test/java/org/superbiz/moviefun/MoviesArquillianHtmlUnitTest.java b/examples/simple-ear/moviefun-functional-tests/src/test/java/org/superbiz/moviefun/MoviesArquillianHtmlUnitTest.java index 5066f5d..6999bf2 100644 --- a/examples/simple-ear/moviefun-functional-tests/src/test/java/org/superbiz/moviefun/MoviesArquillianHtmlUnitTest.java +++ b/examples/simple-ear/moviefun-functional-tests/src/test/java/org/superbiz/moviefun/MoviesArquillianHtmlUnitTest.java @@ -37,7 +37,7 @@ public class MoviesArquillianHtmlUnitTest { @Deployment public static EnterpriseArchive createDeployment() { - final EnterpriseArchive enterpriseArchive = Maven.resolver().resolve("org.superbiz:moviefun-ear:ear:1.1.0-SNAPSHOT") + final EnterpriseArchive enterpriseArchive = Maven.resolver().resolve("org.superbiz:moviefun-ear:ear:7.1.1-SNAPSHOT") .withoutTransitivity().asSingle(EnterpriseArchive.class); System.out.println(enterpriseArchive.toString(true)); diff --git a/server/openejb-cxf-rs/src/test/java/org/apache/openejb/server/cxf/rs/johnzon/JsonbJaxrsProviderTest.java b/server/openejb-cxf-rs/src/test/java/org/apache/openejb/server/cxf/rs/johnzon/JsonbJaxrsProviderTest.java deleted file mode 100644 index 98b6b8e..0000000 --- a/server/openejb-cxf-rs/src/test/java/org/apache/openejb/server/cxf/rs/johnzon/JsonbJaxrsProviderTest.java +++ /dev/null @@ -1,127 +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.apache.openejb.server.cxf.rs.johnzon; - -import org.apache.johnzon.mapper.JohnzonIgnore; -import org.apache.johnzon.mapper.JohnzonProperty; -import org.apache.openejb.jee.EjbJar; -import org.apache.openejb.jee.SingletonBean; -import org.apache.openejb.junit.ApplicationComposer; -import org.apache.openejb.loader.IO; -import org.apache.openejb.testing.EnableServices; -import org.apache.openejb.testing.Module; -import org.apache.openejb.testing.RandomPort; -import org.junit.Test; -import org.junit.runner.RunWith; - -import javax.json.bind.annotation.JsonbProperty; -import javax.json.bind.annotation.JsonbTransient; -import javax.ws.rs.GET; -import javax.ws.rs.Path; -import javax.ws.rs.Produces; -import javax.ws.rs.core.MediaType; -import java.io.IOException; -import java.net.URL; - -import static org.junit.Assert.assertEquals; - -@EnableServices("jax-rs") -@RunWith(ApplicationComposer.class) -public class JsonbJaxrsProviderTest { - @RandomPort("http") - private URL base; - - @Module - public EjbJar beans() { - final EjbJar ejbJar = new EjbJar(); - ejbJar.addEnterpriseBean(new SingletonBean(Endpoint.class)); - return ejbJar; - } - - @Test - public void run() throws IOException { - assertEquals("{\"johnzon\":\"johnzon\",\"jsonb\":\"jsonb\",\"value\":\"value\"}", - IO.slurp(new URL(base.toExternalForm() + getClass().getSimpleName() + "/test"))); - } - - @Path("test") - public static class Endpoint { - @GET - @Produces(MediaType.APPLICATION_JSON) - public Model get() { - final Model model = new Model(); - model.setValue("value"); - model.setJohnzonIgnore("ignoreJohnzon"); - model.setJsonbIgnore("ignoreJsonb"); - model.setJohnzonProperty("johnzon"); - model.setJsonbProperty("jsonb"); - return model; - } - } - - public static class Model { - private String value; - @JohnzonIgnore - private String johnzonIgnore; - @JsonbTransient - private String jsonbIgnore; - @JohnzonProperty("johnzon") - private String johnzonProperty; - @JsonbProperty("jsonb") - private String jsonbProperty; - - public String getValue() { - return value; - } - - public void setValue(final String value) { - this.value = value; - } - - public String getJohnzonIgnore() { - return johnzonIgnore; - } - - public void setJohnzonIgnore(final String johnzonIgnore) { - this.johnzonIgnore = johnzonIgnore; - } - - public String getJsonbIgnore() { - return jsonbIgnore; - } - - public void setJsonbIgnore(final String jsonbIgnore) { - this.jsonbIgnore = jsonbIgnore; - } - - public String getJohnzonProperty() { - return johnzonProperty; - } - - public void setJohnzonProperty(final String johnzonProperty) { - this.johnzonProperty = johnzonProperty; - } - - public String getJsonbProperty() { - return jsonbProperty; - } - - public void setJsonbProperty(final String jsonbProperty) { - this.jsonbProperty = jsonbProperty; - } - } -} diff --git a/tomee/apache-tomee/src/test/java/org/apache/tomee/TomEECliIT.java b/tomee/apache-tomee/src/test/java/org/apache/tomee/TomEECliIT.java index bff58c4..ba95a74 100644 --- a/tomee/apache-tomee/src/test/java/org/apache/tomee/TomEECliIT.java +++ b/tomee/apache-tomee/src/test/java/org/apache/tomee/TomEECliIT.java @@ -26,6 +26,7 @@ import org.junit.Test; import java.io.File; import java.io.FileFilter; +import java.io.FilenameFilter; import java.io.IOException; import java.nio.file.Files; @@ -65,12 +66,34 @@ public class TomEECliIT { fail("Failed to find Tomcat directory required for this test - Ensure you have run at least the maven phase: mvn process-resources"); } + final File libDir = new File(tomee.getAbsolutePath() + File.separator + "lib"); + final String[] openejbCore = libDir.list(new FilenameFilter() { + @Override + public boolean accept(File dir, String name) { + return name.startsWith("openejb-core"); + } + }); + + final String[] commonsCli = libDir.list(new FilenameFilter() { + @Override + public boolean accept(File dir, String name) { + return name.startsWith("commons-cli"); + } + }); + + final String[] commonsLang = libDir.list(new FilenameFilter() { + @Override + public boolean accept(File dir, String name) { + return name.startsWith("commons-lang3"); + } + }); + final ProcessBuilder builder = new ProcessBuilder() - .command("java", "-cp", jar.getAbsolutePath() + File.pathSeparator + - tomee.getAbsolutePath() + File.separator + "lib" + File.separator + "openejb-core-8.0.0-SNAPSHOT.jar" + File.pathSeparator + - tomee.getAbsolutePath() + File.separator + "lib" + File.separator + "commons-cli-1.2.jar" + File.pathSeparator + - tomee.getAbsolutePath() + File.separator + "lib" + File.separator + "commons-lang3-3.8.1.jar", - "org.apache.openejb.cli.Bootstrap", "classloadertest"); + .command("java", "-cp", jar.getAbsolutePath() + File.pathSeparator + + tomee.getAbsolutePath() + File.separator + "lib" + File.separator + openejbCore[0] + File.pathSeparator + + tomee.getAbsolutePath() + File.separator + "lib" + File.separator + commonsCli[0] + File.pathSeparator + + tomee.getAbsolutePath() + File.separator + "lib" + File.separator + commonsLang[0], + "org.apache.openejb.cli.Bootstrap", "classloadertest"); final Process start = builder.start(); start.waitFor(); @@ -159,12 +182,34 @@ public class TomEECliIT { fail("Failed to find Tomcat directory required for this test - Ensure you have run at least the maven phase: mvn process-resources"); } + final File libDir = new File(tomee.getAbsolutePath() + File.separator + "lib"); + final String[] openejbCore = libDir.list(new FilenameFilter() { + @Override + public boolean accept(File dir, String name) { + return name.startsWith("openejb-core"); + } + }); + + final String[] commonsCli = libDir.list(new FilenameFilter() { + @Override + public boolean accept(File dir, String name) { + return name.startsWith("commons-cli"); + } + }); + + final String[] commonsLang = libDir.list(new FilenameFilter() { + @Override + public boolean accept(File dir, String name) { + return name.startsWith("commons-lang3"); + } + }); + final ProcessBuilder builder = new ProcessBuilder() .command("java", "-cp", jar.getAbsolutePath() + File.pathSeparator + jar2.getAbsolutePath() + File.pathSeparator + - tomee.getAbsolutePath() + File.separator + "lib" + File.separator + "openejb-core-8.0.0-SNAPSHOT.jar" + File.pathSeparator + - tomee.getAbsolutePath() + File.separator + "lib" + File.separator + "commons-cli-1.2.jar" + File.pathSeparator + - tomee.getAbsolutePath() + File.separator + "lib" + File.separator + "commons-lang3-3.8.1.jar", + tomee.getAbsolutePath() + File.separator + "lib" + File.separator + openejbCore[0] + File.pathSeparator + + tomee.getAbsolutePath() + File.separator + "lib" + File.separator + commonsCli[0] + File.pathSeparator + + tomee.getAbsolutePath() + File.separator + "lib" + File.separator + commonsLang[0], "org.apache.openejb.cli.Bootstrap", "classloadertest2"); final Process start = builder.start();