This is an automated email from the ASF dual-hosted git repository. ilgrosso pushed a commit to branch 3_0_X in repository https://gitbox.apache.org/repos/asf/syncope.git
The following commit(s) were added to refs/heads/3_0_X by this push: new 613680030e [SYNCOPE-1730] Fixing syncope.conf.dir handling (introduced by SYNCOPE-1723) under Windows in all cases (#410) 613680030e is described below commit 613680030ee29ce0bc6f234a6a6927142e44c465 Author: Francesco Chicchiriccò <ilgro...@users.noreply.github.com> AuthorDate: Mon Feb 13 11:29:59 2023 +0100 [SYNCOPE-1730] Fixing syncope.conf.dir handling (introduced by SYNCOPE-1723) under Windows in all cases (#410) --- .../jpa/content/ContentLoaderHandler.java | 5 ++ pom.xml | 55 +--------------------- standalone/src/main/resources/setenv.bat | 29 ++++++------ 3 files changed, 21 insertions(+), 68 deletions(-) diff --git a/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/content/ContentLoaderHandler.java b/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/content/ContentLoaderHandler.java index 83e408cab9..94a7b8d409 100644 --- a/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/content/ContentLoaderHandler.java +++ b/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/content/ContentLoaderHandler.java @@ -45,6 +45,8 @@ public class ContentLoaderHandler extends DefaultHandler { private static final Logger LOG = LoggerFactory.getLogger(ContentLoaderHandler.class); + private static final String CONF_DIR = "syncope.conf.dir"; + private final JdbcTemplate jdbcTemplate; private final String rootElement; @@ -66,6 +68,9 @@ public class ContentLoaderHandler extends DefaultHandler { this.continueOnError = continueOnError; this.paramSubstitutor = new StringSubstitutor(key -> { String value = env.getProperty(key, fetches.get(key)); + if (value != null && CONF_DIR.equals(key)) { + value = value.replace('\\', '/'); + } return StringUtils.isBlank(value) ? null : value; }); } diff --git a/pom.xml b/pom.xml index b101a0c852..6601ba9aab 100644 --- a/pom.xml +++ b/pom.xml @@ -413,7 +413,7 @@ under the License. <cxf.version>3.5.5</cxf.version> <bouncycastle.version>1.70</bouncycastle.version> - <nimbus-jose-jwt.version>9.29</nimbus-jose-jwt.version> + <nimbus-jose-jwt.version>9.30.1</nimbus-jose-jwt.version> <spring-boot.version>2.7.8</spring-boot.version> <spring-cloud-gateway.version>3.1.4</spring-cloud-gateway.version> @@ -2358,59 +2358,6 @@ under the License. <module>docker</module> </modules> </profile> - - <profile> - <id>win</id> - - <activation> - <os> - <family>Windows</family> - </os> - </activation> - - <properties> - <syncope.conf.dir>${project.build.directory}/test-classes</syncope.conf.dir> - </properties> - - <build> - <plugins> - <plugin> - <groupId>org.codehaus.gmavenplus</groupId> - <artifactId>gmavenplus-plugin</artifactId> - <executions> - <execution> - <id>convert-win-paths</id> - <phase>generate-resources</phase> - <goals> - <goal>execute</goal> - </goals> - <configuration> - <bindAllProjectProperties>true</bindAllProjectProperties> - <scripts> - <script><![CDATA[ - project.properties['win.syncope.conf.dir'] = project.properties['syncope.conf.dir'].replace("\\", "/") - ]]></script> - </scripts> - </configuration> - </execution> - </executions> - </plugin> - - <plugin> - <groupId>org.codehaus.cargo</groupId> - <artifactId>cargo-maven3-plugin</artifactId> - <inherited>true</inherited> - <configuration> - <container> - <systemProperties> - <syncope.conf.dir>${win.syncope.conf.dir}</syncope.conf.dir> - </systemProperties> - </container> - </configuration> - </plugin> - </plugins> - </build> - </profile> </profiles> <modules> diff --git a/standalone/src/main/resources/setenv.bat b/standalone/src/main/resources/setenv.bat index 64ecde0e4f..edaa3ec2c7 100644 --- a/standalone/src/main/resources/setenv.bat +++ b/standalone/src/main/resources/setenv.bat @@ -1,16 +1,17 @@ -# 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. +@echo off +rem Licensed to the Apache Software Foundation (ASF) under one or more +rem contributor license agreements. See the NOTICE file distributed with +rem this work for additional information regarding copyright ownership. +rem The ASF licenses this file to You under the Apache License, Version 2.0 +rem (the "License"); you may not use this file except in compliance with +rem the License. You may obtain a copy of the License at +rem +rem http://www.apache.org/licenses/LICENSE-2.0 +rem +rem Unless required by applicable law or agreed to in writing, software +rem distributed under the License is distributed on an "AS IS" BASIS, +rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +rem See the License for the specific language governing permissions and +rem limitations under the License. set JAVA_OPTS=-Djava.awt.headless=true -Dfile.encoding=UTF-8 -Djavax.net.ssl.trustStore=%CATALINA_HOME%\conf\keystore.jks -Dsyncope.connid.location=connid://${testconnectorserver.key}@localhost:${testconnectorserver.port} -Dsyncope.conf.dir=%CATALINA_HOME%\webapps\syncope\WEB-INF\classes -Dsyncope.log.dir=%CATALINA_HOME%\logs -Dspring.profiles.active=embedded -server -Xms2048m -Xmx2048m -XX:NewSize=256m -XX:MaxNewSize=256m -XX:+DisableExplicitGC -Dwicket.ioc.useByteBuddy=true -DCATALINA_ [...]