This is an automated email from the ASF dual-hosted git repository. ilgrosso pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/syncope.git
The following commit(s) were added to refs/heads/master by this push: new df5ceff0dc [SYNCOPE-1730] Fixing syncope.conf.dir handling (introduced by SYNCOPE-1723) under Windows in all cases (#410) df5ceff0dc is described below commit df5ceff0dce8bc03831e9d967e27564e63c04545 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 8cfca0ea54..02293feaca 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 0e26e68da4..5f7a51ac47 100644 --- a/pom.xml +++ b/pom.xml @@ -413,7 +413,7 @@ under the License. <cxf.version>4.0.0</cxf.version> <bouncycastle.version>1.72</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>3.0.2</spring-boot.version> <spring-cloud-gateway.version>4.0.0</spring-cloud-gateway.version> @@ -2295,59 +2295,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 eea0988396..c55f285f7e 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 -DCATALINA_HOME=%CATALINA_HOME%