diff --git a/.mvn/extensions.xml b/.mvn/extensions.xml index 6f2e0e89a..c4093fbc6 100644 --- a/.mvn/extensions.xml +++ b/.mvn/extensions.xml @@ -1,7 +1,7 @@ - gh-pages + gh-pages-scm + + branch + gh-pages + github diff --git a/.mvn/wrapper/MavenWrapperDownloader.java b/.mvn/wrapper/MavenWrapperDownloader.java index 732313c43..f57fd86fb 100644 --- a/.mvn/wrapper/MavenWrapperDownloader.java +++ b/.mvn/wrapper/MavenWrapperDownloader.java @@ -7,7 +7,7 @@ * "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 + * https://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 @@ -23,85 +23,50 @@ import java.net.PasswordAuthentication; import java.net.URL; import java.nio.file.Files; -import java.nio.file.LinkOption; import java.nio.file.Path; import java.nio.file.Paths; import java.nio.file.StandardCopyOption; -import java.nio.file.StandardOpenOption; -import java.util.Properties; public final class MavenWrapperDownloader { - private static final String WRAPPER_VERSION = "3.1.1"; + private static final String WRAPPER_VERSION = "3.2.0"; private static final boolean VERBOSE = Boolean.parseBoolean( System.getenv( "MVNW_VERBOSE" ) ); - /** - * Default URL to download the maven-wrapper.jar from, if no 'downloadUrl' is provided. - */ - private static final String DEFAULT_DOWNLOAD_URL = - "https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/" + WRAPPER_VERSION - + "/maven-wrapper-" + WRAPPER_VERSION + ".jar"; - - /** - * Path to the maven-wrapper.properties file, which might contain a downloadUrl property to use instead of the - * default one. - */ - private static final String MAVEN_WRAPPER_PROPERTIES_PATH = ".mvn/wrapper/maven-wrapper.properties"; - - /** - * Path where the maven-wrapper.jar will be saved to. - */ - private static final String MAVEN_WRAPPER_JAR_PATH = ".mvn/wrapper/maven-wrapper.jar"; - - /** - * Name of the property which should be used to override the default download url for the wrapper. - */ - private static final String PROPERTY_NAME_WRAPPER_URL = "wrapperUrl"; - public static void main( String[] args ) { - if ( args.length == 0 ) - { - System.err.println( " - ERROR projectBasedir parameter missing" ); - System.exit( 1 ); - } + log( "Apache Maven Wrapper Downloader " + WRAPPER_VERSION ); - log( " - Downloader started" ); - final String dir = args[0].replace( "..", "" ); // Sanitize path - final Path projectBasedir = Paths.get( dir ).toAbsolutePath().normalize(); - if ( !Files.isDirectory( projectBasedir, LinkOption.NOFOLLOW_LINKS ) ) + if ( args.length != 2 ) { - System.err.println( " - ERROR projectBasedir not exists: " + projectBasedir ); + System.err.println( " - ERROR wrapperUrl or wrapperJarPath parameter missing" ); System.exit( 1 ); } - log( " - Using base directory: " + projectBasedir ); - - // If the maven-wrapper.properties exists, read it and check if it contains a custom - // wrapperUrl parameter. - Path mavenWrapperPropertyFile = projectBasedir.resolve( MAVEN_WRAPPER_PROPERTIES_PATH ); - String url = readWrapperUrl( mavenWrapperPropertyFile ); - try { - Path outputFile = projectBasedir.resolve( MAVEN_WRAPPER_JAR_PATH ); - createDirectories( outputFile.getParent() ); - downloadFileFromURL( url, outputFile ); + log( " - Downloader started" ); + final URL wrapperUrl = new URL( args[0] ); + final String jarPath = args[1].replace( "..", "" ); // Sanitize path + final Path wrapperJarPath = Paths.get( jarPath ).toAbsolutePath().normalize(); + downloadFileFromURL( wrapperUrl, wrapperJarPath ); log( "Done" ); - System.exit( 0 ); } catch ( IOException e ) { - System.err.println( "- Error downloading" ); - e.printStackTrace(); + System.err.println( "- Error downloading: " + e.getMessage() ); + if ( VERBOSE ) + { + e.printStackTrace(); + } System.exit( 1 ); } } - private static void downloadFileFromURL( String urlString, Path destination ) throws IOException + private static void downloadFileFromURL( URL wrapperUrl, Path wrapperJarPath ) + throws IOException { - log( " - Downloading to: " + destination ); + log( " - Downloading to: " + wrapperJarPath ); if ( System.getenv( "MVNW_USERNAME" ) != null && System.getenv( "MVNW_PASSWORD" ) != null ) { final String username = System.getenv( "MVNW_USERNAME" ); @@ -115,40 +80,11 @@ protected PasswordAuthentication getPasswordAuthentication() } } ); } - URL website = new URL( urlString ); - try ( InputStream inStream = website.openStream() ) { - Files.copy( inStream, destination, StandardCopyOption.REPLACE_EXISTING ); - } - log( " - Downloader complete" ); - } - - private static void createDirectories(Path outputPath) throws IOException - { - if ( !Files.isDirectory( outputPath, LinkOption.NOFOLLOW_LINKS ) ) { - Path createDirectories = Files.createDirectories( outputPath ); - log( " - Directories created: " + createDirectories ); - } - } - - private static String readWrapperUrl( Path mavenWrapperPropertyFile ) - { - String url = DEFAULT_DOWNLOAD_URL; - if ( Files.exists( mavenWrapperPropertyFile, LinkOption.NOFOLLOW_LINKS ) ) + try ( InputStream inStream = wrapperUrl.openStream() ) { - log( " - Reading property file: " + mavenWrapperPropertyFile ); - try ( InputStream in = Files.newInputStream( mavenWrapperPropertyFile, StandardOpenOption.READ ) ) - { - Properties mavenWrapperProperties = new Properties(); - mavenWrapperProperties.load( in ); - url = mavenWrapperProperties.getProperty( PROPERTY_NAME_WRAPPER_URL, DEFAULT_DOWNLOAD_URL ); - } - catch ( IOException e ) - { - System.err.println( " - ERROR loading '" + MAVEN_WRAPPER_PROPERTIES_PATH + "'" ); - } + Files.copy( inStream, wrapperJarPath, StandardCopyOption.REPLACE_EXISTING ); } - log( " - Downloading from: " + url ); - return url; + log( " - Downloader complete" ); } private static void log( String msg ) diff --git a/.mvn/wrapper/maven-wrapper.properties b/.mvn/wrapper/maven-wrapper.properties index ac184013f..3267ebce8 100644 --- a/.mvn/wrapper/maven-wrapper.properties +++ b/.mvn/wrapper/maven-wrapper.properties @@ -6,7 +6,7 @@ # "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 +# https://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 diff --git a/Dockerfile b/Dockerfile index 1a8455a89..ab813769b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,3 +1,19 @@ +# +# Copyright 2010-2023 the original author or authors. +# +# Licensed 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 +# +# https://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. +# + FROM openjdk:17.0.2 COPY . /usr/src/myapp WORKDIR /usr/src/myapp diff --git a/mvnw b/mvnw index 8d937f4c1..66df28542 100755 --- a/mvnw +++ b/mvnw @@ -8,7 +8,7 @@ # "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 +# https://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 diff --git a/mvnw.cmd b/mvnw.cmd index c4586b564..95ba6f54a 100644 --- a/mvnw.cmd +++ b/mvnw.cmd @@ -7,7 +7,7 @@ @REM "License"); you may not use this file except in compliance @REM with the License. You may obtain a copy of the License at @REM -@REM http://www.apache.org/licenses/LICENSE-2.0 +@REM https://www.apache.org/licenses/LICENSE-2.0 @REM @REM Unless required by applicable law or agreed to in writing, @REM software distributed under the License is distributed on an diff --git a/src/main/java/org/mybatis/jpetstore/service/CatalogService.java b/src/main/java/org/mybatis/jpetstore/service/CatalogService.java index 50af3c4e5..1af097edd 100644 --- a/src/main/java/org/mybatis/jpetstore/service/CatalogService.java +++ b/src/main/java/org/mybatis/jpetstore/service/CatalogService.java @@ -1,5 +1,5 @@ /* - * Copyright 2010-2022 the original author or authors. + * Copyright 2010-2023 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/resources/database/jpetstore-hsqldb-data.sql b/src/main/resources/database/jpetstore-hsqldb-data.sql index 80515e509..30928b70e 100644 --- a/src/main/resources/database/jpetstore-hsqldb-data.sql +++ b/src/main/resources/database/jpetstore-hsqldb-data.sql @@ -1,5 +1,5 @@ -- --- Copyright 2010-2022 the original author or authors. +-- Copyright 2010-2023 the original author or authors. -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. diff --git a/src/main/webapp/WEB-INF/jsp/account/NewAccountForm.jsp b/src/main/webapp/WEB-INF/jsp/account/NewAccountForm.jsp index 3b014d78f..98b1a5749 100644 --- a/src/main/webapp/WEB-INF/jsp/account/NewAccountForm.jsp +++ b/src/main/webapp/WEB-INF/jsp/account/NewAccountForm.jsp @@ -1,6 +1,6 @@ <%-- - Copyright 2010-2022 the original author or authors. + Copyright 2010-2023 the original author or authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/src/main/webapp/WEB-INF/jsp/cart/Cart.jsp b/src/main/webapp/WEB-INF/jsp/cart/Cart.jsp index fbdb75f4a..73b356206 100644 --- a/src/main/webapp/WEB-INF/jsp/cart/Cart.jsp +++ b/src/main/webapp/WEB-INF/jsp/cart/Cart.jsp @@ -1,6 +1,6 @@ <%-- - Copyright 2010-2022 the original author or authors. + Copyright 2010-2023 the original author or authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/src/main/webapp/WEB-INF/jsp/cart/Checkout.jsp b/src/main/webapp/WEB-INF/jsp/cart/Checkout.jsp index d67d8c29f..f1a1887eb 100644 --- a/src/main/webapp/WEB-INF/jsp/cart/Checkout.jsp +++ b/src/main/webapp/WEB-INF/jsp/cart/Checkout.jsp @@ -1,6 +1,6 @@ <%-- - Copyright 2010-2022 the original author or authors. + Copyright 2010-2023 the original author or authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/src/main/webapp/WEB-INF/jsp/common/Error.jsp b/src/main/webapp/WEB-INF/jsp/common/Error.jsp index 2979a421f..95f8924e2 100644 --- a/src/main/webapp/WEB-INF/jsp/common/Error.jsp +++ b/src/main/webapp/WEB-INF/jsp/common/Error.jsp @@ -1,6 +1,6 @@ <%-- - Copyright 2010-2022 the original author or authors. + Copyright 2010-2023 the original author or authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/src/main/webapp/WEB-INF/jsp/common/IncludeBottom.jsp b/src/main/webapp/WEB-INF/jsp/common/IncludeBottom.jsp index add6e0c64..9ec452849 100644 --- a/src/main/webapp/WEB-INF/jsp/common/IncludeBottom.jsp +++ b/src/main/webapp/WEB-INF/jsp/common/IncludeBottom.jsp @@ -1,6 +1,6 @@ <%-- - Copyright 2010-2022 the original author or authors. + Copyright 2010-2023 the original author or authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/src/main/webapp/WEB-INF/jsp/common/IncludeTop.jsp b/src/main/webapp/WEB-INF/jsp/common/IncludeTop.jsp index d4afae58b..78828462e 100644 --- a/src/main/webapp/WEB-INF/jsp/common/IncludeTop.jsp +++ b/src/main/webapp/WEB-INF/jsp/common/IncludeTop.jsp @@ -1,6 +1,6 @@ <%-- - Copyright 2010-2022 the original author or authors. + Copyright 2010-2023 the original author or authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/src/main/webapp/WEB-INF/jsp/order/NewOrderForm.jsp b/src/main/webapp/WEB-INF/jsp/order/NewOrderForm.jsp index 1e98c194c..3807c2453 100644 --- a/src/main/webapp/WEB-INF/jsp/order/NewOrderForm.jsp +++ b/src/main/webapp/WEB-INF/jsp/order/NewOrderForm.jsp @@ -1,6 +1,6 @@ <%-- - Copyright 2010-2022 the original author or authors. + Copyright 2010-2023 the original author or authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/src/main/webapp/WEB-INF/jsp/order/ShippingForm.jsp b/src/main/webapp/WEB-INF/jsp/order/ShippingForm.jsp index ba0ed3055..aee2126b2 100644 --- a/src/main/webapp/WEB-INF/jsp/order/ShippingForm.jsp +++ b/src/main/webapp/WEB-INF/jsp/order/ShippingForm.jsp @@ -1,6 +1,6 @@ <%-- - Copyright 2010-2022 the original author or authors. + Copyright 2010-2023 the original author or authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/src/site/site_es.xml b/src/site/site_es.xml index 1e43d5122..7cb888415 100644 --- a/src/site/site_es.xml +++ b/src/site/site_es.xml @@ -1,7 +1,7 @@