Skip to content

Commit c13a23a

Browse files
Add build toolchain support and improve Eclipse configuration
- Add Gradle Java toolchain with centralized java_version property - Add Maven compiler plugin with release parameter for toolchain support - Disable Gradle configuration cache (incompatible with CICS Bundle Plugin 1.0.8) - Update .gitignore to comprehensively ignore build artifacts - Add Eclipse .settings files for UTF-8 encoding and Java 17 compiler - Update Eclipse .classpath with exported JRE container - Update web module configuration for multi-module structure These changes ensure: - Consistent Java version management across Gradle, Maven, and Eclipse - Automatic JDK detection without hardcoded paths - Proper Eclipse configuration out-of-the-box for cloned repositories - Build artifacts properly ignored by git
1 parent f3665c7 commit c13a23a

9 files changed

Lines changed: 105 additions & 34 deletions

File tree

.classpath

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<classpath>
3-
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-17">
3+
<classpathentry exported="true" kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-17">
44
<attributes>
55
<attribute name="module" value="true"/>
66
</attributes>
77
</classpathentry>
88
<classpathentry kind="output" path="bin/default"/>
99
</classpath>
10-
11-
<!-- Made with Bob -->

.gitignore

Lines changed: 41 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,42 @@
1-
/.gradle/
2-
/target/
3-
/build/
1+
# Maven ignores
2+
target/
3+
pom.xml.tag
4+
pom.xml.releaseBackup
5+
pom.xml.versionsBackup
6+
pom.xml.next
7+
release.properties
8+
dependency-reduced-pom.xml
9+
buildNumber.properties
10+
.mvn/timing.properties
11+
12+
# Gradle ignores
13+
.gradle
14+
**/build/
15+
!src/**/build/
16+
17+
# Ignore Gradle GUI config
18+
gradle-app.setting
19+
20+
# Cache of project
21+
.gradletasknamecache
22+
23+
# Java ignores
24+
*.class
25+
*.log
26+
.mtj.tmp/
27+
28+
# Package Files
29+
*.jar
30+
*.war
31+
*.nar
32+
*.ear
33+
*.zip
34+
*.tar.gz
35+
*.rar
36+
37+
# virtual machine crash logs
38+
hs_err_pid*
39+
replay_pid*
40+
41+
# Eclipse ignores
442
/bin/
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
eclipse.preferences.version=1
2+
encoding/<project>=UTF-8
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
eclipse.preferences.version=1
2+
org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
3+
org.eclipse.jdt.core.compiler.codegen.targetPlatform=17
4+
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
5+
org.eclipse.jdt.core.compiler.compliance=17
6+
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
7+
org.eclipse.jdt.core.compiler.debug.localVariable=generate
8+
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
9+
org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
10+
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
11+
org.eclipse.jdt.core.compiler.release=enabled
12+
org.eclipse.jdt.core.compiler.source=17
Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,13 @@
1-
<?xml version="1.0" encoding="UTF-8"?>
2-
<project-modules id="moduleCoreId" project-version="1.5.0">
3-
<wb-module deploy-name="com.ibm.cicsdev.springboot.jcics">
4-
<property name="context-root" value="cics-java-liberty-springboot-jcics"/>
5-
<wb-resource deploy-path="/WEB-INF/classes" source-path="src/main/java"/>
6-
<wb-resource deploy-path="/" source-path="src/main/webapp"/>
7-
</wb-module>
1+
<?xml version="1.0" encoding="UTF-8"?><project-modules id="moduleCoreId" project-version="1.5.0">
2+
3+
<wb-module deploy-name="cics-java-liberty-springboot-jcics">
4+
5+
<property name="context-root" value="cics-java-liberty-springboot-jcics"/>
6+
7+
<wb-resource deploy-path="/WEB-INF/classes" source-path="src/main/java"/>
8+
9+
<wb-resource deploy-path="/" source-path="src/main/webapp"/>
10+
11+
</wb-module>
12+
813
</project-modules>

cics-java-liberty-springboot-jcics-app/.settings/org.eclipse.wst.common.component

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<project-modules id="moduleCoreId" project-version="1.5.0">
3-
<wb-module deploy-name="com.ibm.cicsdev.springboot.jcics">
3+
<wb-module deploy-name="cics-java-liberty-springboot-jcics-app">
44
<property name="context-root" value="cics-java-liberty-springboot-jcics"/>
55
<wb-resource deploy-path="/WEB-INF/classes" source-path="src/main/java"/>
66
<wb-resource deploy-path="/" source-path="src/main/webapp"/>

cics-java-liberty-springboot-jcics-app/build.gradle

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,10 @@ base
2020

2121
java
2222
{
23-
sourceCompatibility = JavaVersion.VERSION_17
24-
targetCompatibility = JavaVersion.VERSION_17
23+
toolchain
24+
{
25+
languageVersion = JavaLanguageVersion.of(java_version)
26+
}
2527
}
2628

2729

gradle.properties

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
1-
#
2-
# Values in this file provide defaults to variables used in the
3-
# gradle files.
4-
#
1+
# Gradle properties for CICS Java Liberty Spring Boot JCICS sample
52

6-
# Normally we don't publish any built artifacts to a repository.
7-
# But if we do, these are the default values we use to indicate
8-
# where the files should be placed.
9-
#
10-
# These can be over-ridden from the command line
11-
# with -Ppublish_repo_releases_url="file://my-folder" for example.
12-
#
13-
# These values only have any effect if the publish goal is used.
14-
# For example: gradle build publish.
15-
publish_repo_releases_url = 'default-value-for-publish_repo_releases_url'
16-
publish_repo_releases_name = 'default-value-for-publish_repo_releases_name'
17-
cicsJvmServer=DFHWLP
3+
# Java version for compilation and runtime
4+
java_version = 17
5+
6+
# Enable Gradle daemon for faster builds
7+
org.gradle.daemon=true
8+
9+
# Configure JVM arguments for Gradle daemon
10+
org.gradle.jvmargs=-Xmx2g -XX:MaxMetaspaceSize=512m
11+
12+
# Enable parallel builds
13+
org.gradle.parallel=true
14+
15+
# Configuration cache disabled - not compatible with CICS Bundle Plugin 1.0.8
16+
# Re-enable when plugin supports configuration cache in future versions
17+
# org.gradle.configuration-cache=true

pom.xml

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,20 @@
3333
<module>cics-java-liberty-springboot-jcics-cicsbundle</module>
3434
</modules>
3535

36-
</project>
36+
<!-- ================================================================ -->
37+
<!-- Build Configuration -->
38+
<!-- ================================================================ -->
39+
<build>
40+
<plugins>
41+
<!-- Maven Compiler Plugin with Toolchain Support -->
42+
<plugin>
43+
<groupId>org.apache.maven.plugins</groupId>
44+
<artifactId>maven-compiler-plugin</artifactId>
45+
<configuration>
46+
<release>${java.version}</release>
47+
</configuration>
48+
</plugin>
49+
</plugins>
50+
</build>
3751

38-
<!-- Made with Bob -->
52+
</project>

0 commit comments

Comments
 (0)