Skip to content

Commit a55e62b

Browse files
Merge branch 'MS2026-02-17-ACB' into W-21232676-Replace-Dev-Agent-with-MuleSoft-Vibes-CP
2 parents 094ac28 + 26a05ed commit a55e62b

11 files changed

Lines changed: 271 additions & 41 deletions

modules/ROOT/nav.adoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
** xref:start-add-folders.adoc[]
1313
** xref:start-open-output-panel.adoc[]
1414
** xref:start-scm.adoc[]
15+
** xref:start-workspaces.adoc[]
1516
1617
// TUTORIALS
1718
* xref:tutorials.adoc[]
Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
= Configure External Libraries for Mule Projects
2+
:page-deployment-options: cloud-ide, desktop-ide
3+
4+
External libraries are project-level dependencies that Mule applications require to support certain connectors and components, such as Database connectors or Spring-based components.
5+
Anypoint Code Builder provides a guided interface to add, edit, and delete external libraries, and automatically manages the corresponding entries in the project POM file.
6+
7+
External library configurations apply at the project level. Any change to a configured library affects all components in the project that require that library.
8+
9+
== Before You Begin
10+
11+
* xref:start-acb.adoc[].
12+
* xref:int-create-integrations.adoc[].
13+
* Add a connector or component that requires an external library, such as a Database or Spring component.
14+
15+
== When You Need to Configure an External Library
16+
17+
Anypoint Code Builder prompts you to configure an external library when you add or configure a component that requires additional dependencies.
18+
For example, this can occur when you:
19+
20+
* Add a Database connector connection
21+
* Configure a Spring-based component
22+
* Use a custom component that depends on external libraries
23+
24+
You can also manage external libraries from the project-level configuration, independent of a specific component.
25+
26+
== Add an External Library
27+
28+
You can add an external library from the component configuration or from the project-level library configuration interface.
29+
30+
Add external libraries from one of these sources:
31+
32+
* Recommended libraries
33+
* Maven dependencies
34+
* Local files
35+
36+
Open the library configuration interface from a component:
37+
38+
. In the canvas, select a component that requires an external library.
39+
. In the component configuration panel, locate the *Required Libraries* list.
40+
. Click the *Configure library* icon.
41+
+
42+
Anypoint Code Builder opens the *Library Configuration* page.
43+
Changes made on this page apply to the entire project.
44+
45+
=== Add a Recommended Library
46+
47+
Some components provide recommended libraries that match the component requirements.
48+
49+
. Open the *Library Configuration* page.
50+
. Select *Recommended Library*.
51+
+
52+
The interface shows the library to add to the project.
53+
. Click *Apply*.
54+
+
55+
The IDE adds the recommended library to the project POM file and applies it to all components that require it.
56+
57+
=== Add a Maven Dependency
58+
59+
Search Maven Central or manually specify Maven coordinates to add a dependency.
60+
61+
. Open the *Library Configuration* page.
62+
. Select *Maven Dependency*.
63+
. In the *Search Maven Central Repository* field, search for a dependency or enter the required Maven fields manually.
64+
. Specify values for *Group ID*, *Artifact ID*, and *Version*.
65+
. Optionally, configure additional fields such as *Scope*.
66+
. Click *Apply*.
67+
68+
Only libraries that meet the required criteria appear in component library fields after configuration.
69+
70+
=== Add a Library from a Local File
71+
72+
Add a dependency from a local file, such as a JAR or an external POM file.
73+
74+
. Open the *Library Configuration* page.
75+
. Select *Local File*.
76+
. Select a file from your system.
77+
+
78+
Anypoint Code Builder automatically populates the Maven fields based on the selected file.
79+
. Override the populated values if required.
80+
. Click *Apply*.
81+
82+
If you select an external POM file, it takes precedence over any POM embedded in the artifact file.
83+
84+
== Edit or Delete an External Library
85+
86+
Edit or remove an existing library configuration.
87+
88+
. Open the *Library Configuration* page.
89+
. Select the configured library.
90+
. Use the available actions to update or delete the library.
91+
+
92+
Deleting a library removes it from the project POM file and affects all components that use the library.

modules/ROOT/pages/af-create-agent-network.adoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,3 +55,4 @@ If you run operations within a CI/CD environment, you can use Anypoint CLI's plu
5555
== See Also
5656

5757
* xref:af-define-your-agent-network-specification.adoc[]
58+
* xref:start-workspaces.adoc[]

modules/ROOT/pages/des-create-api-specs.adoc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -283,9 +283,11 @@ If you created an OAS 3.0 (YAML) project, you can replace the initial spec with
283283

284284
== See Also
285285

286+
286287
* xref:start-acb.adoc[]
287288
* xref:tutorials.adoc[]
288289
* xref:access-management::business-groups.adoc[]
289290
* xref:start-discover-ui.adoc#use-autocomplete[Use Auto-Complete in the Editors]
290291
* xref:tut-af-design-am-flights-api.adoc[] Tutorial
291-
* xref:des-delete-api-projects.adoc[]
292+
* xref:des-delete-api-projects.adoc[]
293+
* xref:start-workspaces.adoc[]

modules/ROOT/pages/imp-implement-local-apis.adoc

Lines changed: 5 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,9 @@ For your projects to work properly, the `.code-workspace` file _must not reside_
3636

3737
In addition, Anypoint Code Builder permits only one pair of iterative design and implementation project folders per multi-root workspace.
3838

39-
For more information, see https://code.visualstudio.com/docs/editor/multi-root-workspaces[Multi-root Workspaces^] in the VS Code documentation.
39+
For general information about using workspaces in Anypoint Code Builder, see xref:start-workspaces.adoc[].
40+
41+
For more information about VS Code workspaces, see https://code.visualstudio.com/docs/editor/multi-root-workspaces[Multi-root Workspaces^] in the VS Code documentation.
4042

4143

4244
== Before You Begin
@@ -120,7 +122,7 @@ which you then implement within a Mule application.
120122
You can switch between the spec and the implementation project in the Explorer view.
121123

122124

123-
To close your multi-root workspace, see <<close-workspace>>.
125+
To close or reopen your workspace later, see xref:start-workspaces.adoc[Working with Workspaces].
124126

125127

126128
[[rescaffold-api-spec]]
@@ -143,42 +145,7 @@ After you see the message that your project was rescaffolded successfully, navig
143145
//TODO:
144146
// ADD NOTE ABOUT caveats for rescaffolding AsyncAPI specs?
145147

146-
[[close-workspace]]
147-
== Close a Multi-Root Workspace
148-
149-
To close the workspace:
150-
151-
// Pointer to Command Palette
152-
include::partial$acb-reusable-steps.adoc[tags="open-command-palette"]
153-
. Select the following command:
154-
+
155-
[source,command]
156-
----
157-
Workspaces: Close Workspace
158-
----
159-
160-
After closing, you can reopen a synchronized project from the workspace that you created when implementing the API.
161-
See <<open-workspace>>.
162-
163-
[[open-workspace]]
164-
== Open a Multi-Root Workspace
165-
166-
To open a multi-root workspace from the `.code-workspace` file:
167-
168-
// Pointer to Command Palette
169-
include::partial$acb-reusable-steps.adoc[tags="open-command-palette"]
170-
. Select the following command:
171-
+
172-
[source,command]
173-
----
174-
File: Open Workspace from File...
175-
----
176-
. Navigate to your home directory and double-click the `.code-workspace` file for the workspace.
177-
+
178-
The projects open in the Explorer view, and the folder name for the multi-root workspace includes *(WORKSPACE)*, for example:
179-
+
180-
image::imp-local-api-open-workspace.png["A multi-root workspace in Explorer view"]
181-
182148
== See Also
183149

150+
* xref:start-workspaces.adoc[]
184151
* xref:tut-local-api-specification.adoc[] Tutorial

modules/ROOT/pages/int-create-integrations.adoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,7 @@ The file's canvas provides the same options for building your project file that
130130

131131
== See Also
132132

133+
* xref:start-workspaces.adoc[]
133134
* xref:acb-reference.adoc[]
134135
* xref:int-work-with-code-snippets.adoc[]
135136
* xref:debugging-mule-apps.adoc[]

modules/ROOT/pages/int-import-mule-project.adoc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,3 +183,8 @@ include::partial$acb-open-packaged-sources.adoc[tags="open-workspace-root"]
183183
include::partial$acb-open-packaged-sources.adoc[tags="load-project"]
184184
//step: test project
185185
include::partial$acb-open-packaged-sources.adoc[tags="test-project"]
186+
187+
== See Also
188+
189+
* xref:start-workspaces.adoc[]
190+
* xref:int-export-mule-project.adoc[]

modules/ROOT/pages/int-migrate-studio-to-acb.adoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,5 @@ include::partial$acb-project-migration.adoc[tag="import-mule-project-into-acb"]
2020

2121
== See Also
2222

23+
* xref:start-workspaces.adoc[]
2324
* xref:int-import-mule-project.adoc[]
Lines changed: 161 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,161 @@
1+
= Working with Workspaces
2+
:page-deployment-options: cloud-ide, desktop-ide
3+
4+
include::reuse::partial$beta-banner.adoc[tag="anypoint-code-builder"]
5+
6+
Organize your Mule projects in workspaces to ensure all Anypoint Code Builder features work correctly. Workspaces help you manage multiple related projects and avoid build-time and design-time issues.
7+
8+
[[valid-setups]]
9+
== Valid Setups for Anypoint Code Builder
10+
11+
Anypoint Code Builder requires one of the following project configurations to function properly:
12+
13+
* A single Mule project open at the root of your directory
14+
* A multi-root workspace pointing directly to one or more Mule projects
15+
16+
If your directory structure doesn't meet these requirements, Anypoint Code Builder displays a message with steps to resolve the issue, such as opening a Mule project or creating a workspace. See <<fix-nested-project>>.
17+
18+
[[create-project-workspace]]
19+
== Create a Project in a Workspace
20+
21+
When you create a new project, add it to a workspace. With this setup you can add more projects later without restructuring your environment.
22+
23+
To create a project in a workspace:
24+
25+
. Start the project creation process using one of the following methods:
26+
+
27+
** From the *Quick Actions* menu, select the project type.
28+
+
29+
For example, *Design an API* or *Develop an Integration*.
30+
** From the Command Palette, run the appropriate command.
31+
+
32+
For example, `MuleSoft: Design an API`.
33+
** Ask MuleSoft Vibes to create the project using natural language.
34+
35+
. In the project creation form, select *Create in workspace*.
36+
. Complete the remaining project configuration options.
37+
. Click *Create Project*.
38+
+
39+
Anypoint Code Builder creates the project and adds it to a workspace. If no workspace is open, a new workspace is created.
40+
41+
[[import-studio-workspace]]
42+
== Import an Anypoint Studio Workspace
43+
44+
If you have existing projects in Anypoint Studio, you can import your Studio workspace into Anypoint Code Builder.
45+
46+
To import a Studio workspace:
47+
48+
// Pointer to Command Palette
49+
include::partial$acb-reusable-steps.adoc[tags="open-command-palette"]
50+
. Select the following command:
51+
+
52+
[source,command]
53+
----
54+
MuleSoft: Import Studio Workspace
55+
----
56+
. Navigate to the location of your Studio workspace and select it.
57+
. Choose a location to save the new workspace file.
58+
+
59+
Anypoint Code Builder creates a workspace that references your existing Studio projects. Changes made to the original Studio workspace are automatically reflected in Anypoint Code Builder.
60+
61+
[[switch-workspaces]]
62+
== Open and Switch Between Workspaces
63+
64+
You can open or switch between workspaces using the menu, the Command Palette, or MuleSoft Vibes.
65+
66+
=== Open a Workspace Manually
67+
68+
. Open the workspace file using one of these methods:
69+
+
70+
* From the menu bar, select *File* > *Open Workspace from File...*.
71+
* From the Command Palette, run the command `File: Open Workspace from File...`.
72+
. Navigate to the location where you saved the `.code-workspace` file (for example, your home directory or a dedicated workspaces folder), and select it.
73+
+
74+
The projects open in the Explorer view, and the folder name for the workspace includes *(WORKSPACE)* to indicate that you're working in a multi-root workspace:
75+
+
76+
image::imp-local-api-open-workspace.png["A multi-root workspace in Explorer view"]
77+
78+
=== Open a Workspace with MuleSoft Vibes
79+
80+
You can ask MuleSoft Vibes to switch workspaces using natural language prompts, such as:
81+
82+
* "Open my American Flights workspace"
83+
* "Switch to the `<YourWorkspaceName>` workspace"
84+
85+
[[close-workspace]]
86+
== Close a Workspace
87+
88+
To close the current workspace:
89+
90+
// Pointer to Command Palette
91+
include::partial$acb-reusable-steps.adoc[tags="open-command-palette"]
92+
. Select the following command:
93+
+
94+
[source,command]
95+
----
96+
Workspaces: Close Workspace
97+
----
98+
99+
[[actions-in-workspaces]]
100+
== Actions in Workspaces
101+
102+
Anypoint Code Builder organizes actions based on their scope:
103+
104+
[cols="1,2"]
105+
|===
106+
| Action Type | Location
107+
108+
| *Global actions*
109+
| Always available from the Command Palette. These actions don't depend on a specific project, such as creating a new project, importing assets from Exchange, or opening Anypoint Code Builder settings.
110+
111+
| *Project-specific actions*
112+
| Available from the context menu (right-click) in the Explorer view. These actions apply to a specific project, such as running, debugging, deploying, or exporting a project.
113+
|===
114+
115+
When working with multiple projects in a workspace, select the target project before running project-specific actions. For example, when you run or debug, you must select which project in the workspace to execute.
116+
117+
[[workspace-file]]
118+
== Workspace File Location
119+
120+
VS Code stores workspace configuration in a file with the `.code-workspace` extension. This file maps the folders for your projects.
121+
122+
[IMPORTANT]
123+
====
124+
The `.code-workspace` file must not reside within any of your project folders. Save it in a separate directory, such as your home directory or a dedicated workspaces folder.
125+
====
126+
127+
[[fix-nested-project]]
128+
== Fix a Nested Project Error
129+
130+
This error appears when you open a folder that contains your Mule project instead of opening the project directly, and that folder isn't configured as a multi-root workspace.
131+
132+
To fix this issue, open the project folder at the root level or add it to a multi-root workspace.
133+
134+
=== Open the Project at the Root
135+
136+
If you're working with a single project, open it directly so it appears at the top level of the Explorer view.
137+
138+
. From the menu bar, select *File* > *Open Folder...*.
139+
. Navigate to your Mule project's root folder (the folder containing the `pom.xml` file).
140+
. Select the folder and click *Open*.
141+
+
142+
The project now appears at the top level of the Explorer view, and Anypoint Code Builder features are available.
143+
144+
=== Add the Project to a Multi-Root Workspace
145+
146+
If you want to keep your current folder structure or work with multiple projects, create a multi-root workspace that points directly to your Mule project.
147+
148+
. From the menu bar, select *File* > *Add Folder to Workspace...*.
149+
. Navigate to your Mule project's root folder and select it.
150+
. When prompted, save the workspace file (`.code-workspace`) to a location outside of your project folders.
151+
+
152+
The project appears in the Explorer view with the *(WORKSPACE)* indicator, and Anypoint Code Builder features are available.
153+
154+
TIP: If you frequently work with multiple projects, creating a workspace from the start avoids this issue. See <<create-project-workspace>>.
155+
156+
== See Also
157+
158+
* xref:imp-implement-local-apis.adoc[Iteratively Design and Implement APIs]
159+
* xref:int-create-integrations.adoc[Creating Integrations]
160+
* xref:des-create-api-specs.adoc[Creating and Importing API Specifications]
161+
* https://code.visualstudio.com/docs/editor/multi-root-workspaces[Multi-root Workspaces^] in the VS Code documentation

modules/ROOT/pages/troubleshoot-loading-errors.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ File: Open Folder...
6363
+
6464
The root is the top-level folder that Anypoint Code Builder generates when it creates a project. Do not navigate to the project's parent or ancestor directory or to one of its child or descendant directories.
6565

66-
See also xref:int-import-mule-project.adoc[].
66+
See also xref:int-import-mule-project.adoc[] and xref:start-workspaces.adoc[].
6767

6868
[[mule-dx]]
6969
== Mule DX API Component Was Not Installed

0 commit comments

Comments
 (0)