Skip to content

Commit

Permalink
Release version 0.1.3 (#85)
Browse files Browse the repository at this point in the history
* Update version in preparation of next release

* Upgrade version

* 0.1.3 (#74)

* Create renovate.json

* Update dependency chai to v4.3.7

* Update dependency gradle to v7.6.1

* Update docker.elastic.co/elasticsearch/elasticsearch Docker tag to v7.17.9 (#4)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Update dependency sinon to v14.0.2 (#3)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Update docker.elastic.co/kibana/kibana Docker tag to v7.17.9 (#6)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Update docker.elastic.co/logstash/logstash Docker tag to v7.17.9 (#7)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Update eclipse-temurin Docker tag to v17.0.6_10-jre-focal (#8)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Update dependency googleJavaFormat to v1.16.0 (#9)

* Update dependency googleJavaFormat to v1.16.0

* upgrade to latest version for maven build

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Raja Kolli <rajadilipkolli@gmail.com>

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Updating dependencies

* Fix code formatting task both outside module and with in model path

* introducing testcontainers in dev mode and increment (#76)

* introducing testcontainers in dev mode and increment

* fixes issue with localstack

* moves localstack to testcontainers dev mode (#77)

* moving localstack to testcontainers dev mode

* adds missing bracket

* fixes issue with localstack in gradle project

* adds schema validation Test (#78)

* adds schema validation Test


https://vladmihalcea.com/validate-ddl-schema-spring-hibernate/ changes as per this

* renames testname

* removing properties which are default in Hibernate 6+ (#79)

* removing properties which is default in Hibernate 6+

* revert back to default

* fixes issue with running initial script in localstack  (#81)

* fixes issue with running initial script in localstack and removes unused code

* adds instructions to use TestContainers

* fixes script

* removes snapshot and milestone repository

* fixes issue with generating code and refactor (#82)

* fixes issue with generating project and refactor

* removes unused files

* Revert "moves localstack to testcontainers dev mode (#77)"

This reverts commit c76aa2e.

* Upgrading Gradle Wrapper

* Fix gradle jacoco config issues

* Upgrade to latest versions

* Update dependency maven to v3.9.2

* fixes backward compatability and id collision issue (#83)

* fixes broken grafana dashboards (#84)

* Increase test timeout value

* Upgrade Spring Boot version to 3.1.1

* Code clean up

---------

Co-authored-by: Raja Kolli <rajadilipkolli@gmail.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
  • Loading branch information
3 people committed Jun 23, 2023
1 parent e6b64d9 commit 67040a2
Show file tree
Hide file tree
Showing 46 changed files with 2,259 additions and 2,740 deletions.
3 changes: 2 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{
"java.configuration.updateBuildConfiguration": "automatic"
"java.configuration.updateBuildConfiguration": "automatic",
"java.compile.nullAnalysis.mode": "automatic"
}
2 changes: 1 addition & 1 deletion .whitesource
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"scanSettings": {
"baseBranches": [0.1.2]
"baseBranches": []
},
"checkRunSettings": {
"vulnerableCheckRunConclusionLevel": "failure",
Expand Down
26 changes: 19 additions & 7 deletions generators/base-generator.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,22 +65,34 @@ module.exports = class extends Generator {
});
}

_formatCode(configOptions) {
_formatCode(configOptions, baseDir) {
if (configOptions.buildTool === 'maven') {
this._formatCodeMaven();
this._formatCodeMaven(configOptions, baseDir);
} else {
this._formatCodeGradle();
this._formatCodeGradle(configOptions, baseDir);
}
}

_formatCodeMaven() {
_formatCodeMaven(configOptions, baseDir) {
const command = this._isWin() ? 'mvnw' : './mvnw';
shell.exec(`${command} spotless:apply`);
if(baseDir) {
shell.cd(configOptions.appName);
shell.exec(`${command} spotless:apply`);
shell.cd('..');
} else {
shell.exec(`${command} spotless:apply`);
}
}

_formatCodeGradle() {
_formatCodeGradle(configOptions, baseDir) {
const command = this._isWin() ? 'gradlew' : './gradlew';
shell.exec(`${command} googleJavaFormat`);
if(baseDir) {
shell.cd(configOptions.appName);
shell.exec(`${command} spotlessApply`);
shell.cd('..');
} else {
shell.exec(`${command} spotlessApply`);
}
}

_isWin() {
Expand Down
Binary file modified generators/common/files/gradle/gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip
networkTimeout=10000
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
12 changes: 8 additions & 4 deletions generators/common/files/gradle/gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
# Darwin, MinGW, and NonStop.
#
# (3) This script is generated from the Groovy template
# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# within the Gradle project.
#
# You can find Gradle at https://github.com/gradle/gradle/.
Expand All @@ -80,10 +80,10 @@ do
esac
done

APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit

APP_NAME="Gradle"
# This is normally unused
# shellcheck disable=SC2034
APP_BASE_NAME=${0##*/}
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit

# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
Expand Down Expand Up @@ -143,12 +143,16 @@ fi
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
case $MAX_FD in #(
max*)
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC3045
MAX_FD=$( ulimit -H -n ) ||
warn "Could not query maximum file descriptor limit"
esac
case $MAX_FD in #(
'' | soft) :;; #(
*)
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC3045
ulimit -n "$MAX_FD" ||
warn "Could not set maximum file descriptor limit to $MAX_FD"
esac
Expand Down
183 changes: 92 additions & 91 deletions generators/common/files/gradle/gradlew.bat
Original file line number Diff line number Diff line change
@@ -1,91 +1,92 @@
@rem
@rem Copyright 2015 the original author or authors.
@rem
@rem Licensed under the Apache License, Version 2.0 (the "License");
@rem you may not use this file except in compliance with the License.
@rem You may obtain a copy of the License at
@rem
@rem https://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.
@rem

@if "%DEBUG%"=="" @echo off
@rem ##########################################################################
@rem
@rem Gradle startup script for Windows
@rem
@rem ##########################################################################

@rem Set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" setlocal

set DIRNAME=%~dp0
if "%DIRNAME%"=="" set DIRNAME=.
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%

@rem Resolve any "." and ".." in APP_HOME to make it shorter.
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi

@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"

@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome

set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if %ERRORLEVEL% equ 0 goto execute

echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.

goto fail

:findJavaFromJavaHome
set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe

if exist "%JAVA_EXE%" goto execute

echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.

goto fail

:execute
@rem Setup the command line

set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar


@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*

:end
@rem End local scope for the variables with windows NT shell
if %ERRORLEVEL% equ 0 goto mainEnd

:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
set EXIT_CODE=%ERRORLEVEL%
if %EXIT_CODE% equ 0 set EXIT_CODE=1
if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
exit /b %EXIT_CODE%

:mainEnd
if "%OS%"=="Windows_NT" endlocal

:omega
@rem
@rem Copyright 2015 the original author or authors.
@rem
@rem Licensed under the Apache License, Version 2.0 (the "License");
@rem you may not use this file except in compliance with the License.
@rem You may obtain a copy of the License at
@rem
@rem https://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.
@rem

@if "%DEBUG%"=="" @echo off
@rem ##########################################################################
@rem
@rem Gradle startup script for Windows
@rem
@rem ##########################################################################

@rem Set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" setlocal

set DIRNAME=%~dp0
if "%DIRNAME%"=="" set DIRNAME=.
@rem This is normally unused
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%

@rem Resolve any "." and ".." in APP_HOME to make it shorter.
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi

@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"

@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome

set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if %ERRORLEVEL% equ 0 goto execute

echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.

goto fail

:findJavaFromJavaHome
set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe

if exist "%JAVA_EXE%" goto execute

echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.

goto fail

:execute
@rem Setup the command line

set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar


@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*

:end
@rem End local scope for the variables with windows NT shell
if %ERRORLEVEL% equ 0 goto mainEnd

:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
set EXIT_CODE=%ERRORLEVEL%
if %EXIT_CODE% equ 0 set EXIT_CODE=1
if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
exit /b %EXIT_CODE%

:mainEnd
if "%OS%"=="Windows_NT" endlocal

:omega
1 change: 0 additions & 1 deletion generators/common/files/maven/.mvn/jvm.config

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
# "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
# 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.
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.8.6/apache-maven-3.8.6-bin.zip
wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.1/maven-wrapper-3.1.1.jar
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.2/apache-maven-3.9.2-bin.zip
wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar
40 changes: 20 additions & 20 deletions generators/constants.js
Original file line number Diff line number Diff line change
@@ -1,37 +1,37 @@
module.exports = {
JAVA_VERSION : '17',
SPRING_BOOT_VERSION : '3.0.5',
SPRING_CLOUD_VERSION : '2022.0.2',
SPRING_CLOUD_AWS_VERSION : '3.0.0-RC2',
SPRING_BOOT_VERSION : '3.1.1',
SPRING_CLOUD_VERSION : '2022.0.3',
SPRING_CLOUD_AWS_VERSION : '3.0.1',
SPRING_DEP_MNGMNT_VERSION : '1.1.0',
DEFAULT_APP_VERSION : '0.0.1-SNAPSHOT',
TEST_CONTAINERS_VERSION : '1.17.6',
SPRINGDOC_OPENAPI_VERSION : '2.0.4',
COMMONS_IO_VERSION : '2.11.0',
TEST_CONTAINERS_VERSION : '1.18.3',
SPRINGDOC_OPENAPI_VERSION : '2.1.0',
COMMONS_IO_VERSION : '2.13.0',
LOGSTASH_LOGBACK_ENCODER : 7.3,

JACOCO_MIN_COVERAGE_REQUIRED:'0.80',

GRADLE_GIT_PROPERTIES_PLUGIN_VERSION:'2.4.1',
GRADLE_JACOCO_PLUGIN_VERSION:'0.8.9',
GRADLE_SONAR_PLUGIN_VERSION:'3.4.0.2513',
GRADLE_OWASP_PLUGIN_VERSION:'7.1.0.1',
GRADLE_BENMANES_VERSIONS_PLUGIN_VERSION:'0.42.0',
GOOGLE_JAVA_FORMAT_PLUGIN_VERSION:'0.9',
GRADLE_JACOCO_PLUGIN_VERSION:'0.8.10',
GRADLE_SONAR_PLUGIN_VERSION:'4.2.1.3168',
GRADLE_OWASP_PLUGIN_VERSION:'8.2.1',
GRADLE_BENMANES_VERSIONS_PLUGIN_VERSION:'0.47.0',
SPOTLESS_PLUGIN_VERSION:'6.19.0',

MAVEN_DEPENDENCY_CHECK_PLUGIN_VERSION:'7.2.1',
MAVEN_DEPENDENCY_CHECK_PLUGIN_VERSION:'8.2.1',
MAVEN_PROPERTIES_PLUGIN_VERSION:'1.1.0',
MAVEN_SUREFIRE_PLUGIN_VERSION:'3.0.0',
MAVEN_FAILSAFE_PLUGIN_VERSION:'3.0.0',
MAVEN_SUREFIRE_PLUGIN_VERSION:'3.1.2',
MAVEN_FAILSAFE_PLUGIN_VERSION:'3.1.2',
MAVEN_SONAR_PLUGIN_VERSION:'3.9.1.2184',
MAVEN_JACOCO_PLUGIN_VERSION:'0.8.9',
MAVEN_SPOTLESS_PLUGIN_VERSION:'2.35.0',
MAVEN_JACOCO_PLUGIN_VERSION:'0.8.10',
MAVEN_SPOTLESS_PLUGIN_VERSION:'2.37.0',

KEY_FLYWAY_MIGRATION_COUNTER : 'flywayMigrationCounter',
KEY_LIQUIBASE_MIGRATION_COUNTER : 'liquibaseMigrationCounter',

LOCALSTACK_IMAGE: 'localstack/localstack:1.4.0',
POSTGRESQL_IMAGE: 'postgres:15-alpine',
MARIADB_IMAGE: 'mariadb:10.10',
MYSQL_IMAGE: 'mysql:8.0',
LOCALSTACK_IMAGE: 'localstack/localstack:2.1.0',
POSTGRESQL_IMAGE: 'postgres:15.3-alpine',
MARIADB_IMAGE: 'mariadb:11.0',
MYSQL_IMAGE: 'mysql:8.0.3',
}
2 changes: 1 addition & 1 deletion generators/controller/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ module.exports = class extends BaseGenerator {

end() {
if(this.configOptions.formatCode !== false) {
this._formatCode(this.configOptions);
this._formatCode(this.configOptions, null);
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
-- liquibase formatted sql
-- changeset author:author id:createTable-<% tableName %>
-- changeset author:app id:createTable-<% tableName %>
-- see https://docs.liquibase.com/concepts/changelogs/sql-format.html

create table <%= tableName %> (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
-- liquibase formatted sql
-- changeset author:author id:001-init
-- changeset author:app id:createTable-<% tableName %>
-- see https://docs.liquibase.com/concepts/changelogs/sql-format.html

create sequence <%= tableName %>_seq start with 1 increment by 50;
Expand Down
Loading

0 comments on commit 67040a2

Please sign in to comment.