Skip to content

Commit

Permalink
Upgrade to DDF 2.29.x (j21)
Browse files Browse the repository at this point in the history
  • Loading branch information
AzGoalie authored and alexabird committed Jan 6, 2025
1 parent 54912ea commit 11d2cab
Show file tree
Hide file tree
Showing 14 changed files with 134 additions and 97 deletions.
6 changes: 3 additions & 3 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ pipeline {
cron(BRANCH_NAME == "master" ? "H H(17-19) * * *" : "")
}
environment {
LARGE_MVN_OPTS = '-Xmx4G -Xms1G -XX:+CMSClassUnloadingEnabled -XX:+UseConcMarkSweepGC '
LARGE_MVN_OPTS = '-Xmx4G -Xms1G -XX:+ClassUnloadingWithConcurrentMark '
DISABLE_DOWNLOAD_PROGRESS_OPTS = '-Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn '
LINUX_MVN_RANDOM = '-Djava.security.egd=file:/dev/./urandom'
GITHUB_USERNAME = 'codice'
Expand Down Expand Up @@ -53,7 +53,7 @@ pipeline {
timeout(time: 1, unit: 'HOURS')
}
steps {
withMaven(maven: 'maven-latest', globalMavenSettingsConfig: 'default-global-settings', mavenSettingsConfig: 'codice-maven-settings', mavenOpts: '${LARGE_MVN_OPTS} ${LINUX_MVN_RANDOM}') {
withMaven(maven: 'maven-latest', jdk: 'jdk17', globalMavenSettingsConfig: 'default-global-settings', mavenSettingsConfig: 'codice-maven-settings', mavenOpts: '${LARGE_MVN_OPTS} ${LINUX_MVN_RANDOM}') {
sh 'mvn clean install -B $DISABLE_DOWNLOAD_PROGRESS_OPTS'
}
}
Expand All @@ -72,7 +72,7 @@ pipeline {
}
}
steps{
withMaven(maven: 'maven-latest', jdk: 'jdk8-latest', globalMavenSettingsConfig: 'default-global-settings', mavenSettingsConfig: 'codice-maven-settings', mavenOpts: '${LINUX_MVN_RANDOM}') {
withMaven(maven: 'maven-latest', jdk: 'jdk17', globalMavenSettingsConfig: 'default-global-settings', mavenSettingsConfig: 'codice-maven-settings', mavenOpts: '${LINUX_MVN_RANDOM}') {
sh 'mvn deploy -B -DskipStatic=true -DskipTests=true -DretryFailedDeploymentCount=10 $DISABLE_DOWNLOAD_PROGRESS_OPTS'
}
}
Expand Down
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ Welcome to ddf-ui, the home of Intrigue.

## Installing in DDF

Note: Change `4.1.0-SNAPSHOT` to the desired or most recent version of ddf-ui.
Note: Change `<VERSION>` to the desired or most recent version of ddf-ui.

1. Inside of a DDF karaf console run the following commands:

```
feature:repo-add mvn:org.codice.ddf.search/intrigue-ui-app/4.1.0-SNAPSHOT/xml/features
feature:repo-add mvn:org.codice.ddf.search/intrigue-ui-app/<VERSION>/xml/features
```

```
Expand All @@ -19,18 +19,19 @@ Note: Change `4.1.0-SNAPSHOT` to the desired or most recent version of ddf-ui.
This will add the backend repo and then install the app.

```
feature:repo-add mvn:org.codice.ddf.search/ui-frontend/4.1.0-SNAPSHOT/xml/features
feature:repo-add mvn:org.codice.ddf.search/ui-frontend/<VERSION>/xml/features
```

```
feature:install ui-frontend
```

This will add the frontend repo and then install the app.

2. (Optional) Add the following bundle to `bundleLocations` in `etc/application-definitions/search-ui.json`:
```
"mvn:org.codice.ddf.search/catalog-ui-search/4.1.0-SNAPSHOT"
"mvn:org.codice.ddf.search/catalog-ui-search/<VERSION>"
```
This configures the Intrigue configurations to appear under the `Search UI` app in the DDF Admin Console.
3. (Optional) Add a configuration file at `etc/org.codice.ddf.ui.searchui.filter.RedirectServlet.config` with the following contents:
Expand Down
102 changes: 52 additions & 50 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -46,52 +46,59 @@
<properties>
<!--Project properties-->
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
<compiler.fork>false</compiler.fork>
<maven.deploy.plugin.version>2.8.2</maven.deploy.plugin.version>
<maven.release.plugin.version>3.0.0-M1</maven.release.plugin.version>
<maven.bundle.plugin.version>5.1.4</maven.bundle.plugin.version>
<maven.compiler.plugin.version>3.8.1</maven.compiler.plugin.version>
<maven.deploy.plugin.version>3.0.0-M1</maven.deploy.plugin.version>
<maven.enforcer.plugin.version>3.5.0</maven.enforcer.plugin.version>
<maven.release.plugin.version>3.5.0</maven.release.plugin.version>
<maven.resources.plugin.version>3.2.0</maven.resources.plugin.version>
<maven.surefire.plugin.version>3.5.0</maven.surefire.plugin.version>
<javalin.thirdparty.bundle.version>3.11.2_1</javalin.thirdparty.bundle.version>
<kotlin-osgi.version>1.3.71</kotlin-osgi.version>
<maven-jar-plugin.version>3.0.2</maven-jar-plugin.version>
<errorprone.version>2.2.0</errorprone.version>
<maven-jar-plugin.version>3.2.0</maven-jar-plugin.version>
<errorprone.version>2.4.0</errorprone.version>
<jacoco.maven.plugin.version>0.8.12</jacoco.maven.plugin.version>
<fmt.maven.plugin.version>2.3.0</fmt.maven.plugin.version>

<!--Backend properties-->
<ddf.version>2.26.48</ddf.version>
<ddf-jsonrpc.version>0.6</ddf-jsonrpc.version>
<ddf.version>2.29.2</ddf.version>
<ddf-jsonrpc.version>0.9</ddf-jsonrpc.version>
<ddf.support.version>2.3.16</ddf.support.version>
<antlr.version>4.3</antlr.version>
<c3p0.version>0.9.5.5</c3p0.version>
<camel.version>3.4.0</camel.version>
<camel.version>3.18.8</camel.version>
<commons-collections.version>3.2.2</commons-collections.version>
<commons-lang.version>2.6</commons-lang.version>
<commons-lang3.version>3.11</commons-lang3.version>
<commons-lang3.version>3.12.0</commons-lang3.version>
<commons-math3.version>3.6.1</commons-math3.version>
<gson.version>2.8.5</gson.version>
<gson.version>2.9.0</gson.version>
<guava.version>29.0-jre</guava.version>
<httpclient.version>4.5.12</httpclient.version>
<httpcore.version>4.4.13</httpcore.version>
<jackson.version>2.11.0</jackson.version>
<jackson.version>2.13.3</jackson.version>
<javax.servlet-api.version>3.1.0</javax.servlet-api.version>
<javax.ws.rs.version>2.1</javax.ws.rs.version>
<jaxb.version>2.3.2</jaxb.version>
<jsr305.version>3.0.2</jsr305.version>
<jvnet.jaxb2.version>0.11.0</jvnet.jaxb2.version>
<jvnet-ogc.version>2.6.1</jvnet-ogc.version>
<karaf.version>4.2.9</karaf.version>
<karaf.version>4.3.7</karaf.version>
<nimbus.version>8.14.1</nimbus.version>
<nimbus.oidc.version>8.3</nimbus.oidc.version>
<org.geotools.version>20.1</org.geotools.version>
<org.geotools.bundle.version>${org.geotools.version}_2</org.geotools.bundle.version>
<nimbus.oidc.version>8.22</nimbus.oidc.version>
<org.geotools.version>24.6</org.geotools.version>
<osgi.version>5.0.0</osgi.version>
<owasp-html-sanitizer.version>20191001.1</owasp-html-sanitizer.version>
<owasp-html-sanitizer.version>20220608.1</owasp-html-sanitizer.version>
<ows-v_1_0_0-schema.version>1.1.0</ows-v_1_0_0-schema.version>
<pac4j.version>4.0.1</pac4j.version>
<pac4j.version>4.5.6</pac4j.version>
<pax.web.jsp.version>7.2.18</pax.web.jsp.version>
<quartz.version>2.3.2</quartz.version>
<restassured.version>3.3.0</restassured.version>
<spark.version>2.9.2</spark.version>
<spatial4j.version>0.7</spatial4j.version>
<tika.version>1.24.1</tika.version>
<spatial4j.version>0.8</spatial4j.version>
<tika.version>1.28.4</tika.version>
<usng4j.version>0.4</usng4j.version>
<org.slf4j.version>1.7.29</org.slf4j.version>

Expand All @@ -103,7 +110,7 @@
<hamcrest-junit.version>2.0.0.0</hamcrest-junit.version>
<hamcrest-all.version>1.3</hamcrest-all.version>
<junit.version>4.12</junit.version>
<mockito.version>2.8.47</mockito.version>
<mockito.version>3.6.28</mockito.version>
<objenesis.version>2.6</objenesis.version>
<xmlunit.version>1.4</xmlunit.version>

Expand Down Expand Up @@ -172,42 +179,37 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>3.0.2</version>
<version>${maven.resources.plugin.version}</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<version>${maven.compiler.plugin.version}</version>
<configuration>
<compilerId>javac-with-errorprone</compilerId>
<forceJavacCompilerUse>true</forceJavacCompilerUse>
<!-- maven-compiler-plugin defaults to targeting Java 5, but our javac
only supports >=6 -->
<source>8</source>
<target>8</target>
<source>${maven.compiler.source}</source>
<target>${maven.compiler.target}</target>
<maxmem>512M</maxmem>
<fork>${compiler.fork}</fork>
<encoding>${project.build.sourceEncoding}</encoding>
<compilerArgs>
<arg>-XDcompilePolicy=simple</arg>
<!-- <arg>-Xplugin:ErrorProne</arg>-->
<arg>--add-exports</arg>
<arg>java.base/sun.security.x509=ALL-UNNAMED</arg>
</compilerArgs>
<!-- <annotationProcessorPaths>-->
<!-- <path>-->
<!-- <groupId>com.google.errorprone</groupId>-->
<!-- <artifactId>error_prone_core</artifactId>-->
<!-- <version>2.4.0</version>-->
<!-- </path>-->
<!-- </annotationProcessorPaths>-->
</configuration>
<dependencies>
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-compiler-javac-errorprone</artifactId>
<version>2.8.2</version>
</dependency>
<!-- override plexus-compiler-javac-errorprone's dependency on
Error Prone with the latest version -->
<dependency>
<groupId>com.google.errorprone</groupId>
<artifactId>error_prone_core</artifactId>
<version>2.1.2</version>
</dependency>
</dependencies>
</plugin>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<version>4.2.1</version>
<version>${maven.bundle.plugin.version}</version>
<extensions>true</extensions>
<configuration>
<!-- Disabled OBR to increase build speed -->
Expand All @@ -220,7 +222,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.1.2</version>
<version>${maven.surefire.plugin.version}</version>
<configuration>
<argLine>@{argLine} -Djava.awt.headless=true -noverify</argLine>
<includes>
Expand All @@ -233,7 +235,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<version>1.4.1</version>
<version>${maven.enforcer.plugin.version}</version>
<dependencies>
<dependency>
<groupId>ddf.support</groupId>
Expand All @@ -259,7 +261,7 @@
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.8.10</version>
<version>${jacoco.maven.plugin.version}</version>
<dependencies>
<dependency>
<groupId>org.codice.maven</groupId>
Expand Down Expand Up @@ -326,7 +328,7 @@
<plugin>
<groupId>com.coveo</groupId>
<artifactId>fmt-maven-plugin</artifactId>
<version>2.3.0</version>
<version>${fmt.maven.plugin.version}</version>
<!-- <version>2.9</version>-->
<executions>
<execution>
Expand All @@ -340,12 +342,12 @@
<plugin>
<groupId>org.codehaus.gmavenplus</groupId>
<artifactId>gmavenplus-plugin</artifactId>
<version>1.5</version>
<version>1.13.1</version>
<executions>
<execution>
<goals>
<goal>compile</goal>
<goal>testCompile</goal>
<goal>compileTests</goal>
</goals>
</execution>
</executions>
Expand Down
32 changes: 18 additions & 14 deletions ui-backend/catalog-ui-search/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -159,9 +159,19 @@
</exclusions>
</dependency>
<dependency>
<groupId>org.codice.thirdparty</groupId>
<artifactId>geotools-suite</artifactId>
<version>${org.geotools.bundle.version}</version>
<groupId>org.geotools</groupId>
<artifactId>gt-metadata</artifactId>
<version>${org.geotools.version}</version>
</dependency>
<dependency>
<groupId>org.geotools</groupId>
<artifactId>gt-main</artifactId>
<version>${org.geotools.version}</version>
</dependency>
<dependency>
<groupId>org.geotools</groupId>
<artifactId>gt-geojson</artifactId>
<version>${org.geotools.version}</version>
</dependency>
<dependency>
<groupId>ddf.catalog.transformer</groupId>
Expand Down Expand Up @@ -213,11 +223,6 @@
<artifactId>persistence-core-api</artifactId>
<version>${ddf.version}</version>
</dependency>
<dependency>
<groupId>ddf.platform</groupId>
<artifactId>preferences-api</artifactId>
<version>${ddf.version}</version>
</dependency>
<dependency>
<groupId>ddf.security.core</groupId>
<artifactId>security-core-api</artifactId>
Expand Down Expand Up @@ -347,12 +352,6 @@
<artifactId>catalog-core-commands</artifactId>
<version>${ddf.version}</version>
</dependency>
<dependency>
<groupId>ddf.thirdparty</groupId>
<artifactId>rest-assured</artifactId>
<version>${ddf.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.googlecode.owasp-java-html-sanitizer</groupId>
<artifactId>owasp-java-html-sanitizer</artifactId>
Expand Down Expand Up @@ -394,6 +393,11 @@
<artifactId>preferences-api</artifactId>
<version>${ddf.version}</version>
</dependency>
<dependency>
<groupId>io.rest-assured</groupId>
<artifactId>rest-assured</artifactId>
<version>${restassured.version}</version>
</dependency>
</dependencies>

<build>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -952,7 +952,7 @@ public Boolean getUnknownErrorBoxEnabled() {

public void setTypeNameMapping(String[] mappings) {
if (mappings != null) {
typeNameMapping = MapUtils.lazyMap(new TreeMap(), NEW_SET_FACTORY);
typeNameMapping = MapUtils.lazyMap(new TreeMap<String, Set<String>>(), NEW_SET_FACTORY);

for (String mappingValue : mappings) {
// workaround for KARAF-1701
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,12 +67,9 @@ public String getOperator() {

@Override
public List<FilterNode> getChildren() {
return Stream.of(json.get(CHILDREN))
.map(List.class::cast)
.flatMap(List::stream)
.map(Map.class::cast)
.map(FilterNodeMapImpl::new)
.collect(Collectors.toList());
List<Object> filters = (List<Object>) json.get(CHILDREN);
Stream<Object> streams = Stream.of(filters).flatMap(List::stream);
return streams.map(Map.class::cast).map(FilterNodeMapImpl::new).collect(Collectors.toList());
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,9 @@
import org.codice.ddf.catalog.ui.security.LogSanitizer;
import org.codice.gsonsupport.GsonTypeAdapters.LongDoubleTypeAdapter;
import org.geotools.factory.CommonFactoryFinder;
import org.geotools.factory.FactoryIteratorProvider;
import org.geotools.factory.GeoTools;
import org.geotools.filter.FunctionFactory;
import org.geotools.util.factory.FactoryIteratorProvider;
import org.geotools.util.factory.GeoTools;
import org.opengis.filter.Filter;
import org.opengis.filter.sort.SortBy;
import org.opengis.filter.sort.SortOrder;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,15 +108,14 @@ public void testSetTerrainProvider() throws Exception {
public void testContentTypeMappings() throws Exception {
// Setup
configurationApplication.setTypeNameMapping(
(String[])
Arrays.asList(
"foo=bar,foo=baz",
"foo=qux",
"alpha=beta, alpha = omega ",
"=,=,",
"bad,input",
"name=,=type")
.toArray());
Arrays.asList(
"foo=bar,foo=baz",
"foo=qux",
"alpha=beta, alpha = omega ",
"=,=,",
"bad,input",
"name=,=type")
.toArray(String[]::new));

// Verify
assertThat(configurationApplication.getTypeNameMapping().size(), is(2));
Expand Down
Loading

0 comments on commit 11d2cab

Please sign in to comment.