Skip to content

Commit

Permalink
Update to Bloomreach V16
Browse files Browse the repository at this point in the history
- javax -> jakarta
- Bloomreach maven repo
- Update to Bloomreach project versions
  • Loading branch information
TheMiXeD committed Oct 5, 2024
1 parent 7f22ea5 commit 89c80c5
Show file tree
Hide file tree
Showing 12 changed files with 129 additions and 120 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up JDK 1.8
- name: Set up JDK 17
uses: actions/setup-java@v2
with:
distribution: temurin
java-version: 8
java-version: 17
- name: Build with Maven
run: mvn -B package --file pom.xml
75 changes: 39 additions & 36 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>org.onehippo.cms7</groupId>
<artifactId>hippo-cms7-project</artifactId>
<version>30.4.3</version>
<version>16.1.0</version>
</parent>

<name>Hippo structured data plugin</name>
Expand All @@ -14,7 +14,7 @@

<groupId>nl.openweb.hippo.hst</groupId>
<artifactId>structured-data</artifactId>
<version>13.0.05-SNAPSHOT</version>
<version>16.1.01-SNAPSHOT</version>

<licenses>
<license>
Expand Down Expand Up @@ -47,55 +47,42 @@
</developers>

<properties>
<commons.lang.version>3.12.0</commons.lang.version>
<el-api.version>3.0.0</el-api.version>
<hippo.version>13.4.16</hippo.version>
<jackson2.version>2.13.2</jackson2.version>
<jackson2-databind.version>2.13.2.2</jackson2-databind.version>
<jsp-api.version>2.2</jsp-api.version>
<junit.version>5.8.2</junit.version>
<mockito.version>4.5.1</mockito.version>
<maven.plugin.gpg.version>3.0.1</maven.plugin.gpg.version>
<maven.plugin.javadoc.version>3.4.0</maven.plugin.javadoc.version>
<maven.plugin.release>3.0.0-M5</maven.plugin.release>
<maven.plugin.source.version>3.2.0</maven.plugin.source.version>
<pitest.version>1.7.6</pitest.version>
<taglibs.version>1.2.5</taglibs.version>
<el-api.version>5.0.0</el-api.version>
</properties>

<dependencies>
<dependency>
<groupId>org.apache.taglibs</groupId>
<artifactId>taglibs-standard-spec</artifactId>
<groupId>com.bloomreach.xm</groupId>
<artifactId>taglibs-standard-spec-jakarta</artifactId>
<version>${taglibs.version}</version>
<scope>runtime</scope>
</dependency>

<dependency>
<groupId>org.apache.taglibs</groupId>
<artifactId>taglibs-standard-impl</artifactId>
<groupId>com.bloomreach.xm</groupId>
<artifactId>taglibs-standard-impl-jakarta</artifactId>
<version>${taglibs.version}</version>
<scope>runtime</scope>
</dependency>

<dependency>
<groupId>javax.servlet.jsp</groupId>
<artifactId>jsp-api</artifactId>
<groupId>jakarta.servlet.jsp</groupId>
<artifactId>jakarta.servlet.jsp-api</artifactId>
<version>${jsp-api.version}</version>
<scope>provided</scope>
</dependency>

<dependency>
<groupId>javax.el</groupId>
<artifactId>javax.el-api</artifactId>
<groupId>jakarta.el</groupId>
<artifactId>jakarta.el-api</artifactId>
<version>${el-api.version}</version>
<scope>runtime</scope>
</dependency>

<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>${commons.lang.version}</version>
<version>${commons-lang3.version}</version>
</dependency>

<dependency>
Expand All @@ -107,46 +94,53 @@
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>${jackson2-databind.version}</version>
<version>${jackson2.version}</version>
</dependency>

<dependency>
<groupId>org.onehippo.cms7.hst</groupId>
<artifactId>hst-commons</artifactId>
<version>${hippo.version}</version>
<version>${parent.version}</version>
</dependency>

<dependency>
<groupId>org.onehippo.cms7.hst</groupId>
<artifactId>hst-api</artifactId>
<version>${hippo.version}</version>
<version>${parent.version}</version>
</dependency>

<dependency>
<groupId>org.onehippo.cms7</groupId>
<artifactId>hippo-cms7-commons</artifactId>
<version>${hippo.version}</version>
<version>${parent.version}</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.onehippo.cms7</groupId>
<artifactId>hippo-services</artifactId>
<version>${hippo.version}</version>
<version>${parent.version}</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>5.3.19</version>
<version>${spring.version}</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-beans</artifactId>
<version>5.3.19</version>
<version>${spring.version}</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>${mockito.version}</version>
<scope>test</scope>
</dependency>

Expand All @@ -160,7 +154,7 @@
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<version>${junit.version}</version>
<version>${junit-jupiter.version}</version>
<scope>test</scope>
</dependency>
</dependencies>
Expand All @@ -174,9 +168,18 @@

<repositories>
<repository>
<id>hippo</id>
<name>Hippo maven 2 repository.</name>
<url>https://maven.onehippo.com/maven2/</url>
<releases>
<updatePolicy>never</updatePolicy>
<checksumPolicy>fail</checksumPolicy>
</releases>
<id>bloomreach-maven2-enterprise</id>
<name>Bloomreach Maven 2 Enterprise</name>
<url>https://maven.bloomreach.com/repository/maven2-enterprise</url>
</repository>
<repository>
<id>maven_central</id>
<name>Maven Central</name>
<url>https://repo.maven.apache.org/maven2/</url>
</repository>
</repositories>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package nl.openweb.structured.data.tag;


import javax.servlet.jsp.JspException;
import jakarta.servlet.jsp.JspException;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package nl.openweb.structured.data.tag;

import javax.servlet.ServletRequest;
import javax.servlet.jsp.JspException;
import jakarta.servlet.ServletRequest;
import jakarta.servlet.jsp.JspException;
import java.io.IOException;
import java.util.List;

Expand Down Expand Up @@ -31,8 +31,8 @@ public int doStartTag() throws JspException {

private void printList(List jsonList) throws IOException {
for (Object obj : jsonList) {
if (obj instanceof String) {
printString((String) obj);
if (obj instanceof String elm) {
printString(elm);
} else {
LOG.error("a non String object was find in the list.");
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package nl.openweb.structured.data.tag;

import javax.servlet.jsp.JspException;
import jakarta.servlet.jsp.JspException;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package nl.openweb.structured.data.tag;

import javax.servlet.ServletRequest;
import javax.servlet.jsp.JspWriter;
import javax.servlet.jsp.tagext.TagSupport;
import jakarta.servlet.ServletRequest;
import jakarta.servlet.jsp.JspWriter;
import jakarta.servlet.jsp.tagext.TagSupport;
import java.io.IOException;

import org.apache.commons.lang3.StringUtils;
Expand Down Expand Up @@ -36,8 +36,8 @@ protected void printString(String json) throws IOException {
protected HippoBean getBeanFromContext() {
HippoBean result = null;
ServletRequest request = pageContext.getRequest();
if (request instanceof HstRequest) {
result = ((HstRequest) request).getRequestContext().getContentBean();
if (request instanceof HstRequest hstRequest) {
result = hstRequest.getRequestContext().getContentBean();
}
return result;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package nl.openweb.structured.data.utils;

import javax.servlet.ServletRequest;
import jakarta.servlet.ServletRequest;
import java.util.ArrayList;
import java.util.List;

Expand All @@ -25,10 +25,10 @@ public static void contributeBean(Object bean, String mapperId, ServletRequest r

@SuppressWarnings("unchecked")
public static void contributeJson(String json, ServletRequest servletRequest) {
ServletRequest request = servletRequest instanceof HstRequest ? ((HstRequest) servletRequest).getRequestContext().getServletRequest() : servletRequest;
ServletRequest request = servletRequest instanceof HstRequest hstRequest? hstRequest.getRequestContext().getServletRequest() : servletRequest;
Object attribute = request.getAttribute(STRUCTURED_DATA_AS_JSON);
if (attribute instanceof List) {
((List) attribute).add(json);
if (attribute instanceof List list) {
list.add(json);
} else {
List<String> list = new ArrayList<>();
list.add(json);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import java.util.EventObject;
import java.util.Map;

import javax.servlet.ServletContext;
import jakarta.servlet.ServletContext;

import org.hippoecm.hst.core.container.ComponentManager;
import org.hippoecm.hst.core.container.ComponentsException;
Expand Down
Loading

0 comments on commit 89c80c5

Please sign in to comment.