
Skill
dependency-and-decompilation-analysis
analyze MuleSoft dependencies and decompiled Java code
Description
Rules for discovering, analysing, and classifying missing dependencies during MuleSoft flow analysis. Covers JAR/Java decompilation, Maven dependency analysis, custom module classification, and what blocks migration.
SKILL.md
Skill: Dependency and Decompilation Analysis
Purpose: Authoritative rules for discovering and classifying dependencies during MuleSoft flow analysis. Follow exactly.
1. Dependency Discovery
Call migration_listArtifacts with category="custom-code" to find all .jar, .java, .dwl, .xml, .raml, .properties, .yaml files.
Also examine:
pom.xmlfor Maven dependencies — especially those withclassifier=mule-plugin(Mule connectors).mule-artifact.jsonfor exported resources and class loader settings.src/main/java/for custom Java classes.src/main/resources/for DataWeave modules (.dwl), property files, and API specs.
1.1 Mandatory Coverage Guardrails NO FALSE NEGATIVES
- Build the dependency candidate list from artifact inventory and source references, not from a root-folder file loop.
- Do NOT assume "all root
.jarfiles were decompiled" means dependency analysis is complete. - Treat any class/library referenced by flow-used code as a dependency candidate until explicitly resolved.
- If a referenced library cannot be located in scanned source artifacts or
pom.xml, mark it missing (fail-closed).
Anti-pattern to avoid:
- Scanning only the workspace root for
.jarfiles and concluding dependency closure from that result.
2. Java Class / JAR Analysis Procedure
2.1 When to Decompile
Do NOT blindly decompile every .jar in the source folder. Instead, decompile on demand when a JAR/class reference is encountered during analysis:
- A Mule flow references a custom Java component (transformer, message processor, interceptor)
- A DataWeave expression calls a Java function
- A
pom.xmldependency withclassifier=mule-pluginhas no standard Logic Apps equivalent - A class is imported but its
.javasource is not insrc/main/java/
2.2 How to Decompile
When you decide a JAR needs decompilation:
- If
.javasource files exist undersrc/main/java/, read them directly — no decompilation needed. - For JAR files without source, attempt decompilation:
- Run
cfr <JarPath> --outputdir out/__decompiled__/<JarName>/in the terminal. - Alternatively, use
jar xf <JarPath>to extract and then decompile.classfiles.
- Run
- ALWAYS write decompilation output to
out/__decompiled__/in the current migration workspace directory. NEVER write to the source folder or any other external location. - Read the decompiled
.javafiles to understand classes, methods, and business rules. - If decompilation fails (obfuscated, native), mark it as a critical missing dependency.
2.3 Recursive Dependency Tree Resolution IMPORTANT
After decompiling a JAR, inspect what IT depends on and walk the full tree:
- Read the decompiled code — look for
importstatements, type references, and method calls that reference other libraries. - For each referenced library, check if it exists in the source folder (as
.jar,.java, or inpom.xml). - If it is a
.jarin the source folder but not yet decompiled — decompile it too (repeat from §2.2). - If that child JAR itself references more JARs — continue recursively.
- Stop recursion when a dependency is:
- Already decompiled, OR
- A standard Mule/Java runtime library (
org.mule.*,java.*,javax.*), OR - Not found in the source folder → mark as missing dependency.
2.4 Decompilation Checklist
Before moving to dependency classification, confirm:
- Every JAR referenced by flow artifacts has been decompiled (or its source code is available)
- Every child JAR discovered inside decompiled code has also been traced recursively
- Custom transformers, message processors, and interceptors are fully understood
- Shared utility classes referenced by multiple flows are catalogued
2.5 Verification Gates Before "No Missing Dependencies"
You MUST pass all gates below before storing an empty missingDependencies array:
- Reference-to-artifact gate: every non-runtime import/type referenced by flow-used classes maps to one of:
- source code present, OR
- decompiled JAR present, OR
- explicit missing dependency entry.
- Instantiation/call-site gate: if code contains constructor calls or casts to external types (e.g.,
new CustomService(),(ICustomService)factory.create()), the implementing library is mandatory. - Import/type gate: an
importof a custom package with no resolvable artifact is NOT ignored; it must be justified as unused by symbol-level evidence or marked missing. - Flow relevance gate: unresolved dependencies in code paths executed by the analyzed flow are
migrationRelevant=true; if they block non-stub implementation, setseverity=criticalandblocksMigration=true.
If any gate fails, do NOT return zero missing dependencies.
3. Source vs Decompiled Precedence
- If the source code (
.java,.dwlfiles) for a referenced class/module is PRESENT in the scanned source folder (listed as dependency artifacts), do NOT mark it as a missing dependency — the conversion agent can use the source code directly. - Only mark a dependency as missing when NEITHER source code NOR understandable decompiled code is available.
- Presence of a package/import reference alone does not resolve dependency status; resolution requires source/decompiled implementation availability.
4. What Counts as Missing
- JAR files whose source code is NOT found in the source folder.
- Custom Mule connectors (non-standard
mule-plugindependencies) without source. - Custom Java components (transformers, message processors, interceptors) without source.
- External RAML/OAS API specifications not present in the project.
- DataWeave modules imported from external libraries not present locally.
- Third-party connector dependencies without a Logic Apps equivalent and no source code.
- MuleSoft Enterprise connectors that require specific licensing (SAP, Salesforce, etc.) — flag as needing equivalent Azure connectors.
- Configuration/certificates/connection strings needed for target environment.
- Anypoint Platform dependencies (API Manager policies, Object Store V2, CloudHub properties).
5. Classification
Each missing dependency MUST have:
| Field | Type | Description |
|---|---|---|
id | string | Unique identifier |
name | string | Dependency name |
type | string | jar/java-class/dwl-module/connector/raml/schema/api-spec/property-file/custom-code/other |
origin | string | standard-mule-runtime/standard-mule-connector/mulesoft-enterprise/third-party/custom/unknown |
severity | string | critical/warning/info |
referencedBy | array | Artifact names that reference this dependency |
reason | string | Why it is needed |
blocksMigration | boolean | True if prevents complete non-stub implementation |
migrationRelevant | boolean | False for build-only or design-time-only dependencies (e.g. MUnit test dependencies) |
resolution | string | MUST follow format: "Add the source code or binary for {name} to the migration source folder and re-run discovery." Do NOT suggest code changes or workarounds — the user must provide the missing artifact. |
Also provide: summary (string), allCriticalResolved (boolean), counts ({ critical, warning, info }).
5.1 Fail-Closed Decision Rule
When evidence is incomplete or ambiguous, default to marking the dependency as missing with appropriate severity rather than reporting full resolution.
A "no missing dependencies" conclusion is valid only when all verification gates in §2.5 pass with explicit evidence.
More skills from the logicapps-migration-agent repository
View all 12 skillsanalyse-source-design
analyze TIBCO flow architecture
Jul 12ArchitectureAzureCode AnalysisDiagramscloud-deployment-and-testing
deploy and test Azure Logic Apps
Jul 12AzureBicepDeploymentReporting +1connections-json-generation-rules
generate connections.json files for Logic Apps
Jul 12AutomationAzureConfigurationWorkflow Automationconversion-task-plan-rules
generate ordered conversion task plans
Jul 12AzureMigrationOperationsPlanningdetect-logical-groups
group MuleSoft integration artifacts
Jul 12ArchitectureAzureMigrationdotnet-local-functions-logic-apps
create .NET local functions for Logic Apps
Jul 12.NETAPI DevelopmentAutomationAzure
More from Azure (Microsoft)
View publisherazure-arg-external-evaluation-policy-author
author and test Azure Resource Graph policies
azure-policy
Jul 12AzureComplianceGovernancePolicyazure-blueprints-migration
migrate Azure Blueprints to Template Specs
azure-blueprints
Jul 12AzureDeploymentInfrastructure as CodeMigrationapiview-feedback-resolution
resolve APIView feedback on Azure SDKs
azure-sdk-tools
Jul 12API DevelopmentAzureCode ReviewDocumentationazsdk-common-live-and-recorded-tests
deploy resources and run Azure SDK tests
azure-sdk-tools
Jul 12AzureDeploymentSDKTestingazsdk-common-prepare-release-plan
manage Azure SDK release plan work items
azure-sdk-tools
Jul 12AzureGitHubProject ManagementSDKazsdk-common-sdk-release
release Azure SDK packages
azure-sdk-tools
Jul 12AzureCI/CDDeploymentSDK