Skip to content

Commit 7576891

Browse files
committed
Merge branch 'feature-mcp-server-32827' of github.com:ttmunyunguma/open-liberty into feature-mcp-server-32827
2 parents a98320a + 290bc37 commit 7576891

File tree

3 files changed

+44
-22
lines changed

3 files changed

+44
-22
lines changed
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
/*******************************************************************************
2+
* Copyright (c) 2025 IBM Corporation and others.
3+
* All rights reserved. This program and the accompanying materials
4+
* are made available under the terms of the Eclipse Public License 2.0
5+
* which accompanies this distribution, and is available at
6+
* http://www.eclipse.org/legal/epl-2.0/
7+
*******************************************************************************/
8+
configurations {
9+
cdi40 {
10+
canBeResolved = true
11+
}
12+
}
13+
14+
artifacts {
15+
cdi40(file('build/libs/io.openliberty.jakarta.cdi.4.0.jar'))
16+
}

dev/io.openliberty.mcp.internal_fat/.classpath

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@
55
<attribute name="test" value="true"/>
66
</attributes>
77
</classpathentry>
8+
<classpathentry kind="src" path="noParamTest">
9+
<attributes>
10+
<attribute name="test" value="true"/>
11+
</attributes>
12+
</classpathentry>
813
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-17">
914
<attributes>
1015
<attribute name="module" value="true"/>

dev/io.openliberty.mcp.internal_fat/build.gradle

Lines changed: 23 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -15,37 +15,38 @@ apply from: '../wlp-gradle/subprojects/repos.gradle'
1515
configurations.requiredLibs {
1616
transitive = false
1717
}
18+
19+
sourceSets {
20+
// Source set where we don't include parameter names
21+
noParamNamesTest {
22+
java {
23+
srcDirs = ['noParamTest']
24+
}
25+
}
26+
}
27+
1828
dependencies {
1929
requiredLibs 'org.json:json:20080701',
2030
'org.skyscreamer:jsonassert:2.0-rc1'
31+
noParamNamesTestCompileOnly project(':io.openliberty.mcp'),
32+
project(path: ':io.openliberty.jakarta', configuration: 'cdi40')
33+
implementation sourceSets.noParamNamesTest.output
2134
}
35+
2236
/* Added to allow method parmaters to be available for MCP Tool Server*/
2337
// Allow us to test getting the name of a tool argument directly from the Java
2438
compileJava {
25-
options.compilerArgs << '-parameters'
26-
}
27-
28-
sourceSets {
29-
main {
30-
java {
31-
srcDirs = ['fat/src']
32-
}
33-
}
34-
noParamNamesTest {
35-
java {
36-
srcDirs = ['noParamTest']
37-
}
38-
compileClasspath += sourceSets.main.compileClasspath
39-
runtimeClasspath += sourceSets.main.runtimeClasspath + output
40-
}
39+
options.compilerArgs << '-parameters'
4140
}
4241

43-
task noParamNamesTest(type: Test) {
44-
description = "Compiles without -parameters"
45-
46-
testClassesDirs = sourceSets.noParamNamesTest.output.classesDirs
42+
// Build the noParamNamesTest code into a jar
43+
tasks.register('noParamNamesTestJar', Jar) {
44+
dependsOn noParamNamesTestClasses
45+
from sourceSets.noParamNamesTest.output
46+
archiveFileName = 'noParamNamesTest.jar'
4747
}
4848

49-
tasks.named("compileNoParamNamesTestJava"){
50-
options.compilerArgs.remove('-parameters')
49+
// Build the noParamNamesTest jar before the autoFVT zip so that it gets included in the zip
50+
tasks.named('autoFVT') {
51+
dependsOn noParamNamesTestJar
5152
}

0 commit comments

Comments
 (0)