diff --git a/.mvn/wrapper/maven-wrapper.properties b/.mvn/wrapper/maven-wrapper.properties index 90ffde7..70db5db 100644 --- a/.mvn/wrapper/maven-wrapper.properties +++ b/.mvn/wrapper/maven-wrapper.properties @@ -1,2 +1,3 @@ + distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.12/apache-maven-3.9.12-bin.zip wrapperUrl=https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar diff --git a/build.gradle b/cics-java-liberty-springboot-transactions-app/build.gradle similarity index 53% rename from build.gradle rename to cics-java-liberty-springboot-transactions-app/build.gradle index d98eff1..3f4ef39 100644 --- a/build.gradle +++ b/cics-java-liberty-springboot-transactions-app/build.gradle @@ -1,18 +1,36 @@ plugins { - id 'org.springframework.boot' version '3.5.13' + id 'org.springframework.boot' version '3.5.13' id 'io.spring.dependency-management' version '1.0.11.RELEASE' id 'java' id 'eclipse' - id 'idea' id 'war' - id 'maven-publish' + id 'idea' } group = 'com.ibm.cicsdev.springboot' -archivesBaseName='cics-java-liberty-springboot-transactions' version = '0.1.0' +// ============================================================================ +// Java Configuration +// ============================================================================ +java { + sourceCompatibility = JavaVersion.toVersion(java_version) + targetCompatibility = JavaVersion.toVersion(java_version) +} + +// ============================================================================ +// WAR Configuration +// ============================================================================ +war { + archiveFileName = "cics-java-liberty-springboot-transactions-app-${version}.war" +} + +// Two versions of the WAR would be built, one for embedding into servers like Liberty (plain) +// and a bootWAR which can run standalone and contains all the Tomcat and Spring Boot stuff +// we don't need bootWAR, so disable it. +bootWar { enabled = false } + // If in Eclipse, add Javadoc to the local project classpath eclipse { @@ -22,19 +40,11 @@ eclipse } } - - repositories { mavenCentral() } -java { - toolchain { - languageVersion = JavaLanguageVersion.of(java_version) - } -} - dependencies { @@ -55,33 +65,3 @@ dependencies // Spring's Transactional API implementation ("org.springframework:spring-tx") } - -//Don't generate a FAT bootWar, we don't need to run standalone -bootWar { enabled = false } - -publishing { - publications { - // Publication for JCICS - maven(MavenPublication) { - groupId "${group}" - version "${version}" - artifactId "${archivesBaseName}" - artifact bootWar - } - } - - // Configure the Maven repository to publish to somewhere which is configurable - // with environment variables from outside gradle. - // - // For example: - // gradle build publish \ - // -Ppublish_repo_releases_url="file://my-folder" \ - // -Ppublish_repo_releases_name="my-maven-repo" - // - repositories { - maven { - url = "${publish_repo_releases_url}/${publish_repo_releases_name}" - } - } - -} diff --git a/cics-java-liberty-springboot-transactions-app/build.properties b/cics-java-liberty-springboot-transactions-app/build.properties new file mode 100644 index 0000000..084ecae --- /dev/null +++ b/cics-java-liberty-springboot-transactions-app/build.properties @@ -0,0 +1,3 @@ +source.. = src/main/java/ +bin.includes = META-INF/,. +output.. = bin/ \ No newline at end of file diff --git a/cics-java-liberty-springboot-transactions-app/pom.xml b/cics-java-liberty-springboot-transactions-app/pom.xml new file mode 100644 index 0000000..0e3a9ef --- /dev/null +++ b/cics-java-liberty-springboot-transactions-app/pom.xml @@ -0,0 +1,107 @@ + + + 4.0.0 + + + + com.ibm.cicsdev + cics-java-liberty-springboot-transactions + 0.1.0 + ../pom.xml + + + + cics-java-liberty-springboot-transactions-app + com.ibm.cicsdev.springboot.transactions.app + Demo project for Spring and Liberty transactions + + + 17 + UTF-8 + ${java.version} + ${java.version} + true + + + + + + + com.ibm.cics + com.ibm.cics.ts.bom + 6.1-20250812133513-PH63856 + pom + import + + + + + + + + com.ibm.cics + com.ibm.cics.server + + + + + org.springframework.boot + spring-boot-starter-web + + + + + org.springframework.boot + spring-boot-starter-tomcat + provided + + + + + org.springframework + spring-tx + + + + + jakarta.transaction + jakarta.transaction-api + provided + + + + + + war + + + + org.springframework.boot + spring-boot-maven-plugin + + + + + + + + + ${publish_repo_snapshots_name} + ${publish_repo_snapshots_url} + + + ${publish_repo_releases_name} + ${publish_repo_releases_url} + + + + diff --git a/cics-java-liberty-springboot-transactions-cicsbundle/build.gradle b/cics-java-liberty-springboot-transactions-cicsbundle/build.gradle new file mode 100644 index 0000000..37189b5 --- /dev/null +++ b/cics-java-liberty-springboot-transactions-cicsbundle/build.gradle @@ -0,0 +1,31 @@ +// ============================================================================ +// Plugins +// ============================================================================ +plugins { + id 'com.ibm.cics.bundle' version '1.0.8' +} + +// ============================================================================ +// Project Information +// ============================================================================ +description = 'CICS Transactions Springboot Application - CICS Bundle' +version = '1.0.0' + +// ============================================================================ +// Dependencies +// ============================================================================ +dependencies { + // Application WAR from sibling project + cicsBundlePart project(path: ':cics-java-liberty-springboot-transactions-app', configuration: 'archives') +} + +// ============================================================================ +// CICS Bundle Configuration +// ============================================================================ +cicsBundle { + build { + defaultJVMServer = project.findProperty('cics.jvmserver') ?: cicsJvmServer + } +} + +// Made with Bob diff --git a/cics-java-liberty-springboot-transactions-cicsbundle/pom.xml b/cics-java-liberty-springboot-transactions-cicsbundle/pom.xml new file mode 100644 index 0000000..5e0740f --- /dev/null +++ b/cics-java-liberty-springboot-transactions-cicsbundle/pom.xml @@ -0,0 +1,56 @@ + + + 4.0.0 + + + + + + com.ibm.cicsdev + cics-java-liberty-springboot-transactions + 0.1.0 + + + + + + cics-java-liberty-springboot-transactions-cicsbundle + cics-bundle + CICS Transactions Springboot - CICS Bundle + + + + + + + + ${project.groupId} + cics-java-liberty-springboot-transactions-app + ${project.version} + war + + + + + + + + + + + com.ibm.cics + cics-bundle-maven-plugin + 1.0.8 + true + + ${cics.jvmserver} + + + + + + + + diff --git a/gradle.properties b/gradle.properties index 9fa633b..6ff4c6a 100644 --- a/gradle.properties +++ b/gradle.properties @@ -14,4 +14,12 @@ # For example: gradle build publish. publish_repo_releases_url = 'default-value-for-publish_repo_releases_url' publish_repo_releases_name = 'default-value-for-publish_repo_releases_name' -java_version = 17 \ No newline at end of file +java_version = 17 + +# CICS Configuration +cicsJvmServer=DFHWLP +cicsBomVersion=6.3-20250905155520 + +# Framework Versions +jakartaVersion=10.0.0 +libertyApisVersion=25.0.0.9 \ No newline at end of file diff --git a/pom.xml b/pom.xml index 5632bc8..713a227 100644 --- a/pom.xml +++ b/pom.xml @@ -11,25 +11,27 @@ - - + + + com.ibm.cicsdev cics-java-liberty-springboot-transactions - 0.1.0 - com.ibm.cicsdev.springboot.transactions - Demo project for Spring and Liberty transactions + 0.1.0 + Demo project for Spring Boot and Liberty transactions + pom 17 UTF-8 ${java.version} - ${java.version} - true + ${java.version} + DFHWLP - + + com.ibm.cics com.ibm.cics.ts.bom @@ -40,71 +42,12 @@ - - - - com.ibm.cics - com.ibm.cics.server - - - - - org.springframework.boot - spring-boot-starter-web - - - - - org.springframework.boot - spring-boot-starter-tomcat - provided - - - - - org.springframework - spring-tx - - - - - jakarta.transaction - jakarta.transaction-api - provided - - - - - - war - - - - org.springframework.boot - spring-boot-maven-plugin - - - - - - - - - ${publish_repo_snapshots_name} - ${publish_repo_snapshots_url} - - - ${publish_repo_releases_name} - ${publish_repo_releases_url} - - + + + + + cics-java-liberty-springboot-transactions-app + cics-java-liberty-springboot-transactions-cicsbundle + diff --git a/settings.gradle b/settings.gradle index fbc663b..9689704 100644 --- a/settings.gradle +++ b/settings.gradle @@ -1 +1,10 @@ -rootProject.name = 'com.ibm.cicsdev.springboot.transactions' \ No newline at end of file +// ============================================================================ +// Root Project Configuration +// ============================================================================ +rootProject.name = 'cics-java-liberty-springboot-transactions' + +// ============================================================================ +// Subprojects +// ============================================================================ +include(':cics-java-liberty-springboot-transactions-app') +include(':cics-java-liberty-springboot-transactions-cicsbundle') \ No newline at end of file