diff --git a/.travis-settings.xml b/.github/settings.xml similarity index 73% rename from .travis-settings.xml rename to .github/settings.xml index 43e247106..ab7ee0ea9 100644 --- a/.travis-settings.xml +++ b/.github/settings.xml @@ -7,6 +7,11 @@ ${env.SONATYPE_USERNAME} ${env.SONATYPE_PASSWORD} + + ossrh + ${env.SONATYPE_USERNAME} + ${env.SONATYPE_PASSWORD} + diff --git a/.github/workflows/maven-deploy.yml b/.github/workflows/maven-deploy.yml new file mode 100644 index 000000000..30dc0d18e --- /dev/null +++ b/.github/workflows/maven-deploy.yml @@ -0,0 +1,22 @@ +name: Deploy Snapshots + +on: + push: + branches: + - main + +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Set up JDK 8 + uses: actions/setup-java@v3 + with: + java-version: 8 + distribution: 'temurin' + cache: 'maven' + - run: ./mvnw --batch-mode -s .github/settings.xml -DperformRelease -DskipTests -Dgpg.skip=true deploy + env: + SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }} + SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml new file mode 100644 index 000000000..32a82356f --- /dev/null +++ b/.github/workflows/maven.yml @@ -0,0 +1,34 @@ +name: Java CI with Maven + +on: + - push + - pull_request + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Set up JDK 8 + uses: actions/setup-java@v3 + with: + java-version: 8 + distribution: 'temurin' + cache: 'maven' + - run: ./mvnw --batch-mode --update-snapshots install -DskipTests + + test: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + container: [ 'WILDFLY_MANAGED_8', 'GLASSFISH_MANAGED_4.0' ] + steps: + - uses: actions/checkout@v3 + - name: Set up JDK 8 + uses: actions/setup-java@v3 + with: + java-version: 8 + distribution: 'temurin' + cache: 'maven' + - run: ./mvnw --batch-mode --update-snapshots -P ${{ matrix.container }} install \ No newline at end of file diff --git a/.mvn/wrapper/maven-wrapper.jar b/.mvn/wrapper/maven-wrapper.jar new file mode 100644 index 000000000..c1dd12f17 Binary files /dev/null and b/.mvn/wrapper/maven-wrapper.jar differ diff --git a/.mvn/wrapper/maven-wrapper.properties b/.mvn/wrapper/maven-wrapper.properties new file mode 100644 index 000000000..157af2aba --- /dev/null +++ b/.mvn/wrapper/maven-wrapper.properties @@ -0,0 +1,18 @@ +# 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. +distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.5.0/apache-maven-3.5.0-bin.zip +wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar diff --git a/.travis-deploy.sh b/.travis-deploy.sh deleted file mode 100644 index 1e3902145..000000000 --- a/.travis-deploy.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/bash - -if [ "$TRAVIS_REPO_SLUG" == "ocpsoft/rewrite" ] && - [ "$TRAVIS_BRANCH" == "master" ] && - [ "$TRAVIS_PULL_REQUEST" == "false" ] && - [ "$TRAVIS_JDK_VERSION" == "openjdk7" ] && - [ "$CONTAINER" == "JBOSS_AS_MANAGED_7.X" ]; then - - echo "Starting snapshot deployment..." - mvn -s .travis-settings.xml -DperformRelease -DskipTests -Dgpg.skip=true deploy - echo "Snapshots deployed!" - -else - echo "Skipping snapshot deployment..." -fi diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 97f5b5752..000000000 --- a/.travis.yml +++ /dev/null @@ -1,29 +0,0 @@ -language: java -cache: - directories: - - '$HOME/.m2/repository' -script: - - mvn -P ${CONTAINER} install -after_success: - - "bash ./.travis-deploy.sh" -matrix: - include: - - env: CONTAINER=JBOSS_AS_MANAGED_7.X - jdk: openjdk7 - - env: CONTAINER=WILDFLY_MANAGED_8 - jdk: oraclejdk8 - - env: CONTAINER=GLASSFISH_MANAGED_3.1 - jdk: openjdk7 - - env: CONTAINER=GLASSFISH_MANAGED_4.0 - jdk: oraclejdk7 - - env: CONTAINER=TOMEE_MANAGED_1.5 - jdk: openjdk7 -notifications: - email: - - "ocpsoft-ci@googlegroups.com" - irc: - - "chat.freenode.net#ocpsoft" -env: - global: - - secure: "KtSGBCGZ0lhTFvDlD2hPS3G3PalOU+vPZSZ3cFiooCt5NNiPfu7wDlL4874QIlC3T85aBB1AoHBleQl/uDTrYx4pmAYba0hluHQcmfQpvoLXpe/vPpns3AEv5o3/AnPXX3gB8TMldIPcFnS/j5glB7Ur/OYKo10Ae2c2QAD4pR4=" - - secure: "NMIxl5oRmUBP0xxCBe3nEsR8SOckeFtG564Ruaos55FDW6/1OVJ5BjgAuaEFJB8jKv6hRaZYaLsR9axzMm4YPssmC5D9xVdROnS4AnHauTX0+lwENpO9mYnnex7Ol221AOImeYdJvU1SU3JpgTiti7HOIleCciTMdNs2GirBw7s=" diff --git a/CHANGELOG.md b/CHANGELOG.md deleted file mode 100644 index 335883995..000000000 --- a/CHANGELOG.md +++ /dev/null @@ -1,35 +0,0 @@ ------------------------------------- -VERSION 1.1.0 -============= - -Features & Enhancements: -======================== -* Enabled fluent chaining of additional Condition and Operation instances when adding single/custom rules by calling `ConfigurationBuilder.addRule(new CustomRule()).when(...).perform(...);` -* Added Response output buffering support. -* JAAS support with JAASRoles condition -* Content Delivery Network support with CDN rule -* Typesafe method invocation support -* Issue #30 - Tasks may now be performed in a SubFlow without affecting the Flow of the entire Rewrite event. -* Preview of Transformer APIs -* Preview of Annotation Configuration API - -Regression Impact: -================== -* Configuration strings are now literal. Regular expressions must be configured through a parameter such as: `.defineRule().when(Path.matches("/{*}").where("*").matches(".*"))` -* Join no longer matches Forwarded requests. -* EL API is now a separate module and the Java package name has changed to 'org.ocpsoft.rewrite.el' - -Bug Fixes: -========== -* Parameter binding now works on Join rules. -* Issue #67 - Keep order of fluent rules when building configuration. -* Fixed NumberFormatException on EncodeQuery operation when hashCode of checksum is modified -* Fixed ArrayIndexOutOfBounds exception for parsing query-strings with a separator but no content "?" -* Fixed showcase applications -* Issue #51 - Join no longer matches its own Forwarded requests. -* Fixed GWT integration issue where context path was not correctly transmitted when client application is hosted under the root URL "/" -* TypeBasedExpression no longer requires the expression to be surrounded by "#{...}" -* Fixed bug where container would swallow certain resource requests, resulting in false 404 errors -* Issue #32 - PhaseBinding defers validation and conversion until within the JSF lifecycle. -* Issue #33 - ClassVisitorImpl now supports adding rules to the ConfigurationBuilder if necessary -* Fixed some bugs with URLEncoding/URLDecoding diff --git a/README.md b/README.md index dfd37cc54..834e2845c 100644 --- a/README.md +++ b/README.md @@ -37,6 +37,13 @@ Get Started ${rewrite.version} + Version Reference Table: + ------------------------------------- + Jakarta EE 10 | Rewrite 10.x + Jakarta EE 9 | Rewrite 9.x + Jakarta EE 8 | Rewrite 8.x + Java EE <= 7 | Rewrite 3.x + 3. Add a configuration provider implementing the 'org.ocpsoft.rewrite.config.ConfigurationProvider' interface, or extending from the abstract HttpConfigurationProvider class for convenience: package com.example; @@ -55,7 +62,7 @@ Get Started public Configuration getConfiguration(final ServletContext context) { return ConfigurationBuilder.begin() - .defineRule() + .addRule() .when(Direction.isInbound().and(Path.matches("/some/page/{p}/"))) .perform(Forward.to("/new-page/{p}.html")); } @@ -79,6 +86,17 @@ Note that your annotated class won't be found, by default, if your Configuration 7. Run your application! +BUILDING +======== +``` +mvn package -PWILDFLY_MANAGED_8 +``` +(Or use any of the other profiles in pom.xml - Note, most seem to be failing right now due to stale maven packages. Pull requests fixing test proviles are appreciated!) + +RELEASING +======== +See https://github.com/ocpsoft/rewrite/wiki/Releasing#current-process + FEEDBACK ======== diff --git a/addressbuilder/pom.xml b/addressbuilder/pom.xml index 6246b71f6..db0065cda 100644 --- a/addressbuilder/pom.xml +++ b/addressbuilder/pom.xml @@ -4,7 +4,7 @@ org.ocpsoft.rewrite rewrite-parent - 3.4.2-SNAPSHOT + 3.5.3-SNAPSHOT ../ diff --git a/annotations-api/pom.xml b/annotations-api/pom.xml index 61706a0b4..3facab9c6 100644 --- a/annotations-api/pom.xml +++ b/annotations-api/pom.xml @@ -4,7 +4,7 @@ rewrite-parent org.ocpsoft.rewrite - 3.4.2-SNAPSHOT + 3.5.3-SNAPSHOT ../ diff --git a/annotations-impl/pom.xml b/annotations-impl/pom.xml index 359a6bb4f..f0a0e8907 100644 --- a/annotations-impl/pom.xml +++ b/annotations-impl/pom.xml @@ -4,7 +4,7 @@ rewrite-parent org.ocpsoft.rewrite - 3.4.2-SNAPSHOT + 3.5.3-SNAPSHOT ../ @@ -25,7 +25,7 @@ org.jboss.spec.javax.servlet - jboss-servlet-api_2.5_spec + jboss-servlet-api_${servlet.spec}_spec provided diff --git a/annotations-impl/src/main/java/org/ocpsoft/rewrite/annotation/config/AnnotationConfigProvider.java b/annotations-impl/src/main/java/org/ocpsoft/rewrite/annotation/config/AnnotationConfigProvider.java index b4f3e7341..247ffbce6 100644 --- a/annotations-impl/src/main/java/org/ocpsoft/rewrite/annotation/config/AnnotationConfigProvider.java +++ b/annotations-impl/src/main/java/org/ocpsoft/rewrite/annotation/config/AnnotationConfigProvider.java @@ -40,6 +40,7 @@ public class AnnotationConfigProvider extends HttpConfigurationProvider { private final Logger log = Logger.getLogger(AnnotationConfigProvider.class); + public static final String CONFIG_SCAN_CLASSES_DIR = "org.ocpsoft.rewrite.annotation.SCAN_CLASSES_DIRECTORY"; public static final String CONFIG_SCAN_LIB_DIR = "org.ocpsoft.rewrite.annotation.SCAN_LIB_DIRECTORY"; public static final String CONFIG_BASE_PACKAGES = "org.ocpsoft.rewrite.annotation.BASE_PACKAGES"; @@ -61,10 +62,18 @@ public Configuration getConfiguration(ServletContext servletContext) // retrieve the optional package filter configuration parameter String packageFilters = servletContext.getInitParameter(CONFIG_BASE_PACKAGES); + // does the user not want to scan the WEB-INF/classes directory + boolean scanClassesDir = true; + String classesConfig = servletContext.getInitParameter(CONFIG_SCAN_CLASSES_DIR); + if ((classesConfig != null) && classesConfig.trim().equalsIgnoreCase("false")) + { + scanClassesDir = false; + } + // does the user want to scan the WEB-INF/lib directory boolean scanLibDir = false; - String jarConfig = servletContext.getInitParameter(CONFIG_SCAN_LIB_DIR); - if ((jarConfig != null) && jarConfig.trim().equalsIgnoreCase("true")) + String libConfig = servletContext.getInitParameter(CONFIG_SCAN_LIB_DIR); + if ((libConfig != null) && libConfig.trim().equalsIgnoreCase("true")) { scanLibDir = true; } @@ -121,7 +130,10 @@ public Configuration getConfiguration(ServletContext servletContext) // TODO this should be pulled out into a utility allowing it to run in Java SE // compile a list of class finders to run List classFinders = new ArrayList(); - classFinders.add(new WebClassesFinder(servletContext, classloader, packageFilter, byteCodeFilter)); + if (scanClassesDir) + { + classFinders.add(new WebClassesFinder(servletContext, classloader, packageFilter, byteCodeFilter)); + } if (scanLibDir) { classFinders.add(new WebLibFinder(servletContext, classloader, packageFilter, byteCodeFilter)); diff --git a/annotations-impl/src/main/java/org/ocpsoft/rewrite/annotation/scan/AbstractClassFinder.java b/annotations-impl/src/main/java/org/ocpsoft/rewrite/annotation/scan/AbstractClassFinder.java index 9bc6e8913..0a70cc716 100644 --- a/annotations-impl/src/main/java/org/ocpsoft/rewrite/annotation/scan/AbstractClassFinder.java +++ b/annotations-impl/src/main/java/org/ocpsoft/rewrite/annotation/scan/AbstractClassFinder.java @@ -1,12 +1,12 @@ /* * Copyright 2010 Lincoln Baxter, III - * + * * 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. @@ -18,16 +18,14 @@ import java.io.IOException; import java.io.InputStream; import java.net.URL; - import javax.servlet.ServletContext; - import org.ocpsoft.logging.Logger; import org.ocpsoft.rewrite.annotation.api.ClassVisitor; import org.ocpsoft.rewrite.annotation.spi.ClassFinder; /** * Base class for implementations of the {@link ClassFinder} interface. - * + * * @see ClassFinder * @author Christian Kaltepoth */ @@ -60,7 +58,7 @@ public abstract class AbstractClassFinder implements ClassFinder /** * Initialization procedure - * + * * @param servletContext The {@link ServletContext} of the web application. * @param classLoader The {@link ClassLoader} to use for loading classes * @param packageFilter The {@link PackageFilter} used to check if a package has to be scanned. @@ -76,7 +74,7 @@ public AbstractClassFinder(ServletContext servletContext, ClassLoader classLoade /** * Strip everything up to and including a given prefix from a string. - * + * * @param str The string to process * @param prefix The prefix * @return the stripped string or null if the prefix has not been found @@ -97,7 +95,7 @@ protected String stripKnownPrefix(String str, String prefix) *

* Creates a FQCN from an {@link URL} representing a .class file. *

- * + * * @param url The path of the class file * @return the FQCN of the class */ @@ -116,13 +114,18 @@ protected static String getClassName(String filename) /** * Checks if a supplied class has to be processed by checking the package name against the {@link PackageFilter}. - * + * * @param className FQCN of the class * @return true for classes to process, false for classes to ignore */ protected boolean mustProcessClass(String className) { + // skip versioned classes in Java 9 Multi-release JAR files + if (className.startsWith("META-INF.versions")) { + return false; + } + // the default package String packageName = ""; @@ -152,7 +155,7 @@ protected boolean mustProcessClass(String className) *

* Please not the the called of this method is responsible to close the supplied {@link InputStream}! *

- * + * * @param className The FQCN of the class * @param classFileStream The Java class file of the class (may be null) * @param visitor the visitor @@ -160,6 +163,9 @@ protected boolean mustProcessClass(String className) protected void processClass(String className, InputStream classFileStream, ClassVisitor visitor) { + // skip Java 9 module metadata class files + if (className.equals("module-info")) return ; + // bytecode check is only performed if the InputStream is available if (classFileStream != null) { diff --git a/api-el/pom.xml b/api-el/pom.xml index 8d0fca03b..a759a1ffc 100644 --- a/api-el/pom.xml +++ b/api-el/pom.xml @@ -13,7 +13,7 @@ org.ocpsoft.rewrite rewrite-parent - 3.4.2-SNAPSHOT + 3.5.3-SNAPSHOT ../ diff --git a/api-servlet/pom.xml b/api-servlet/pom.xml index 6dbde36d9..d981c2061 100644 --- a/api-servlet/pom.xml +++ b/api-servlet/pom.xml @@ -4,7 +4,7 @@ org.ocpsoft.rewrite rewrite-parent - 3.4.2-SNAPSHOT + 3.5.3-SNAPSHOT ../ @@ -21,7 +21,7 @@ org.jboss.spec.javax.servlet - jboss-servlet-api_2.5_spec + jboss-servlet-api_${servlet.spec}_spec provided diff --git a/api-servlet/src/test/java/org/ocpsoft/rewrite/servlet/util/QueryStringBuilderTest.java b/api-servlet/src/test/java/org/ocpsoft/rewrite/servlet/util/QueryStringBuilderTest.java index a7932e2b0..b598fa600 100644 --- a/api-servlet/src/test/java/org/ocpsoft/rewrite/servlet/util/QueryStringBuilderTest.java +++ b/api-servlet/src/test/java/org/ocpsoft/rewrite/servlet/util/QueryStringBuilderTest.java @@ -28,6 +28,12 @@ import org.junit.Test; +/* + * FIXME: Remove references to deprecated code. + * Leaving test class while the code is still usable. + * Adding task as a better method of tracking. + */ +@Deprecated public class QueryStringBuilderTest { @Test diff --git a/api-servlet/src/test/java/org/ocpsoft/rewrite/servlet/util/URLBuilderTest.java b/api-servlet/src/test/java/org/ocpsoft/rewrite/servlet/util/URLBuilderTest.java index 4cf5592c0..bbc16ee29 100644 --- a/api-servlet/src/test/java/org/ocpsoft/rewrite/servlet/util/URLBuilderTest.java +++ b/api-servlet/src/test/java/org/ocpsoft/rewrite/servlet/util/URLBuilderTest.java @@ -22,6 +22,12 @@ import org.junit.Test; +/* + * FIXME: Remove references to deprecated code. + * Leaving test class while the code is still usable. + * Adding task as a better method of tracking. + */ +@Deprecated public class URLBuilderTest { @Test(expected = IllegalArgumentException.class) diff --git a/api-tests/pom.xml b/api-tests/pom.xml index 059b38bf3..9a8dbc12a 100644 --- a/api-tests/pom.xml +++ b/api-tests/pom.xml @@ -4,7 +4,7 @@ org.ocpsoft.rewrite rewrite-parent - 3.4.2-SNAPSHOT + 3.5.3-SNAPSHOT ../ @@ -17,7 +17,7 @@ org.jboss.spec.javax.servlet - jboss-servlet-api_2.5_spec + jboss-servlet-api_${servlet.spec}_spec provided diff --git a/api-tests/src/test/java/org/ocpsoft/rewrite/test/MockServletRewrite.java b/api-tests/src/test/java/org/ocpsoft/rewrite/test/MockServletRewrite.java index 550d30bfe..60caee623 100644 --- a/api-tests/src/test/java/org/ocpsoft/rewrite/test/MockServletRewrite.java +++ b/api-tests/src/test/java/org/ocpsoft/rewrite/test/MockServletRewrite.java @@ -20,9 +20,7 @@ import javax.servlet.ServletResponse; import org.ocpsoft.rewrite.AbstractRewrite; -import org.ocpsoft.rewrite.context.Context; import org.ocpsoft.rewrite.event.Flow; -import org.ocpsoft.rewrite.mock.MockRewriteContext; import org.ocpsoft.rewrite.servlet.event.BaseRewrite.ServletRewriteFlow; import org.ocpsoft.rewrite.servlet.event.ServletRewrite; diff --git a/api-tests/src/test/java/org/ocpsoft/rewrite/transposition/LocaleTranspositionTest.java b/api-tests/src/test/java/org/ocpsoft/rewrite/transposition/LocaleTranspositionTest.java index 15fed9a85..ee33bf2d7 100644 --- a/api-tests/src/test/java/org/ocpsoft/rewrite/transposition/LocaleTranspositionTest.java +++ b/api-tests/src/test/java/org/ocpsoft/rewrite/transposition/LocaleTranspositionTest.java @@ -86,7 +86,7 @@ public void testI18nSupportOutbound() throws Exception { HttpAction action = get("/en/search.xhtml"); Assert.assertEquals(200, action.getResponse().getStatusLine().getStatusCode()); - Assert.assertThat(action.getResponseContent(), org.junit.matchers.JUnitMatchers.containsString("/en/search")); + Assert.assertThat(action.getResponseContent(), org.hamcrest.CoreMatchers.containsString("/en/search")); } /** diff --git a/api/pom.xml b/api/pom.xml index d70bfecaf..014e37c10 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -14,7 +14,7 @@ org.ocpsoft.rewrite rewrite-parent - 3.4.2-SNAPSHOT + 3.5.3-SNAPSHOT ../ diff --git a/api/src/main/java/org/ocpsoft/rewrite/param/ParameterBuilder.java b/api/src/main/java/org/ocpsoft/rewrite/param/ParameterBuilder.java index 2fa062cf1..8b4184639 100644 --- a/api/src/main/java/org/ocpsoft/rewrite/param/ParameterBuilder.java +++ b/api/src/main/java/org/ocpsoft/rewrite/param/ParameterBuilder.java @@ -17,6 +17,7 @@ import java.util.ArrayList; import java.util.List; +import java.util.ListIterator; import org.ocpsoft.rewrite.bind.Binding; @@ -65,13 +66,30 @@ public IMPLTYPE configuredBy(ParameterConfigurator configurator) @SuppressWarnings("unchecked") public IMPLTYPE bindsTo(final Binding binding) { - /* - * Bindings must be added to the front of the list, since we want the - * ability to override the default binding if necessary. - */ - this.bindings.add(0, binding); + addOrReplaceBinding(binding); return (IMPLTYPE) this; } + + /* + * Bindings must be added to the front of the list, since we want the + * ability to override the default binding if necessary. + */ + private void addOrReplaceBinding(final Binding binding) + { + ListIterator iterator = this.bindings.listIterator(); + while(iterator.hasNext()) + { + Binding current = iterator.next(); + if(current.toString().equals(binding.toString())) // binding does not implements equals/hashCode + { + iterator.remove(); + iterator.add(binding); + return; + } + } + + this.bindings.add(0, binding); + } @Override public List getBindings() diff --git a/config-annotations/pom.xml b/config-annotations/pom.xml index c0a78f781..8083e3634 100644 --- a/config-annotations/pom.xml +++ b/config-annotations/pom.xml @@ -4,7 +4,7 @@ rewrite-parent org.ocpsoft.rewrite - 3.4.2-SNAPSHOT + 3.5.3-SNAPSHOT ../ @@ -38,7 +38,7 @@ org.jboss.spec.javax.servlet - jboss-servlet-api_2.5_spec + jboss-servlet-api_${servlet.spec}_spec test diff --git a/config-annotations/src/main/java/org/ocpsoft/rewrite/annotation/handler/ParameterHandler.java b/config-annotations/src/main/java/org/ocpsoft/rewrite/annotation/handler/ParameterHandler.java index 0da13ddc6..091ccdac0 100644 --- a/config-annotations/src/main/java/org/ocpsoft/rewrite/annotation/handler/ParameterHandler.java +++ b/config-annotations/src/main/java/org/ocpsoft/rewrite/annotation/handler/ParameterHandler.java @@ -23,10 +23,6 @@ import org.ocpsoft.rewrite.annotation.api.HandlerChain; import org.ocpsoft.rewrite.annotation.spi.FieldAnnotationHandler; import org.ocpsoft.rewrite.bind.Binding; -import org.ocpsoft.rewrite.config.Condition; -import org.ocpsoft.rewrite.config.ConditionBuilder; -import org.ocpsoft.rewrite.config.Or; -import org.ocpsoft.rewrite.config.True; import org.ocpsoft.rewrite.el.El; import org.ocpsoft.rewrite.param.ConfigurableParameter; import org.ocpsoft.rewrite.param.Parameter; diff --git a/config-jodatime/pom.xml b/config-jodatime/pom.xml index f79ab2d61..c8da70e95 100644 --- a/config-jodatime/pom.xml +++ b/config-jodatime/pom.xml @@ -4,7 +4,7 @@ rewrite-parent org.ocpsoft.rewrite - 3.4.2-SNAPSHOT + 3.5.3-SNAPSHOT ../ diff --git a/config-prettyfaces-tests/pom.xml b/config-prettyfaces-tests/pom.xml index 2a8ac35dc..7e58b4ada 100644 --- a/config-prettyfaces-tests/pom.xml +++ b/config-prettyfaces-tests/pom.xml @@ -4,7 +4,7 @@ org.ocpsoft.rewrite rewrite-parent - 3.4.2-SNAPSHOT + 3.5.3-SNAPSHOT ../ @@ -33,12 +33,12 @@ org.jboss.spec.javax.servlet - jboss-servlet-api_2.5_spec + jboss-servlet-api_${servlet.spec}_spec provided org.jboss.spec.javax.faces - jboss-jsf-api_2.1_spec + jboss-jsf-api_${jsf.spec}_spec provided diff --git a/config-prettyfaces-tests/src/test/resources/context/pretty-config.xml b/config-prettyfaces-tests/src/test/resources/context/pretty-config.xml index 73a3f01e2..169c5fac2 100644 --- a/config-prettyfaces-tests/src/test/resources/context/pretty-config.xml +++ b/config-prettyfaces-tests/src/test/resources/context/pretty-config.xml @@ -1,11 +1,11 @@ - + xsi:schemaLocation="http://ocpsoft.org/schema/rewrite-config-prettyfaces + https://www.ocpsoft.org/xml/ns/prettyfaces/rewrite-config-prettyfaces.xsd"> - /index.jsf + \ No newline at end of file diff --git a/config-prettyfaces-tests/src/test/resources/dynaview/ambiguous-pretty-config.xml b/config-prettyfaces-tests/src/test/resources/dynaview/ambiguous-pretty-config.xml index 2072c6e04..35afe7323 100644 --- a/config-prettyfaces-tests/src/test/resources/dynaview/ambiguous-pretty-config.xml +++ b/config-prettyfaces-tests/src/test/resources/dynaview/ambiguous-pretty-config.xml @@ -1,6 +1,6 @@ + https://www.ocpsoft.org/xml/ns/prettyfaces/rewrite-config-prettyfaces.xsd"> diff --git a/config-prettyfaces-tests/src/test/resources/encoding/encoding-pretty-config.xml b/config-prettyfaces-tests/src/test/resources/encoding/encoding-pretty-config.xml index f1c303b3b..5378dc71b 100644 --- a/config-prettyfaces-tests/src/test/resources/encoding/encoding-pretty-config.xml +++ b/config-prettyfaces-tests/src/test/resources/encoding/encoding-pretty-config.xml @@ -1,6 +1,6 @@ + https://www.ocpsoft.org/xml/ns/prettyfaces/ocpsoft-pretty-faces-3.1.1.xsd"> diff --git a/config-prettyfaces-tests/src/test/resources/errorpage/errorpage-pretty-config.xml b/config-prettyfaces-tests/src/test/resources/errorpage/errorpage-pretty-config.xml index 5a6c07b20..008ea235f 100644 --- a/config-prettyfaces-tests/src/test/resources/errorpage/errorpage-pretty-config.xml +++ b/config-prettyfaces-tests/src/test/resources/errorpage/errorpage-pretty-config.xml @@ -1,6 +1,6 @@ + https://www.ocpsoft.org/xml/ns/prettyfaces/rewrite-config-prettyfaces.xsd"> diff --git a/config-prettyfaces-tests/src/test/resources/interaction/faces-navigate-pretty-config.xml b/config-prettyfaces-tests/src/test/resources/interaction/faces-navigate-pretty-config.xml index 09c1e77d9..e85050ada 100644 --- a/config-prettyfaces-tests/src/test/resources/interaction/faces-navigate-pretty-config.xml +++ b/config-prettyfaces-tests/src/test/resources/interaction/faces-navigate-pretty-config.xml @@ -1,5 +1,5 @@ + xsi:schemaLocation="http://ocpsoft.com/prettyfaces/3.3.2 https://www.ocpsoft.org/xml/ns/prettyfaces/ocpsoft-pretty-faces-3.3.2.xsd"> diff --git a/config-prettyfaces-tests/src/test/resources/interaction/interaction-pretty-config.xml b/config-prettyfaces-tests/src/test/resources/interaction/interaction-pretty-config.xml index f44747d89..958b7e236 100644 --- a/config-prettyfaces-tests/src/test/resources/interaction/interaction-pretty-config.xml +++ b/config-prettyfaces-tests/src/test/resources/interaction/interaction-pretty-config.xml @@ -1,5 +1,5 @@ + xsi:schemaLocation="http://ocpsoft.com/prettyfaces/3.3.2 https://www.ocpsoft.org/xml/ns/prettyfaces/ocpsoft-pretty-faces-3.3.2.xsd"> diff --git a/config-prettyfaces-tests/src/test/resources/loop/loop-pretty-config.xml b/config-prettyfaces-tests/src/test/resources/loop/loop-pretty-config.xml index 29044ed1a..2e46c0b8a 100644 --- a/config-prettyfaces-tests/src/test/resources/loop/loop-pretty-config.xml +++ b/config-prettyfaces-tests/src/test/resources/loop/loop-pretty-config.xml @@ -1,6 +1,6 @@ + https://www.ocpsoft.org/xml/ns/prettyfaces/ocpsoft-pretty-faces-3.1.1.xsd"> diff --git a/config-prettyfaces-tests/src/test/resources/outbound/outbound-pretty-config.xml b/config-prettyfaces-tests/src/test/resources/outbound/outbound-pretty-config.xml index c2b30899d..80eaafd91 100644 --- a/config-prettyfaces-tests/src/test/resources/outbound/outbound-pretty-config.xml +++ b/config-prettyfaces-tests/src/test/resources/outbound/outbound-pretty-config.xml @@ -1,5 +1,5 @@ + xsi:schemaLocation="http://ocpsoft.com/prettyfaces/3.3.3 https://www.ocpsoft.org/xml/ns/prettyfaces/ocpsoft-pretty-faces-3.3.3.xsd"> diff --git a/config-prettyfaces-tests/src/test/resources/pathparams/pretty-config.xml b/config-prettyfaces-tests/src/test/resources/pathparams/pretty-config.xml index 9335933fa..eb5ec06b1 100644 --- a/config-prettyfaces-tests/src/test/resources/pathparams/pretty-config.xml +++ b/config-prettyfaces-tests/src/test/resources/pathparams/pretty-config.xml @@ -1,17 +1,17 @@ - + xsi:schemaLocation="http://ocpsoft.org/schema/rewrite-config-prettyfaces + https://www.ocpsoft.org/xml/ns/prettyfaces/rewrite-config-prettyfaces.xsd"> - /index.jsf + - /index.jsf + \ No newline at end of file diff --git a/config-prettyfaces-tests/src/test/resources/redirect/redirect-pretty-config.xml b/config-prettyfaces-tests/src/test/resources/redirect/redirect-pretty-config.xml index 7bb99d2ac..45fb11494 100644 --- a/config-prettyfaces-tests/src/test/resources/redirect/redirect-pretty-config.xml +++ b/config-prettyfaces-tests/src/test/resources/redirect/redirect-pretty-config.xml @@ -1,6 +1,6 @@ + https://www.ocpsoft.org/xml/ns/prettyfaces/ocpsoft-pretty-faces-3.1.1.xsd"> diff --git a/config-prettyfaces-tests/src/test/resources/rule_naming/pretty-config.xml b/config-prettyfaces-tests/src/test/resources/rule_naming/pretty-config.xml index 5bbc607e7..64149ff3a 100644 --- a/config-prettyfaces-tests/src/test/resources/rule_naming/pretty-config.xml +++ b/config-prettyfaces-tests/src/test/resources/rule_naming/pretty-config.xml @@ -1,16 +1,16 @@ - + xsi:schemaLocation="http://ocpsoft.org/schema/rewrite-config-prettyfaces + https://www.ocpsoft.org/xml/ns/prettyfaces/rewrite-config-prettyfaces.xsd"> - /index.jsf + - /test.jsf + \ No newline at end of file diff --git a/config-prettyfaces-tests/src/test/resources/trailingslash/trailingslash-pretty-config.xml b/config-prettyfaces-tests/src/test/resources/trailingslash/trailingslash-pretty-config.xml index ed9ad2566..7d875fe52 100644 --- a/config-prettyfaces-tests/src/test/resources/trailingslash/trailingslash-pretty-config.xml +++ b/config-prettyfaces-tests/src/test/resources/trailingslash/trailingslash-pretty-config.xml @@ -1,6 +1,6 @@ + https://www.ocpsoft.org/xml/ns/prettyfaces/ocpsoft-pretty-faces-3.1.1.xsd"> diff --git a/config-prettyfaces/pom.xml b/config-prettyfaces/pom.xml index b9c38077e..bf09b7e0b 100644 --- a/config-prettyfaces/pom.xml +++ b/config-prettyfaces/pom.xml @@ -4,7 +4,7 @@ rewrite-parent org.ocpsoft.rewrite - 3.4.2-SNAPSHOT + 3.5.3-SNAPSHOT ../ @@ -12,6 +12,7 @@ 2.0 + 1.9.4 @@ -44,19 +45,25 @@ commons-digester ${version.digester} + + commons-beanutils + commons-beanutils + ${version.beanutils} + org.jboss.spec.javax.servlet - jboss-servlet-api_2.5_spec + jboss-servlet-api_${servlet.spec}_spec provided - org.jboss.spec.javax.faces - jboss-jsf-api_2.1_spec + org.glassfish + javax.faces + 2.3.9 provided org.jboss.spec.javax.el - jboss-el-api_2.2_spec + jboss-el-api_${el.spec}_spec provided @@ -98,7 +105,7 @@ org.springframework spring-web - 3.0.2.RELEASE + 3.2.5.RELEASE test diff --git a/config-prettyfaces/src/main/java/com/ocpsoft/pretty/faces/config/PrettyConfigurator.java b/config-prettyfaces/src/main/java/com/ocpsoft/pretty/faces/config/PrettyConfigurator.java index bfce7b179..a2cb563e6 100644 --- a/config-prettyfaces/src/main/java/com/ocpsoft/pretty/faces/config/PrettyConfigurator.java +++ b/config-prettyfaces/src/main/java/com/ocpsoft/pretty/faces/config/PrettyConfigurator.java @@ -57,7 +57,7 @@ public void configure() { final PrettyConfigBuilder builder = new PrettyConfigBuilder(); - ServiceLoader configLoader = ServiceLoader.load(ConfigurationProvider.class); + ServiceLoader configLoader = ServiceLoader.loadTypesafe(ConfigurationProvider.class); for (ConfigurationProvider p : configLoader) { builder.addFromConfig(p.loadConfiguration(servletContext)); @@ -73,7 +73,7 @@ public void configure() config = parenting.processConfiguration(servletContext, config); - ServiceLoader postProcessors = ServiceLoader.load(ConfigurationPostProcessor.class); + ServiceLoader postProcessors = ServiceLoader.loadTypesafe(ConfigurationPostProcessor.class); for (ConfigurationPostProcessor p : postProcessors) { config = p.processConfiguration(servletContext, config); diff --git a/config-prettyfaces/src/main/java/com/ocpsoft/pretty/faces/config/reload/PrettyConfigReloader.java b/config-prettyfaces/src/main/java/com/ocpsoft/pretty/faces/config/reload/PrettyConfigReloader.java index c4a2e9de6..e58e9cc15 100644 --- a/config-prettyfaces/src/main/java/com/ocpsoft/pretty/faces/config/reload/PrettyConfigReloader.java +++ b/config-prettyfaces/src/main/java/com/ocpsoft/pretty/faces/config/reload/PrettyConfigReloader.java @@ -107,7 +107,7 @@ private boolean isDevelopmentModeActive(ServletContext servletContext) { // create the ServiceLoader for the SPI - ServiceLoader serviceLoader = ServiceLoader.load(DevelopmentModeDetector.class); + ServiceLoader serviceLoader = ServiceLoader.loadTypesafe(DevelopmentModeDetector.class); // we need a list to be able to sort it List detectors = new ArrayList(); diff --git a/config-prettyfaces/src/main/java/com/ocpsoft/pretty/faces/servlet/PrettyFacesWrappedRequest.java b/config-prettyfaces/src/main/java/com/ocpsoft/pretty/faces/servlet/PrettyFacesWrappedRequest.java index 70cacea9e..ffc89fc33 100644 --- a/config-prettyfaces/src/main/java/com/ocpsoft/pretty/faces/servlet/PrettyFacesWrappedRequest.java +++ b/config-prettyfaces/src/main/java/com/ocpsoft/pretty/faces/servlet/PrettyFacesWrappedRequest.java @@ -57,10 +57,11 @@ public String getParameter(final String name) return null; } + @SuppressWarnings("unchecked") @Override public Map getParameterMap() { - Map allParameters = new TreeMap(); + Map allParameters = new TreeMap<>(); allParameters.putAll(super.getParameterMap()); allParameters.putAll(modifiableParameters); return Collections.unmodifiableMap(allParameters); diff --git a/config-prettyfaces/src/main/java/com/ocpsoft/pretty/faces/servlet/PrettyFacesWrappedResponse.java b/config-prettyfaces/src/main/java/com/ocpsoft/pretty/faces/servlet/PrettyFacesWrappedResponse.java index 24822a962..2e9045fbf 100644 --- a/config-prettyfaces/src/main/java/com/ocpsoft/pretty/faces/servlet/PrettyFacesWrappedResponse.java +++ b/config-prettyfaces/src/main/java/com/ocpsoft/pretty/faces/servlet/PrettyFacesWrappedResponse.java @@ -63,11 +63,14 @@ public PrettyFacesWrappedResponse(final String contextPath, final HttpServletReq this.prettyConfig = config; } + // they changed the API to use URL instead of Url + // someday they will remove it and this can be removed + // in the meantime, mark as deprecated so people don't use it + @Deprecated @Override - @SuppressWarnings("deprecation") public String encodeRedirectUrl(final String url) { - return super.encodeRedirectUrl(url); + return super.encodeRedirectURL(url); } @Override @@ -76,11 +79,14 @@ public String encodeRedirectURL(final String url) return super.encodeRedirectURL(url); } + // they changed the API to use URL instead of Url + // someday they will remove it and this can be removed + // in the meantime, mark as deprecated so people don't use it + @Deprecated @Override - @SuppressWarnings("deprecation") public String encodeUrl(final String url) { - return super.encodeUrl(url); + return super.encodeURL(url); } @Override diff --git a/config-prettyfaces/src/main/java/com/ocpsoft/pretty/faces/util/StringUtils.java b/config-prettyfaces/src/main/java/com/ocpsoft/pretty/faces/util/StringUtils.java index 436430ab3..73ebcccc1 100644 --- a/config-prettyfaces/src/main/java/com/ocpsoft/pretty/faces/util/StringUtils.java +++ b/config-prettyfaces/src/main/java/com/ocpsoft/pretty/faces/util/StringUtils.java @@ -78,4 +78,19 @@ public static int countSlashes(final String s) return result; } + public static String removePathPrefix(String prefix, String url) + { + // if the remaining path does not start with a / + // then don't remove the context path + // this handles context paths like / or /context/ that remove too much + // or URLs like /contextPathPlus that don't actually match /contextPath + // this also addresses https://github.com/ocpsoft/rewrite/issues/180 + if (url.charAt(prefix.length()) == '/' && url.startsWith(prefix)) + { + url = url.substring(prefix.length()); + } + + return url; + } + } diff --git a/config-prettyfaces/src/main/resources/META-INF/rewrite-config-prettyfaces.xsd b/config-prettyfaces/src/main/resources/META-INF/rewrite-config-prettyfaces.xsd index a1387e61d..a3131c6c8 100644 --- a/config-prettyfaces/src/main/resources/META-INF/rewrite-config-prettyfaces.xsd +++ b/config-prettyfaces/src/main/resources/META-INF/rewrite-config-prettyfaces.xsd @@ -1,4 +1,4 @@ - + - 1.7 - 1.7 + ${maven.compiler.target} + ${maven.compiler.source} + + + 8.0 + 2.5 + 2.3 + 3.0 - 3.0.2.Final - 4.11 + 1.0.4.Final + 4.13.1 + 1.0.1.Final + 1.0.1.Final + 1.0.2.Final + 1.0-SP4 1.0.5.Final 1.0.5.Final 1.1.1.Final 1.1.1.Final 1.0.0.CR4 + 1.1.0.Final 7.1.1.Final 8.2.0.Final + 8.5.34 3.1.2.2 4.0 ${java.io.tmpdir}/rewrite-arquillian-containers @@ -96,12 +108,10 @@ org.apache.maven.plugins maven-shade-plugin - 2.4.2 org.apache.maven.plugins maven-release-plugin - 2.5.3 true true @@ -118,7 +128,7 @@ org.apache.maven.plugins maven-surefire-plugin - 2.16 + 2.22.0 -Xms256m -Xmx512m -XX:MaxPermSize=512m @@ -126,12 +136,12 @@ org.apache.maven.plugins maven-javadoc-plugin - 2.9 + 3.01 false - http://docs.oracle.com/javase/7/docs/api/ - http://docs.oracle.com/javaee/6/api/ + http://docs.oracle.com/javase/8/docs/api/ + http://docs.oracle.com/javaee/7/api/ -Xdoclint:none @@ -362,7 +372,7 @@ org.jboss.spec - jboss-javaee-6.0 + jboss-javaee-${javaee.spec} ${version.jboss.spec} pom import @@ -373,16 +383,41 @@ xalan xalan - 2.7.1 + 2.7.3 + + + org.apache.taglibs + taglibs-standard-spec + 1.2.5 + + + org.apache.taglibs + taglibs-standard-impl + 1.2.5 org.jboss.spec.javax.servlet jboss-servlet-api_2.5_spec - 1.0.1.Final + ${version.servlet.2.5} provided + + org.jboss.spec.javax.servlet + jboss-servlet-api_3.0_spec + ${version.servlet.3.0} + provided + + + + org.jboss.spec.javax.servlet + jboss-servlet-api_3.1_spec + ${version.servlet.3.1} + provided + + + junit junit @@ -390,13 +425,19 @@ test + + javax.inject + javax.inject + 1 + + - + org.jboss.shrinkwrap.resolver shrinkwrap-resolver-bom - 2.0.0 + 3.1.3 pom import @@ -491,8 +532,8 @@ org.jboss.spec - jboss-javaee-web-6.0 - 3.0.1.Final + jboss-javaee-web-${javaee.spec} + ${version.jboss.spec} pom test @@ -523,8 +564,8 @@ org.jboss.spec - jboss-javaee-web-6.0 - 3.0.1.Final + jboss-javaee-web-${javaee.spec} + ${version.jboss.spec} pom test @@ -590,7 +631,7 @@ org.jboss.spec - jboss-javaee-6.0 + jboss-javaee-${javaee.spec} ${version.jboss.spec} pom provided @@ -625,7 +666,7 @@ org.jboss.spec - jboss-javaee-6.0 + jboss-javaee-${javaee.spec} ${version.jboss.spec} pom provided @@ -686,7 +727,7 @@ org.jboss.spec - jboss-javaee-6.0 + jboss-javaee-${javaee.spec} ${version.jboss.spec} pom provided @@ -721,7 +762,7 @@ org.jboss.spec - jboss-javaee-6.0 + jboss-javaee-${javaee.spec} ${version.jboss.spec} pom provided @@ -730,18 +771,18 @@ - TOMEE_MANAGED_1.5 + TOMEE_MANAGED_8 - org.apache.openejb + org.apache.tomee tomee-embedded - 1.5.2 + 8.0.7 test - org.apache.openejb + org.apache.tomee arquillian-tomee-remote - 1.5.2 + 8.0.7 test @@ -768,6 +809,12 @@ wildfly-arquillian-container-remote ${version.wildfly} test + + + sun.jdk + jconsole + + diff --git a/rewrite-servlet/pom.xml b/rewrite-servlet/pom.xml index f88619cc5..34fb7bbc0 100644 --- a/rewrite-servlet/pom.xml +++ b/rewrite-servlet/pom.xml @@ -4,7 +4,7 @@ rewrite-parent org.ocpsoft.rewrite - 3.4.2-SNAPSHOT + 3.5.3-SNAPSHOT ../ diff --git a/security-integration-shiro/pom.xml b/security-integration-shiro/pom.xml index 089405a23..9ebcd0862 100644 --- a/security-integration-shiro/pom.xml +++ b/security-integration-shiro/pom.xml @@ -4,7 +4,7 @@ org.ocpsoft.rewrite rewrite-parent - 3.4.2-SNAPSHOT + 3.5.3-SNAPSHOT ../pom.xml @@ -19,7 +19,7 @@ org.apache.shiro shiro-web - 1.2.0 + 1.12.0 provided @@ -43,7 +43,7 @@ org.jboss.spec.javax.servlet - jboss-servlet-api_2.5_spec + jboss-servlet-api_${servlet.spec}_spec test diff --git a/showcase/access-control/pom.xml b/showcase/access-control/pom.xml index bdc7315b9..11db68510 100644 --- a/showcase/access-control/pom.xml +++ b/showcase/access-control/pom.xml @@ -4,7 +4,7 @@ rewrite-showcase org.ocpsoft.rewrite.showcase - 3.4.2-SNAPSHOT + 3.5.3-SNAPSHOT ../ @@ -14,7 +14,7 @@ org.jboss.spec - jboss-javaee-6.0 + jboss-javaee-${javaee.spec} pom provided diff --git a/showcase/bookstore/pom.xml b/showcase/bookstore/pom.xml index 96f60a199..481c0ba36 100644 --- a/showcase/bookstore/pom.xml +++ b/showcase/bookstore/pom.xml @@ -5,7 +5,7 @@ rewrite-showcase org.ocpsoft.rewrite.showcase - 3.4.2-SNAPSHOT + 3.5.3-SNAPSHOT ../ @@ -16,7 +16,7 @@ org.jboss.spec - jboss-javaee-6.0 + jboss-javaee-${javaee.spec} pom provided @@ -48,5 +48,13 @@ 1.3.170 + + org.ocpsoft.rewrite + rewrite-config-annotations + + + org.ocpsoft.rewrite + rewrite-config-servlet + diff --git a/showcase/composite-query/pom.xml b/showcase/composite-query/pom.xml index 3f9c93bc3..ec3d5f3e4 100644 --- a/showcase/composite-query/pom.xml +++ b/showcase/composite-query/pom.xml @@ -4,7 +4,7 @@ rewrite-showcase org.ocpsoft.rewrite.showcase - 3.4.2-SNAPSHOT + 3.5.3-SNAPSHOT ../ @@ -14,7 +14,7 @@ org.jboss.spec - jboss-javaee-6.0 + jboss-javaee-${javaee.spec} pom provided @@ -22,5 +22,9 @@ org.ocpsoft.rewrite rewrite-servlet + + org.ocpsoft.rewrite + rewrite-config-servlet + diff --git a/showcase/pom.xml b/showcase/pom.xml index 31adeff5b..6d00de606 100644 --- a/showcase/pom.xml +++ b/showcase/pom.xml @@ -4,7 +4,7 @@ rewrite-parent org.ocpsoft.rewrite - 3.4.2-SNAPSHOT + 3.5.3-SNAPSHOT ../ @@ -37,7 +37,7 @@ org.jboss.spec - jboss-javaee-6.0 + jboss-javaee-${javaee.spec} ${version.jboss.spec} pom provided diff --git a/showcase/rest-ws/pom.xml b/showcase/rest-ws/pom.xml index 83b7bfe1b..a6ab79fd0 100644 --- a/showcase/rest-ws/pom.xml +++ b/showcase/rest-ws/pom.xml @@ -4,7 +4,7 @@ rewrite-showcase org.ocpsoft.rewrite.showcase - 3.4.2-SNAPSHOT + 3.5.3-SNAPSHOT ../ @@ -14,7 +14,7 @@ org.jboss.spec - jboss-javaee-6.0 + jboss-javaee-${javaee.spec} pom provided @@ -35,7 +35,7 @@ ocpsoft - http://ocpsoft.org/repository/ + https://ocpsoft.org/repository/ diff --git a/showcase/rest-ws/src/main/webapp/WEB-INF/web.xml b/showcase/rest-ws/src/main/webapp/WEB-INF/web.xml index b68c5f2a0..d897eb594 100644 --- a/showcase/rest-ws/src/main/webapp/WEB-INF/web.xml +++ b/showcase/rest-ws/src/main/webapp/WEB-INF/web.xml @@ -1,7 +1,10 @@ - + + rewrite-showcase-rest diff --git a/showcase/transform/pom.xml b/showcase/transform/pom.xml index 923aa4178..a1b710961 100644 --- a/showcase/transform/pom.xml +++ b/showcase/transform/pom.xml @@ -5,7 +5,7 @@ rewrite-showcase org.ocpsoft.rewrite.showcase - 3.4.2-SNAPSHOT + 3.5.3-SNAPSHOT ../ @@ -16,7 +16,7 @@ org.jboss.spec - jboss-javaee-6.0 + jboss-javaee-${javaee.spec} pom provided @@ -41,5 +41,9 @@ rewrite-transform-minify + + org.ocpsoft.rewrite + rewrite-config-servlet + diff --git a/test-base/pom.xml b/test-base/pom.xml index 1d3e8d3fc..c1b813a94 100644 --- a/test-base/pom.xml +++ b/test-base/pom.xml @@ -5,7 +5,7 @@ rewrite-parent org.ocpsoft.rewrite - 3.4.2-SNAPSHOT + 3.5.3-SNAPSHOT ../ diff --git a/test-harness/pom.xml b/test-harness/pom.xml index 699f19e06..b6fff6115 100644 --- a/test-harness/pom.xml +++ b/test-harness/pom.xml @@ -5,7 +5,7 @@ rewrite-parent org.ocpsoft.rewrite - 3.4.2-SNAPSHOT + 3.5.3-SNAPSHOT ../ @@ -29,7 +29,7 @@ org.jboss.spec.javax.servlet - jboss-servlet-api_2.5_spec + jboss-servlet-api_${servlet.spec}_spec provided @@ -51,24 +51,9 @@ org.mockito mockito-core - 1.9.5 compile - - - org.apache.httpcomponents - httpclient - 4.2.1 - compile - - - net.sourceforge.htmlunit - htmlunit - 2.12 - compile - - org.jboss.shrinkwrap.resolver shrinkwrap-resolver-api @@ -100,5 +85,10 @@ arquillian-drone-webdriver-depchain pom + + javax.enterprise + cdi-api + test + diff --git a/test-harness/src/main/java/org/ocpsoft/rewrite/test/RewriteTest.java b/test-harness/src/main/java/org/ocpsoft/rewrite/test/RewriteTest.java index d730c410d..78eb688c6 100644 --- a/test-harness/src/main/java/org/ocpsoft/rewrite/test/RewriteTest.java +++ b/test-harness/src/main/java/org/ocpsoft/rewrite/test/RewriteTest.java @@ -98,25 +98,27 @@ public static WebArchive getDeploymentNoWebXml(String name) // Tomcat specific stuff if (isTomcat()) { + archive.addAsLibraries(resolveDependencies("javax.enterprise:cdi-api:1.2")); + archive.addAsLibraries(resolveDependencies("javax.inject:javax.inject:1")); + // setup Weld if (isWeld()) { - archive.addAsLibraries(resolveDependencies("org.jboss.weld:weld-core:1.1.9.Final")); - archive.addAsLibraries(resolveDependencies("org.jboss.weld.servlet:weld-servlet-core:1.1.9.Final")); + archive.addAsLibraries(resolveDependencies("org.jboss.weld:weld-core:2.4.7.Final")); + archive.addAsLibraries(resolveDependencies("org.jboss.weld.servlet:weld-servlet-core:2.4.7.Final")); archive.addAsWebResource("tomcat-weld-context.xml", "META-INF/context.xml"); } // setup OWB if (isOWB()) { - archive.addAsLibraries(resolveDependencies("javax.enterprise:cdi-api:1.0-SP4")); - archive.addAsLibraries(resolveDependencies("org.apache.openwebbeans:openwebbeans-impl:1.1.5")); - archive.addAsLibraries(resolveDependencies("org.apache.openwebbeans:openwebbeans-web:1.1.5")); - archive.addAsLibraries(resolveDependencies("org.apache.openwebbeans:openwebbeans-spi:1.1.5")); - archive.addAsLibraries(resolveDependencies("org.apache.openwebbeans:openwebbeans-resource:1.1.5")); + archive.addAsLibraries(resolveDependencies("org.apache.openwebbeans:openwebbeans-impl:2.0.7")); + archive.addAsLibraries(resolveDependencies("org.apache.openwebbeans:openwebbeans-web:2.0.7")); + archive.addAsLibraries(resolveDependencies("org.apache.openwebbeans:openwebbeans-spi:2.0.7")); + archive.addAsLibraries(resolveDependencies("org.apache.openwebbeans:openwebbeans-resource:2.0.7")); archive.addAsWebResource("tomcat-owb-context.xml", "META-INF/context.xml"); } // setup Mojarra - archive.addAsLibraries(resolveDependencies("org.glassfish:javax.faces:2.1.13")); + archive.addAsLibraries(resolveDependencies("org.glassfish:javax.faces:2.3.7")); archive.addAsLibraries(resolveDependencies("javax.servlet:jstl:1.2")); } @@ -140,7 +142,7 @@ public static boolean isTomcat() { ClassLoader classLoader = Thread.currentThread().getContextClassLoader(); try { - classLoader.loadClass("org.jboss.arquillian.container.tomcat.managed_7.TomcatManagedContainer"); + classLoader.loadClass("org.jboss.arquillian.container.tomcat.managed.Tomcat8ManagedContainer"); return true; } catch (ClassNotFoundException e) { diff --git a/test-harness/src/main/resources/arquillian.xml b/test-harness/src/main/resources/arquillian.xml index 354c60672..96fa61437 100644 --- a/test-harness/src/main/resources/arquillian.xml +++ b/test-harness/src/main/resources/arquillian.xml @@ -20,7 +20,7 @@ - target/container/apache-tomcat-7 + target/container/apache-tomcat-8 38080 arquillian arquillian diff --git a/test-harness/src/main/resources/jetty-env.xml b/test-harness/src/main/resources/jetty-env.xml index 6bd144e0c..58d6efc2e 100644 --- a/test-harness/src/main/resources/jetty-env.xml +++ b/test-harness/src/main/resources/jetty-env.xml @@ -5,7 +5,7 @@ false - + type Embedded true @@ -17,7 +17,7 @@ - + BeanManager diff --git a/transform-less/pom.xml b/transform-less/pom.xml index 9933163ce..79be2ca69 100644 --- a/transform-less/pom.xml +++ b/transform-less/pom.xml @@ -4,7 +4,7 @@ org.ocpsoft.rewrite rewrite-parent - 3.4.2-SNAPSHOT + 3.5.3-SNAPSHOT ../ @@ -23,7 +23,7 @@ org.jboss.spec.javax.servlet - jboss-servlet-api_2.5_spec + jboss-servlet-api_${servlet.spec}_spec provided diff --git a/transform-markup/pom.xml b/transform-markup/pom.xml index f86dfbcf1..2a311955a 100644 --- a/transform-markup/pom.xml +++ b/transform-markup/pom.xml @@ -4,7 +4,7 @@ org.ocpsoft.rewrite rewrite-parent - 3.4.2-SNAPSHOT + 3.5.3-SNAPSHOT ../ @@ -27,7 +27,7 @@ org.jboss.spec.javax.servlet - jboss-servlet-api_2.5_spec + jboss-servlet-api_${servlet.spec}_spec provided diff --git a/transform-minify/pom.xml b/transform-minify/pom.xml index 868245e9a..e5fd2a2ca 100644 --- a/transform-minify/pom.xml +++ b/transform-minify/pom.xml @@ -4,7 +4,7 @@ org.ocpsoft.rewrite rewrite-parent - 3.4.2-SNAPSHOT + 3.5.3-SNAPSHOT ../ @@ -23,7 +23,7 @@ org.jboss.spec.javax.servlet - jboss-servlet-api_2.5_spec + jboss-servlet-api_${servlet.spec}_spec provided diff --git a/transform/pom.xml b/transform/pom.xml index bab5a8c6c..d96a1fc6d 100644 --- a/transform/pom.xml +++ b/transform/pom.xml @@ -4,7 +4,7 @@ org.ocpsoft.rewrite rewrite-parent - 3.4.2-SNAPSHOT + 3.5.3-SNAPSHOT ../ @@ -19,7 +19,7 @@ org.jboss.spec.javax.servlet - jboss-servlet-api_2.5_spec + jboss-servlet-api_${servlet.spec}_spec provided