Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanseifert committed Mar 27, 2023
2 parents 7188d83 + cd9cc6a commit 14c5a56
Show file tree
Hide file tree
Showing 19 changed files with 72 additions and 34 deletions.
6 changes: 6 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
version: 2
updates:
- package-ecosystem: "maven"
directory: "/"
schedule:
interval: "daily"
2 changes: 1 addition & 1 deletion .github/workflows/maven-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
java: [8, 11, 17]
java: [11, 17]
os: [ubuntu-latest]
distribution: [temurin]
include:
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/maven-deploy.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Deploy snapshots to Sonatpe OSS repository and deploy site to GitHub Pages
# Deploy snapshots to Sonatype OSS repository and deploy site to GitHub Pages

name: Deploy

Expand All @@ -15,19 +15,19 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Configure GIT
run: |
git config --global user.email "${{ secrets.GH_SITE_DEPLOY_EMAIL }}"
git config --global user.name "${{ secrets.GH_SITE_DEPLOY_NAME }}"
- name: Setup JDK
uses: actions/setup-java@v2
uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 8
cache: 'maven'
java-version: 11
cache: maven

- name: Build, verify, deploy, generate site
env:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-from-tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
permissions:
contents: write
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- uses: ncipollo/release-action@v1
with:
body: 'Changes: https://devops.wcm.io/conga/changes-report.html'
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
wcm.io DevOps CONGA Configuration Generator.

Documentation: https://devops.wcm.io/conga/<br/>
Issues: https://wcm-io.atlassian.net/projects/WDCONGA<br/>
Issues: https://github.com/wcm-io-devops/conga/issues<br/>
Wiki: https://wcm-io.atlassian.net/wiki/<br/>
Continuous Integration: https://github.com/wcm-io-devops/conga/actions<br/>
Commercial support: https://wcm.io/commercial-support.html
Expand Down
9 changes: 9 additions & 0 deletions changes.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,15 @@
xsi:schemaLocation="http://maven.apache.org/changes/1.0.0 https://maven.apache.org/plugins/maven-changes-plugin/xsd/changes-1.0.0.xsd">
<body>

<release version="1.15.0" date="2023-03-27">
<action type="update" dev="sseifert">
Switch to Java 11 as minimum version.
</action>
<action type="update" dev="sseifert">
Update to SnakeYAML 2.0.
</action>
</release>

<release version="1.14.12" date="2022-09-29">
<action type="update" dev="sseifert">
Update dependencies.
Expand Down
4 changes: 2 additions & 2 deletions generator/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<parent>
<groupId>io.wcm.devops.conga</groupId>
<artifactId>io.wcm.devops.conga.parent</artifactId>
<version>1.14.12</version>
<version>1.15.0</version>
<relativePath>../parent/pom.xml</relativePath>
</parent>

Expand All @@ -44,7 +44,7 @@
<dependency>
<groupId>io.wcm.devops.conga</groupId>
<artifactId>io.wcm.devops.conga.model</artifactId>
<version>1.14.12</version>
<version>1.15.0</version>
<scope>compile</scope>
</dependency>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
*/
package io.wcm.devops.conga.generator.spi.yaml.context;

import org.yaml.snakeyaml.DumperOptions;
import org.yaml.snakeyaml.representer.Represent;
import org.yaml.snakeyaml.representer.Representer;

Expand All @@ -27,6 +28,13 @@
*/
public final class YamlRepresenter extends Representer {

/**
* Constructor.
*/
public YamlRepresenter() {
super(new DumperOptions());
}

/**
* Register a represent.
* @param clazz Class to represent
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,9 @@
import org.apache.commons.jexl3.JexlException;
import org.apache.commons.jexl3.JexlExpression;
import org.apache.commons.jexl3.MapContext;
import org.apache.commons.jexl3.introspection.JexlPermissions;
import org.apache.commons.lang3.StringUtils;

import com.google.common.collect.ImmutableMap;

import io.wcm.devops.conga.generator.GeneratorException;
import io.wcm.devops.conga.model.util.MapMerger;
import io.wcm.devops.conga.model.util.MapSplitter;
Expand All @@ -50,13 +49,14 @@ final class JexlResolver {
private final JexlEngine jexl;
private final VariableMapResolver variableMapResolver;

private static final Map<String, Object> JEXL_FUNCTION_NS = ImmutableMap.of(
private static final Map<String, Object> JEXL_FUNCTION_NS = Map.of(
"stringUtils", StringUtils.class);

JexlResolver(VariableMapResolver variableMapResolver) {
this.jexl = new JexlBuilder()
.cache(CACHE_SIZE)
.namespaces(JEXL_FUNCTION_NS)
.permissions(JexlPermissions.UNRESTRICTED)
.create();
this.variableMapResolver = variableMapResolver;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ void setUp() {
"nested2", ImmutableMap.of(
"nested2var1", "nested2-value1",
"nested2JexlExpr", "${object1.var3 + ';' + var1}")))
.put("array1", new String[] { "v1", "v2", "v3" })
.build();
}

Expand Down Expand Up @@ -99,4 +100,9 @@ void testInvalidExpressions() {
});
}

@Test
void testStringUtilsMethod() {
assertEquals("v1:v2:v3", underTest.resolve("stringUtils:join(array1,':')", variables));
}

}
5 changes: 3 additions & 2 deletions model/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<parent>
<groupId>io.wcm.devops.conga</groupId>
<artifactId>io.wcm.devops.conga.parent</artifactId>
<version>1.14.12</version>
<version>1.15.0</version>
<relativePath>../parent/pom.xml</relativePath>
</parent>

Expand All @@ -40,7 +40,8 @@
<dependency>
<groupId>io.wcm.devops.conga</groupId>
<artifactId>io.wcm.devops.conga.resource</artifactId>
<version>1.14.12</version>
<version>1.15.0</version>
<scope>compile</scope>
</dependency>

<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
*/
package io.wcm.devops.conga.model.reader;

import org.yaml.snakeyaml.LoaderOptions;
import org.yaml.snakeyaml.Yaml;
import org.yaml.snakeyaml.constructor.Constructor;

Expand All @@ -37,7 +38,7 @@ public EnvironmentReader() {
}

private static Yaml getYaml() {
Constructor constructor = new Constructor(Environment.class);
Constructor constructor = new Constructor(Environment.class, new LoaderOptions());
return new Yaml(constructor);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
*/
package io.wcm.devops.conga.model.reader;

import org.yaml.snakeyaml.LoaderOptions;
import org.yaml.snakeyaml.Yaml;
import org.yaml.snakeyaml.constructor.Constructor;

Expand All @@ -37,7 +38,7 @@ public RoleReader() {
}

private static Yaml getYaml() {
Constructor constructor = new Constructor(Role.class);
Constructor constructor = new Constructor(Role.class, new LoaderOptions());
return new Yaml(constructor);
}

Expand Down
19 changes: 12 additions & 7 deletions parent/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@
<parent>
<groupId>io.wcm.devops</groupId>
<artifactId>io.wcm.devops.parent_toplevel</artifactId>
<version>1.3.2</version>
<version>1.4.0</version>
<relativePath />
</parent>

<groupId>io.wcm.devops.conga</groupId>
<artifactId>io.wcm.devops.conga.parent</artifactId>
<version>1.14.12</version>
<version>1.15.0</version>
<packaging>pom</packaging>

<name>CONGA</name>
Expand All @@ -42,8 +42,13 @@
<url>https://github.com/wcm-io-devops/conga/actions</url>
</ciManagement>

<issueManagement>
<system>GitHub</system>
<url>https://github.com/wcm-io/conga/issues/</url>
</issueManagement>

<properties>
<jknack.handlebars.version>4.3.0</jknack.handlebars.version>
<jknack.handlebars.version>4.3.1</jknack.handlebars.version>
</properties>

<dependencyManagement>
Expand All @@ -52,7 +57,7 @@
<dependency>
<groupId>org.yaml</groupId>
<artifactId>snakeyaml</artifactId>
<version>1.33</version>
<version>2.0</version>
</dependency>

<dependency>
Expand Down Expand Up @@ -105,13 +110,13 @@
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.9.1</version>
<version>2.10.1</version>
</dependency>

<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<version>4.3.30.RELEASE</version>
<version>5.3.26</version>
</dependency>

<dependency>
Expand All @@ -123,7 +128,7 @@
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-jexl3</artifactId>
<version>3.2.1</version>
<version>3.3</version>
</dependency>

</dependencies>
Expand Down
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@
<parent>
<groupId>io.wcm.devops.conga</groupId>
<artifactId>io.wcm.devops.conga.parent</artifactId>
<version>1.14.12</version>
<version>1.15.0</version>
<relativePath>parent/pom.xml</relativePath>
</parent>

<groupId>io.wcm.devops.conga</groupId>
<artifactId>io.wcm.devops.conga.root</artifactId>
<version>1.14.12</version>
<version>1.15.0</version>
<packaging>pom</packaging>

<name>CONGA</name>
Expand Down
2 changes: 1 addition & 1 deletion resource/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<parent>
<groupId>io.wcm.devops.conga</groupId>
<artifactId>io.wcm.devops.conga.parent</artifactId>
<version>1.14.12</version>
<version>1.15.0</version>
<relativePath>../parent/pom.xml</relativePath>
</parent>

Expand Down
4 changes: 2 additions & 2 deletions tooling/conga-cli/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<parent>
<groupId>io.wcm.devops.conga</groupId>
<artifactId>io.wcm.devops.conga.parent</artifactId>
<version>1.14.12</version>
<version>1.15.0</version>
<relativePath>../../parent/pom.xml</relativePath>
</parent>

Expand All @@ -40,7 +40,7 @@
<dependency>
<groupId>io.wcm.devops.conga</groupId>
<artifactId>io.wcm.devops.conga.generator</artifactId>
<version>1.14.12</version>
<version>1.15.0</version>
<scope>compile</scope>
</dependency>

Expand Down
8 changes: 4 additions & 4 deletions tooling/conga-maven-plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<parent>
<groupId>io.wcm.devops.conga</groupId>
<artifactId>io.wcm.devops.conga.parent</artifactId>
<version>1.14.12</version>
<version>1.15.0</version>
<relativePath>../../parent/pom.xml</relativePath>
</parent>

Expand All @@ -40,7 +40,7 @@
<site.url.module.prefix>tooling/conga-maven-plugin</site.url.module.prefix>

<!-- Versions -->
<maven-plugin-plugin.version>3.6.4</maven-plugin-plugin.version>
<maven-plugin-plugin.version>3.8.1</maven-plugin-plugin.version>

<!-- Enable recording of coverage during execution of maven-invoker-plugin -->
<jacoco.propertyName>invoker.mavenOpts</jacoco.propertyName>
Expand All @@ -56,7 +56,7 @@
<dependency>
<groupId>io.wcm.devops.conga</groupId>
<artifactId>io.wcm.devops.conga.generator</artifactId>
<version>1.14.12</version>
<version>1.15.0</version>
<scope>compile</scope>
</dependency>

Expand Down Expand Up @@ -115,7 +115,7 @@
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-archiver</artifactId>
<version>3.5.2</version>
<version>3.6.0</version>
</dependency>
<dependency>
<groupId>org.apache.maven.plugin-tools</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
import java.util.Map;

import org.apache.maven.plugin.MojoFailureException;
import org.yaml.snakeyaml.LoaderOptions;
import org.yaml.snakeyaml.Yaml;
import org.yaml.snakeyaml.constructor.Constructor;

Expand Down Expand Up @@ -75,7 +76,7 @@ private static class MapReader extends AbstractModelReader<Map> {
super(getYaml());
}
private static Yaml getYaml() {
Constructor constructor = new Constructor(Map.class);
Constructor constructor = new Constructor(Map.class, new LoaderOptions());
return new Yaml(constructor);
}
}
Expand Down

0 comments on commit 14c5a56

Please sign in to comment.