diff --git a/cli/ballerina-cli/src/main/java/io/ballerina/cli/cmd/BuildCommand.java b/cli/ballerina-cli/src/main/java/io/ballerina/cli/cmd/BuildCommand.java index 78ac00ead3c9..a42387625891 100644 --- a/cli/ballerina-cli/src/main/java/io/ballerina/cli/cmd/BuildCommand.java +++ b/cli/ballerina-cli/src/main/java/io/ballerina/cli/cmd/BuildCommand.java @@ -155,6 +155,10 @@ public BuildCommand() { @CommandLine.Option(names = "--cloud", description = "Enable cloud artifact generation") private String cloud; + @CommandLine.Option(names = "--remote-management", description = "enable service management tools in " + + "the executable JAR file(s).") + private Boolean remoteManagement; + @CommandLine.Option(names = "--list-conflicted-classes", description = "list conflicted classes when generating executable") private Boolean listConflictedClasses; @@ -302,6 +306,7 @@ private BuildOptions constructBuildOptions() { .setOffline(offline) .setObservabilityIncluded(observabilityIncluded) .setCloud(cloud) + .setRemoteManagement(remoteManagement) .setDumpBir(dumpBIR) .setDumpBirFile(dumpBIRFile) .setDumpGraph(dumpGraph) diff --git a/cli/ballerina-cli/src/main/java/io/ballerina/cli/cmd/RunCommand.java b/cli/ballerina-cli/src/main/java/io/ballerina/cli/cmd/RunCommand.java index 576ea213766a..debd61345784 100644 --- a/cli/ballerina-cli/src/main/java/io/ballerina/cli/cmd/RunCommand.java +++ b/cli/ballerina-cli/src/main/java/io/ballerina/cli/cmd/RunCommand.java @@ -86,6 +86,10 @@ public class RunCommand implements BLauncherCmd { "when run is used with a source file or a module.") private Boolean observabilityIncluded; + @CommandLine.Option(names = "--remote-management", description = "enable management service in the " + + "executable when run is used with a source file or a module.") + private Boolean remoteManagement; + @CommandLine.Option(names = "--sticky", description = "stick to exact versions locked (if exists)") private Boolean sticky; @@ -282,6 +286,7 @@ private BuildOptions constructBuildOptions() { .setSkipTests(true) .setTestReport(false) .setObservabilityIncluded(observabilityIncluded) + .setRemoteManagement(remoteManagement) .setSticky(sticky) .setDumpGraph(dumpGraph) .setDumpRawGraphs(dumpRawGraphs) diff --git a/cli/ballerina-cli/src/main/resources/cli-help/ballerina-build.help b/cli/ballerina-cli/src/main/resources/cli-help/ballerina-build.help index 2a1a891b2726..ae906187f976 100755 --- a/cli/ballerina-cli/src/main/resources/cli-help/ballerina-build.help +++ b/cli/ballerina-cli/src/main/resources/cli-help/ballerina-build.help @@ -59,6 +59,9 @@ OPTIONS --graalvm-build-options Additional build options to be passed to the GraalVM native image. + --remote-management + Include the dependencies that are required to enable remote package + management service. EXAMPLES diff --git a/compiler/ballerina-lang/src/main/java/io/ballerina/projects/BuildOptions.java b/compiler/ballerina-lang/src/main/java/io/ballerina/projects/BuildOptions.java index c43bf3201dc1..2844ee6637d3 100644 --- a/compiler/ballerina-lang/src/main/java/io/ballerina/projects/BuildOptions.java +++ b/compiler/ballerina-lang/src/main/java/io/ballerina/projects/BuildOptions.java @@ -103,6 +103,10 @@ public String cloud() { return this.compilationOptions.getCloud(); } + public boolean remoteManagement() { + return this.compilationOptions.remoteManagement(); + } + CompilationOptions compilationOptions() { return this.compilationOptions; } @@ -195,6 +199,7 @@ public BuildOptions acceptTheirs(BuildOptions theirOptions) { buildOptionsBuilder.setExportOpenAPI(compilationOptions.exportOpenAPI); buildOptionsBuilder.setExportComponentModel(compilationOptions.exportComponentModel); buildOptionsBuilder.setEnableCache(compilationOptions.enableCache); + buildOptionsBuilder.setRemoteManagement(compilationOptions.remoteManagement); return buildOptionsBuilder.build(); } @@ -387,6 +392,11 @@ public BuildOptionsBuilder setNativeImage(Boolean value) { return this; } + public BuildOptionsBuilder setRemoteManagement(Boolean value) { + compilationOptionsBuilder.setRemoteManagement(value); + return this; + } + public BuildOptions build() { CompilationOptions compilationOptions = compilationOptionsBuilder.build(); return new BuildOptions(testReport, codeCoverage, dumpBuildTime, skipTests, compilationOptions, diff --git a/compiler/ballerina-lang/src/main/java/io/ballerina/projects/CompilationOptions.java b/compiler/ballerina-lang/src/main/java/io/ballerina/projects/CompilationOptions.java index db9af53b69e8..a7214a614199 100644 --- a/compiler/ballerina-lang/src/main/java/io/ballerina/projects/CompilationOptions.java +++ b/compiler/ballerina-lang/src/main/java/io/ballerina/projects/CompilationOptions.java @@ -39,12 +39,14 @@ public class CompilationOptions { Boolean exportComponentModel; Boolean enableCache; Boolean disableSyntaxTree; + Boolean remoteManagement; CompilationOptions(Boolean offlineBuild, Boolean observabilityIncluded, Boolean dumpBir, Boolean dumpBirFile, String cloud, Boolean listConflictedClasses, Boolean sticky, Boolean dumpGraph, Boolean dumpRawGraphs, Boolean withCodeGenerators, Boolean withCodeModifiers, Boolean configSchemaGen, Boolean exportOpenAPI, - Boolean exportComponentModel, Boolean enableCache, Boolean disableSyntaxTree) { + Boolean exportComponentModel, Boolean enableCache, Boolean disableSyntaxTree, + Boolean remoteManagement) { this.offlineBuild = offlineBuild; this.observabilityIncluded = observabilityIncluded; this.dumpBir = dumpBir; @@ -61,6 +63,7 @@ public class CompilationOptions { this.exportComponentModel = exportComponentModel; this.enableCache = enableCache; this.disableSyntaxTree = disableSyntaxTree; + this.remoteManagement = remoteManagement; } public boolean offlineBuild() { @@ -123,6 +126,10 @@ public boolean enableCache() { return toBooleanDefaultIfNull(this.enableCache); } + boolean remoteManagement() { + return toBooleanDefaultIfNull(this.remoteManagement); + } + /** * Merge the given compilation options by favoring theirs if there are conflicts. * @@ -206,6 +213,11 @@ CompilationOptions acceptTheirs(CompilationOptions theirOptions) { } else { compilationOptionsBuilder.setEnableCache(this.enableCache); } + if (theirOptions.remoteManagement != null) { + compilationOptionsBuilder.setRemoteManagement(theirOptions.remoteManagement); + } else { + compilationOptionsBuilder.setRemoteManagement(this.remoteManagement); + } return compilationOptionsBuilder.build(); } @@ -260,6 +272,7 @@ public static class CompilationOptionsBuilder { private Boolean exportComponentModel; private Boolean enableCache; private Boolean disableSyntaxTree; + private Boolean remoteManagement; public CompilationOptionsBuilder setOffline(Boolean value) { offline = value; @@ -341,11 +354,16 @@ public CompilationOptionsBuilder setEnableCache(Boolean value) { return this; } + public CompilationOptionsBuilder setRemoteManagement(Boolean value) { + remoteManagement = value; + return this; + } + public CompilationOptions build() { return new CompilationOptions(offline, observabilityIncluded, dumpBir, dumpBirFile, cloud, listConflictedClasses, sticky, dumpGraph, dumpRawGraph, withCodeGenerators, withCodeModifiers, configSchemaGen, exportOpenAPI, - exportComponentModel, enableCache, disableSyntaxTree); + exportComponentModel, enableCache, disableSyntaxTree, remoteManagement); } } } diff --git a/compiler/ballerina-lang/src/main/java/io/ballerina/projects/JBallerinaBackend.java b/compiler/ballerina-lang/src/main/java/io/ballerina/projects/JBallerinaBackend.java index 1f734f97ea74..aecdaeea4012 100644 --- a/compiler/ballerina-lang/src/main/java/io/ballerina/projects/JBallerinaBackend.java +++ b/compiler/ballerina-lang/src/main/java/io/ballerina/projects/JBallerinaBackend.java @@ -334,7 +334,8 @@ public void performCodeGen(ModuleContext moduleContext, CompilationCache compila if (bLangPackage.getErrorCount() > 0) { return; } - CompiledJarFile compiledJarFile = jvmCodeGenerator.generate(bLangPackage); + boolean isRemoteMgtEnabled = moduleContext.project().buildOptions().compilationOptions().remoteManagement(); + CompiledJarFile compiledJarFile = jvmCodeGenerator.generate(bLangPackage, isRemoteMgtEnabled); if (compiledJarFile == null) { throw new IllegalStateException("Missing generated jar, module: " + moduleContext.moduleName()); } @@ -355,7 +356,8 @@ public void performCodeGen(ModuleContext moduleContext, CompilationCache compila } String testJarFileName = jarFileName + TEST_JAR_FILE_NAME_SUFFIX; - CompiledJarFile compiledTestJarFile = jvmCodeGenerator.generateTestModule(bLangPackage.testablePkgs.get(0)); + CompiledJarFile compiledTestJarFile = jvmCodeGenerator.generateTestModule(bLangPackage.testablePkgs.get(0), + isRemoteMgtEnabled); try { ByteArrayOutputStream byteStream = JarWriter.write(compiledTestJarFile, getAllResources(moduleContext)); compilationCache.cachePlatformSpecificLibrary(this, testJarFileName, byteStream); diff --git a/compiler/ballerina-lang/src/main/java/io/ballerina/projects/PackageCompilation.java b/compiler/ballerina-lang/src/main/java/io/ballerina/projects/PackageCompilation.java index c160bb9df7ec..910ff1b290e4 100644 --- a/compiler/ballerina-lang/src/main/java/io/ballerina/projects/PackageCompilation.java +++ b/compiler/ballerina-lang/src/main/java/io/ballerina/projects/PackageCompilation.java @@ -40,6 +40,7 @@ import static org.ballerinalang.compiler.CompilerOptionName.CLOUD; import static org.ballerinalang.compiler.CompilerOptionName.DUMP_BIR; import static org.ballerinalang.compiler.CompilerOptionName.DUMP_BIR_FILE; +import static org.ballerinalang.compiler.CompilerOptionName.REMOTE_MANAGEMENT; import static org.ballerinalang.compiler.CompilerOptionName.OBSERVABILITY_INCLUDED; import static org.ballerinalang.compiler.CompilerOptionName.OFFLINE; @@ -87,6 +88,7 @@ private void setCompilerOptions(CompilationOptions compilationOptions) { options.put(DUMP_BIR, Boolean.toString(compilationOptions.dumpBir())); options.put(DUMP_BIR_FILE, Boolean.toString(compilationOptions.dumpBirFile())); options.put(CLOUD, compilationOptions.getCloud()); + options.put(REMOTE_MANAGEMENT, Boolean.toString(compilationOptions.remoteManagement())); } static PackageCompilation from(PackageContext rootPackageContext, CompilationOptions compilationOptions) { diff --git a/compiler/ballerina-lang/src/main/java/io/ballerina/projects/PackageContext.java b/compiler/ballerina-lang/src/main/java/io/ballerina/projects/PackageContext.java index ed2f3541ca5e..842a7a9f7ee1 100644 --- a/compiler/ballerina-lang/src/main/java/io/ballerina/projects/PackageContext.java +++ b/compiler/ballerina-lang/src/main/java/io/ballerina/projects/PackageContext.java @@ -238,6 +238,7 @@ PackageCompilation getPackageCompilation(CompilationOptions compilationOptions) .setListConflictedClasses(this.compilationOptions.listConflictedClasses()) .setConfigSchemaGen(this.compilationOptions.configSchemaGen()) .setEnableCache(this.compilationOptions.enableCache()) + .setRemoteManagement(this.compilationOptions.remoteManagement()) .build(); CompilationOptions mergedOptions = options.acceptTheirs(compilationOptions); return PackageCompilation.from(this, mergedOptions); diff --git a/compiler/ballerina-lang/src/main/java/io/ballerina/projects/PackageResolution.java b/compiler/ballerina-lang/src/main/java/io/ballerina/projects/PackageResolution.java index 6403c329ea89..687055351a1b 100644 --- a/compiler/ballerina-lang/src/main/java/io/ballerina/projects/PackageResolution.java +++ b/compiler/ballerina-lang/src/main/java/io/ballerina/projects/PackageResolution.java @@ -223,7 +223,6 @@ private LinkedHashSet getModuleLoadRequestsOfDirectDependenci PackageDependencyScope.DEFAULT, DependencyResolutionType.COMPILER_PLUGIN); allModuleLoadRequests.add(c2cModuleLoadReq); } - return allModuleLoadRequests; } diff --git a/compiler/ballerina-lang/src/main/java/io/ballerina/projects/internal/ManifestBuilder.java b/compiler/ballerina-lang/src/main/java/io/ballerina/projects/internal/ManifestBuilder.java index 423fcdbce0ef..0a4a1212e722 100644 --- a/compiler/ballerina-lang/src/main/java/io/ballerina/projects/internal/ManifestBuilder.java +++ b/compiler/ballerina-lang/src/main/java/io/ballerina/projects/internal/ManifestBuilder.java @@ -691,7 +691,8 @@ private BuildOptions setBuildOptions(TomlTableNode tomlTableNode) { BuildOptions.OptionName.EXPORT_COMPONENT_MODEL.toString()); String graalVMBuildOptions = getStringFromBuildOptionsTableNode(tableNode, BuildOptions.OptionName.GRAAL_VM_BUILD_OPTIONS.toString()); - + Boolean remoteManagement = getBooleanFromBuildOptionsTableNode(tableNode, + CompilerOptionName.REMOTE_MANAGEMENT.toString()); buildOptionsBuilder .setOffline(offline) @@ -705,7 +706,8 @@ private BuildOptions setBuildOptions(TomlTableNode tomlTableNode) { .setEnableCache(enableCache) .setNativeImage(nativeImage) .setExportComponentModel(exportComponentModel) - .setGraalVMBuildOptions(graalVMBuildOptions); + .setGraalVMBuildOptions(graalVMBuildOptions) + .setRemoteManagement(remoteManagement); if (targetDir != null) { buildOptionsBuilder.targetDir(targetDir); diff --git a/compiler/ballerina-lang/src/main/java/org/ballerinalang/compiler/CompilerOptionName.java b/compiler/ballerina-lang/src/main/java/org/ballerinalang/compiler/CompilerOptionName.java index c9babfdb55e6..aeda554046c0 100644 --- a/compiler/ballerina-lang/src/main/java/org/ballerinalang/compiler/CompilerOptionName.java +++ b/compiler/ballerina-lang/src/main/java/org/ballerinalang/compiler/CompilerOptionName.java @@ -63,6 +63,7 @@ public enum CompilerOptionName { STICKY("sticky"), ENABLE_CACHE("enableCache"), + REMOTE_MANAGEMENT("remoteManagement"), /** * We've introduced this temporary option to support old-project structure and the new package structure. diff --git a/compiler/ballerina-lang/src/main/java/org/wso2/ballerinalang/compiler/bir/codegen/CodeGenerator.java b/compiler/ballerina-lang/src/main/java/org/wso2/ballerinalang/compiler/bir/codegen/CodeGenerator.java index e205def22412..eefc5e9da8c2 100644 --- a/compiler/ballerina-lang/src/main/java/org/wso2/ballerinalang/compiler/bir/codegen/CodeGenerator.java +++ b/compiler/ballerina-lang/src/main/java/org/wso2/ballerinalang/compiler/bir/codegen/CodeGenerator.java @@ -59,16 +59,16 @@ public static CodeGenerator getInstance(CompilerContext context) { return codeGenerator; } - public CompiledJarFile generate(BLangPackage bLangPackage) { + public CompiledJarFile generate(BLangPackage bLangPackage, boolean isRemoteMgtEnabled) { // generate module - return generate(bLangPackage.symbol); + return generate(bLangPackage.symbol, isRemoteMgtEnabled); } - public CompiledJarFile generateTestModule(BLangPackage bLangTestablePackage) { - return generate(bLangTestablePackage.symbol); + public CompiledJarFile generateTestModule(BLangPackage bLangTestablePackage, boolean isRemoteMgtEnabled) { + return generate(bLangTestablePackage.symbol, isRemoteMgtEnabled); } - private CompiledJarFile generate(BPackageSymbol packageSymbol) { + private CompiledJarFile generate(BPackageSymbol packageSymbol, boolean isRemoteMgtEnabled) { // Desugar BIR to include the observations JvmObservabilityGen jvmObservabilityGen = new JvmObservabilityGen(packageCache, symbolTable); jvmObservabilityGen.instrumentPackage(packageSymbol.bir); @@ -77,7 +77,8 @@ private CompiledJarFile generate(BPackageSymbol packageSymbol) { BIRGenUtils.rearrangeBasicBlocks(packageSymbol.bir); dlog.setCurrentPackageId(packageSymbol.pkgID); - final JvmPackageGen jvmPackageGen = new JvmPackageGen(symbolTable, packageCache, dlog, types); + final JvmPackageGen jvmPackageGen = new JvmPackageGen(symbolTable, packageCache, dlog, types, + isRemoteMgtEnabled); //Rewrite identifier names with encoding special characters HashMap originalIdentifierMap = JvmDesugarPhase.encodeModuleIdentifiers(packageSymbol.bir); diff --git a/compiler/ballerina-lang/src/main/java/org/wso2/ballerinalang/compiler/bir/codegen/JvmPackageGen.java b/compiler/ballerina-lang/src/main/java/org/wso2/ballerinalang/compiler/bir/codegen/JvmPackageGen.java index 18e2d95e4743..69a7f5f2154c 100644 --- a/compiler/ballerina-lang/src/main/java/org/wso2/ballerinalang/compiler/bir/codegen/JvmPackageGen.java +++ b/compiler/ballerina-lang/src/main/java/org/wso2/ballerinalang/compiler/bir/codegen/JvmPackageGen.java @@ -149,8 +149,10 @@ public class JvmPackageGen { private final Set dependentModules; private final BLangDiagnosticLog dlog; private final Types types; + private final boolean isRemoteMgtEnabled; - JvmPackageGen(SymbolTable symbolTable, PackageCache packageCache, BLangDiagnosticLog dlog, Types types) { + JvmPackageGen(SymbolTable symbolTable, PackageCache packageCache, BLangDiagnosticLog dlog, Types types, + boolean isRemoteMgtEnabled) { birFunctionMap = new HashMap<>(); globalVarClassMap = new HashMap<>(); dependentModules = new LinkedHashSet<>(); @@ -158,6 +160,7 @@ public class JvmPackageGen { this.packageCache = packageCache; this.dlog = dlog; this.types = types; + this.isRemoteMgtEnabled = isRemoteMgtEnabled; methodGen = new MethodGen(this, types); initMethodGen = new InitMethodGen(symbolTable); configMethodGen = new ConfigMethodGen(); @@ -757,7 +760,8 @@ CompiledJarFile generate(BIRPackage module, boolean isEntry) { rewriteRecordInits(module.typeDefs); // generate object/record value classes - JvmValueGen valueGen = new JvmValueGen(module, this, methodGen, typeHashVisitor, types); + JvmValueGen valueGen = new JvmValueGen(module, this, methodGen, typeHashVisitor, types, + isRemoteMgtEnabled); JvmCastGen jvmCastGen = new JvmCastGen(symbolTable, jvmTypeGen, types); valueGen.generateValueClasses(jarEntries, jvmConstantsGen, jvmTypeGen); diff --git a/compiler/ballerina-lang/src/main/java/org/wso2/ballerinalang/compiler/bir/codegen/JvmValueGen.java b/compiler/ballerina-lang/src/main/java/org/wso2/ballerinalang/compiler/bir/codegen/JvmValueGen.java index 2896b81c0c2e..f3ab9ffb1af7 100644 --- a/compiler/ballerina-lang/src/main/java/org/wso2/ballerinalang/compiler/bir/codegen/JvmValueGen.java +++ b/compiler/ballerina-lang/src/main/java/org/wso2/ballerinalang/compiler/bir/codegen/JvmValueGen.java @@ -136,13 +136,13 @@ public class JvmValueGen { private final Types types; JvmValueGen(BIRNode.BIRPackage module, JvmPackageGen jvmPackageGen, MethodGen methodGen, - TypeHashVisitor typeHashVisitor, Types types) { + TypeHashVisitor typeHashVisitor, Types types, boolean isRemoteMgtEnabled) { this.module = module; this.jvmPackageGen = jvmPackageGen; this.methodGen = methodGen; this.booleanType = jvmPackageGen.symbolTable.booleanType; this.jvmRecordGen = new JvmRecordGen(jvmPackageGen.symbolTable); - this.jvmObjectGen = new JvmObjectGen(); + this.jvmObjectGen = new JvmObjectGen(isRemoteMgtEnabled); this.typeHashVisitor = typeHashVisitor; this.types = types; } @@ -205,8 +205,8 @@ void generateValueClasses(Map jarEntries, JvmConstantsGen jvmCon if (optionalTypeDef.type.tag == TypeTags.OBJECT && Symbols.isFlagOn(optionalTypeDef.type.tsymbol.flags, Flags.CLASS)) { BObjectType objectType = (BObjectType) optionalTypeDef.type; - this.createObjectValueClasses(objectType, className, optionalTypeDef, jvmConstantsGen - , asyncDataCollector, jarEntries); + this.createObjectValueClasses(objectType, className, optionalTypeDef, jvmConstantsGen, + asyncDataCollector, jarEntries); } else if (bType.tag == TypeTags.RECORD) { BRecordType recordType = (BRecordType) bType; byte[] bytes = this.createRecordValueClass(recordType, className, optionalTypeDef, jvmConstantsGen diff --git a/compiler/ballerina-lang/src/main/java/org/wso2/ballerinalang/compiler/bir/codegen/split/values/JvmObjectGen.java b/compiler/ballerina-lang/src/main/java/org/wso2/ballerinalang/compiler/bir/codegen/split/values/JvmObjectGen.java index 332b75474f98..a1c9f7976836 100644 --- a/compiler/ballerina-lang/src/main/java/org/wso2/ballerinalang/compiler/bir/codegen/split/values/JvmObjectGen.java +++ b/compiler/ballerina-lang/src/main/java/org/wso2/ballerinalang/compiler/bir/codegen/split/values/JvmObjectGen.java @@ -83,6 +83,12 @@ */ public class JvmObjectGen { + private final boolean isRemoteMgtEnabled; + + public JvmObjectGen(boolean isRemoteMgtEnabled) { + this.isRemoteMgtEnabled = isRemoteMgtEnabled; + } + static final FieldNameHashComparator FIELD_NAME_HASH_COMPARATOR = new FieldNameHashComparator(); public void createAndSplitCallMethod(ClassWriter cw, List functions, String objClassName, @@ -196,8 +202,9 @@ public void createAndSplitCallMethod(ClassWriter cw, List f } } - private static boolean isListenerAttach(BIRNode.BIRFunction func) { - return func.name.value.equals("attach") && Symbols.isFlagOn(func.parameters.get(0).type.flags, Flags.SERVICE); + private boolean isListenerAttach(BIRNode.BIRFunction func) { + return isRemoteMgtEnabled && func.name.value.equals("attach") + && Symbols.isFlagOn(func.parameters.get(0).type.flags, Flags.SERVICE); } public void createAndSplitGetMethod(ClassWriter cw, Map fields, String className, diff --git a/misc/semver-checker/modules/semver-checker-core/src/main/java/io/ballerina/semver/checker/util/PackageUtils.java b/misc/semver-checker/modules/semver-checker-core/src/main/java/io/ballerina/semver/checker/util/PackageUtils.java index a2115615fc3d..d32d80315c1e 100644 --- a/misc/semver-checker/modules/semver-checker-core/src/main/java/io/ballerina/semver/checker/util/PackageUtils.java +++ b/misc/semver-checker/modules/semver-checker-core/src/main/java/io/ballerina/semver/checker/util/PackageUtils.java @@ -117,7 +117,8 @@ private static BuildOptions constructDefaultBuildOptions() { .setSticky(false) .setDumpGraph(false) .setDumpRawGraphs(false) - .setConfigSchemaGen(false); + .setConfigSchemaGen(false) + .setRemoteManagement(false); return buildOptionsBuilder.build(); } diff --git a/project-api/project-api-test/src/test/java/io/ballerina/projects/test/TestBuildProject.java b/project-api/project-api-test/src/test/java/io/ballerina/projects/test/TestBuildProject.java index 78e186d19481..1ddfd280ebe6 100644 --- a/project-api/project-api-test/src/test/java/io/ballerina/projects/test/TestBuildProject.java +++ b/project-api/project-api-test/src/test/java/io/ballerina/projects/test/TestBuildProject.java @@ -486,6 +486,7 @@ public void testLoadingBuildOptionsFromToml() { Assert.assertFalse(project.buildOptions().codeCoverage()); Assert.assertFalse(project.buildOptions().offlineBuild()); Assert.assertFalse(project.buildOptions().testReport()); + Assert.assertTrue(project.buildOptions().remoteManagement()); } @Test(description = "tests loading a valid build project with build options from toml") diff --git a/project-api/project-api-test/src/test/resources/projectWithBuildOptions/Ballerina.toml b/project-api/project-api-test/src/test/resources/projectWithBuildOptions/Ballerina.toml index fabe906a48b7..c110281273e3 100644 --- a/project-api/project-api-test/src/test/resources/projectWithBuildOptions/Ballerina.toml +++ b/project-api/project-api-test/src/test/resources/projectWithBuildOptions/Ballerina.toml @@ -7,3 +7,4 @@ version = "0.1.0" b7aConfigFile="/tmp/ballerina.conf" observabilityIncluded = true skipTests=true +remoteManagement=true