Dependency and build updates - #186
Conversation
adesjardin
commented
Apr 14, 2026
- Updated gradle version to 9.4.1
- Updated Groovy to 4.0.31
- Updated all dependency and plugin versions
- Updated sample applications to Mule 4.9
- Updated build to Java 17
- Updated version to 2.0.0-SNAPSHOT
- Upgrade Gradle wrapper from 8.1.1 to 8.14.3 - Replace deprecated maven-plugin-development plugin with org.gradlex 1.0.3 - Upgrade shadow plugin to com.gradleup.shadow 8.3.9 - Upgrade Maven plugin tools to 3.13.1 Performance fixes: - Fix test hangs caused by Maven effective-POM generation - Add mule.linter.skipEffectivePom system property for tests - Enable build cache, parallel execution, and configuration cache - Add Develocity build scan support with TOS agreement Gradle 9.x compatibility: - Fix Groovy DSL property assignment syntax - Update testLogging configuration to use assignment syntax Resolves #plan/01-upgrade-and-verify
Add .classpath, .project, .settings/, and bin/ directories to prevent IDE-generated files from being committed
- Upgrade Gradle wrapper from 8.14.3 to 9.4.1 (latest 9.x release) - Fix multi-string notation deprecation for Gradle 10 compatibility - Update groovy-all dependency to use single-string notation with @pom Tests pass cleanly with no deprecation warnings
- Upgrade Groovy from 3.0.19 to 4.0.31 - Change Maven groupId from org.codehaus.groovy to org.apache.groovy - Upgrade Spock from 2.3-groovy-3.0 to 2.4-groovy-4.0 This aligns the application Groovy version with Gradle 9's internal Groovy 4.x
Gradle optimizations: - Add GC optimizations (-XX:+UseParallelGC, -XX:MaxGCPauseMillis=200) - Enable configuration cache max-problems setting - Add dependency verification lenient mode - Add system properties for HTTPS protocols and Groovy optimizations Dependency updates: - gson: 2.10.1 → 2.11.0 - org.json: 20230227 → 20231013 - snakeyaml: 2.0 → 2.3 - maven-invoker: 3.0.1 → 3.1.0 - velocity-engine-core: 2.3 → 2.4.1 - picocli: 4.7.4 → 4.7.6 Build optimizations: - Add shadow jar caching - Enable forked compilation for Groovy and Java - Optimize JVM args for compilation tasks - Add Develocity build logging capture - Add dependency resolution metadata optimization
Update repository configurations in sample Mule projects: - anypoint-exchange: v1 → v3 (https://maven.anypoint.mulesoft.com/api/v3/maven) - avio-maven: old devops URL → avio.jfrog.io (https://avio.jfrog.io/artifactory/mulesoft-virtual/) This fixes the repository configuration that was causing Maven to hang when resolving effective POMs.
Add missing repositories required for proper Maven resolution: - mulesoft-public: https://repository.mulesoft.org/nexus/content/repositories/public - mulesoft-ee-releases: https://repository.mulesoft.org/nexus-ee/content/repositories/releases-ee/
Update core sample project to latest stable versions: - Mule runtime: 4.2.2 -> 4.9.16 - mule-maven-plugin: 3.3.5 -> 4.1.0 - MUnit: 2.2.1 -> 3.6.3 - maven-resources-plugin: 3.1.0 -> 3.3.1 - HTTP connector: 1.3.2 -> 1.10.3 - Sockets connector: 1.1.2 -> 1.2.5 - Secure config module: 1.0.2 -> 1.2.7 - APIKit: 1.1.9 -> 1.11.1 - MongoDB connector: 5.3.3 -> 7.2.1 - DB connector: 1.5.5 -> 1.14.13 - ObjectStore: 1.1.3 -> 1.2.2 - JMS connector: 1.6.2 -> 1.9.3 - MySQL driver: 8.0.16 -> 8.0.33 (new coordinates) - ActiveMQ: 5.15.16 -> 5.18.3
Update mule-linter-core sample project: - Mule runtime: 4.2.2 -> 4.9.16 - mule-maven-plugin: 3.3.5 -> 4.1.0 (latest stable for public repos) - MUnit: 2.2.1 -> 3.6.3 - maven-resources-plugin: 3.1.0 -> 3.3.1 - All Mule connectors updated to latest versions - MySQL driver: updated to 8.0.33 with new coordinates com.mysql:mysql-connector-j - ActiveMQ: 5.15.16 -> 5.18.3
- Update mule-maven-plugin to 4.6.0 - Update custom logger to 3.1.1 with new groupId com.avioconsulting.mule - Migrate XML files from avio-core to avio-logger namespace - Update MongoDB config for connector 6.3.1 - Fix sample flow structure - Add Sonatype plugin repository - Add Log4j dependencies - BUILD SUCCESS with Java 17
- Update spi-test sample to match core sample: - mule-maven-plugin: 3.3.5 -> 4.6.0 - MUnit: 2.2.1 -> 3.6.3 - All connector versions updated - Custom logger: Exchange -> Maven Central (com.avioconsulting.mule:3.1.1) - Migrate XML from avio-core to avio-logger namespace - Add Sonatype plugin repository - Add Log4j dependencies - Fix test expectations for new versions: - MunitVersionRuleTest: 2.2.1 -> 3.6.3 - MunitPluginVersionRuleTest: 2.2.1 -> 3.6.3 - MuleMavenPluginVersionRuleTest: 3.3.5 -> 4.6.0 - MuleRuntimeVersionRuleTest: 4.2.2 -> 4.9.16 - PomPropertyValueRuleTest: 2.2.1 -> 3.6.3 - Both sample apps now build successfully with Maven 3.9.x and Java 17 - All 196 tests pass
…est classes Consolidated 15 scattered POM test files into 4 organized test classes: New Test Files: - PomVersionRuleTest (24 tests): Mule Maven Plugin, MUnit, Runtime, APIKit, dependency versions - PomPropertyRuleTest (16 tests): Property validation, plugin attributes, MUnit plugin, POM existence - PomManagementRuleTest (9 tests): dependencyManagement, pluginManagement, parent POM structure - EffectivePomIntegrationTest (11 tests): Effective POM generation, PomFile API access Test Infrastructure: - Added ComprehensiveParentSample with parent/child POM fixtures - Enhanced TestApplication with addComprehensiveParentSample(), useEffectivePomGeneration(), addMinimalPom() - All POM tests now use embedded strings or parent-child structure for isolated, fast execution Deleted Files (15): - MuleMavenPluginVersionRuleTest, MunitVersionRuleTest, MunitPluginVersionRuleTest - MuleRuntimeVersionRuleTest, ApikitVersionRuleTest, PomDependencyVersionRuleTest - PomPropertyValueRuleTest, PomArtifactAttributeRuleTest, PomExistsRuleTest - MunitMavenPluginAttributesRuleTest, PropertyNamePatternRuleTest - PropertyFileNamingRuleTest, PropertyFilePropertyCountRuleTest - HostnamePropertyRuleTest, EncryptedPasswordRuleTest Documentation: - Updated AGENTS.md with consolidated POM test structure documentation Total: 60 tests consolidated into 4 files
…consolidation
The following property file tests were incorrectly deleted during the
POM test consolidation. These tests verify property file (.properties and
.yaml) behavior, NOT POM.xml behavior, and are distinct from POM tests:
Restored Tests:
- PropertyNamePatternRuleTest (6 tests): Validates property naming conventions
(snake_case, camelCase, kebab-case) in .properties and .yaml files
- PropertyFileNamingRuleTest (3 tests): Validates property file naming patterns
like ${env}.properties and ${env}.yaml
- PropertyFilePropertyCountRuleTest (4 tests): Validates consistent property
counts across environment-specific property files
- HostnamePropertyRuleTest (5 tests): Validates that hostnames are domain names
not IP addresses, with exemptions support
- EncryptedPasswordRuleTest (4 tests): Validates password encryption format
(![...]==) and secure property placeholders
All 22 tests pass successfully.
Note: These property file tests are distinct from POM tests and test
configuration property files in src/main/resources/properties/
Fixed two issues with the Gradle build configuration:
1. mule-linter.maven-publish-conventions.gradle:
- Changed 'artifact groovydocJar' to 'artifact tasks.named('groovydocJar')'
- This enables lazy evaluation for configuration cache compatibility
2. mule-linter.groovy-common-conventions.gradle:
- Removed restrictive 'onlyIf' condition that prevented groovydocJar from building
- Improved task graph detection to properly trigger groovydocJar during publish
Verification:
- All module tests pass (mule-linter-spi, mule-linter-spi-test, mule-linter-maven-plugin)
- CLI distribution tasks work (installDist, shadowDistTar, shadowDistZip)
- Publishing to staging repository now works with configuration cache enabled
There was a problem hiding this comment.
Pull request overview
This PR modernizes the build/tooling stack (Gradle/Groovy/dependencies), updates Mule sample app fixtures to Mule 4.9, and refactors POM-related tests/fixtures while adding build performance/scanning configuration.
Changes:
- Upgraded Gradle wrapper, Groovy/Spock stack, and various dependency/plugin versions; added Gradle performance/configuration settings.
- Added Develocity build scan configuration and repository resolution tweaks in
settings.gradle. - Updated Mule sample-app test fixtures (XML + POMs) and consolidated/expanded POM rule tests, including optional effective-POM generation behavior.
Reviewed changes
Copilot reviewed 47 out of 48 changed files in this pull request and generated 15 comments.
Show a summary per file
| File | Description |
|---|---|
settings.gradle |
Adds Develocity plugin + build scan config and dependency resolution management. |
gradle/wrapper/gradle-wrapper.properties |
Upgrades Gradle wrapper to 9.4.1. |
gradle.properties |
Enables Gradle perf features (parallel, caching, configuration cache, JVM args, etc.). |
.github/workflows/build.yml |
Sets CI Java version to 17. |
buildSrc/build.gradle |
Updates buildSrc plugin deps (maven-plugin-development, shadow); test deps still present. |
buildSrc/src/main/groovy/mule-linter.groovy-common-conventions.gradle |
Moves Groovy/Spock to Groovy 4 + Spock 2.4; adds test/perf/task-graph logic. |
buildSrc/src/main/groovy/mule-linter.app-conventions.gradle |
Switches Shadow plugin id and adds shadowJar configuration. |
buildSrc/src/main/groovy/mule-linter.maven-plugin-conventions.gradle |
Switches maven plugin dev plugin id and bumps maven plugin tooling deps. |
buildSrc/src/main/groovy/mule-linter.maven-publish-conventions.gradle |
Updates published groovydoc artifact wiring. |
mule-linter-core/build.gradle |
Bumps core deps; adds incremental generateGDSL task and conditional wiring. |
mule-linter-core/src/main/groovy/com/avioconsulting/mule/linter/model/MuleApplication.groovy |
Adds opt-out for effective-POM generation, adds Maven-invoker timeout, and fallback behavior. |
mule-linter-core/version.properties |
Bumps module version metadata to 2.0.0-SNAPSHOT. |
mule-linter-core/src/test/groovy/com/avioconsulting/mule/linter/TestApplication.groovy |
Adds helpers/fixtures for parent-child POM samples and effective-POM toggling. |
mule-linter-core/src/test/groovy/com/avioconsulting/mule/linter/model/EffectivePomIntegrationTest.groovy |
Adds integration tests around effective-POM access patterns. |
mule-linter-core/src/test/groovy/com/avioconsulting/mule/linter/rule/pom/PomVersionRuleTest.groovy |
New consolidated POM version rule tests. |
mule-linter-core/src/test/groovy/com/avioconsulting/mule/linter/rule/pom/PomPropertyRuleTest.groovy |
New consolidated POM property/plugin-attribute tests. |
mule-linter-core/src/test/groovy/com/avioconsulting/mule/linter/rule/pom/PomManagementRuleTest.groovy |
New consolidated dependencyManagement/pluginManagement tests. |
mule-linter-core/src/test/groovy/com/avioconsulting/mule/linter/rule/pom/PomPropertyValueRuleTest.groovy |
Removed in favor of consolidated POM tests. |
mule-linter-core/src/test/groovy/com/avioconsulting/mule/linter/rule/pom/PomExistsRuleTest.groovy |
Removed in favor of consolidated POM tests. |
mule-linter-core/src/test/groovy/com/avioconsulting/mule/linter/rule/pom/PomDependencyVersionRuleTest.groovy |
Removed in favor of consolidated POM tests. |
mule-linter-core/src/test/groovy/com/avioconsulting/mule/linter/rule/pom/PomArtifactAttributeRuleTest.groovy |
Removed in favor of consolidated POM tests. |
mule-linter-core/src/test/groovy/com/avioconsulting/mule/linter/rule/pom/MunitVersionRuleTest.groovy |
Removed in favor of consolidated POM tests. |
mule-linter-core/src/test/groovy/com/avioconsulting/mule/linter/rule/pom/MunitPluginVersionRuleTest.groovy |
Removed in favor of consolidated POM tests. |
mule-linter-core/src/test/groovy/com/avioconsulting/mule/linter/rule/pom/MunitMavenPluginAttributesRuleTest.groovy |
Removed in favor of consolidated POM tests. |
mule-linter-core/src/test/groovy/com/avioconsulting/mule/linter/rule/pom/MuleRuntimeVersionRuleTest.groovy |
Removed in favor of consolidated POM tests. |
mule-linter-core/src/test/groovy/com/avioconsulting/mule/linter/rule/pom/MuleMavenPluginVersionRuleTest.groovy |
Removed in favor of consolidated POM tests. |
mule-linter-core/src/test/groovy/com/avioconsulting/mule/linter/rule/pom/ApikitVersionRuleTest.groovy |
Removed in favor of consolidated POM tests. |
mule-linter-core/src/test/resources/SampleMuleApp/pom.xml |
Updates sample Mule app POM to Mule 4.9.x + dependency bumps/repos. |
mule-linter-core/src/test/resources/SampleMuleApp/src/main/mule/global-config.xml |
Updates namespaces/config to avio-logger + connector config adjustments. |
mule-linter-core/src/test/resources/SampleMuleApp/src/main/mule/sample-mule-app-api.xml |
Updates namespaces/schemaLocation and flow content for Mule 4.9 fixture. |
mule-linter-core/src/test/resources/ComprehensiveParentSample/parent/pom.xml |
Adds new parent POM fixture for effective-POM inheritance testing. |
mule-linter-core/src/test/resources/ComprehensiveParentSample/child/pom.xml |
Adds new child POM fixture for effective-POM inheritance testing. |
mule-linter-spi/build.gradle |
Bumps SnakeYAML version. |
mule-linter-spi/version.properties |
Bumps module version metadata to 2.0.0-SNAPSHOT. |
mule-linter-spi-test/version.properties |
Bumps module version metadata to 2.0.0-SNAPSHOT. |
mule-linter-spi-test/src/test/resources/SampleMuleApp/pom.xml |
Updates SPI-test sample Mule app POM to Mule 4.9.x + dependency bumps/repos. |
mule-linter-spi-test/src/test/resources/SampleMuleApp/src/main/mule/global-config.xml |
Updates SPI-test namespaces/config to avio-logger + connector config adjustments. |
mule-linter-spi-test/src/test/resources/SampleMuleApp/src/main/mule/sample-mule-app-api.xml |
Updates SPI-test namespaces/schemaLocation and flow content for Mule 4.9 fixture. |
mule-linter-maven-plugin/version.properties |
Bumps module version metadata to 2.0.0-SNAPSHOT. |
mule-linter-cli/build.gradle |
Bumps picocli-groovy version. |
mule-linter-cli/version.properties |
Bumps module version metadata to 2.0.0-SNAPSHOT. |
AGENTS.md |
Adds agent-oriented repo/build/test guidance (currently mentions Java 8). |
.gitignore |
Adds ignore rules for Eclipse/IDE metadata. |
.project |
Adjusts Eclipse filtered resource regex pattern. |
.settings/org.eclipse.buildship.core.prefs |
Adds Buildship settings (includes machine-specific paths/JDK). |
plans/01-upgrade-and-verify.md |
Adds upgrade plan documentation. |
plans/02-spi-java-and-rule-loading.md |
Adds SPI migration/rule-loading redesign plan documentation. |
plans/03-cli-to-java.md |
Adds CLI-to-Java migration plan documentation. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| // Note: reports.html.required syntax is OK - 'required' is a Property<Boolean>, not a direct boolean | ||
|
|
||
| // Timeout for individual tests (prevent hanging tests) | ||
| timeout = Duration.ofMinutes(5) |
There was a problem hiding this comment.
timeout = Duration.ofMinutes(5) uses Duration without an import/qualification. Groovy build scripts don’t implicitly import java.time.Duration, so this is likely to fail script compilation. Use java.time.Duration.ofMinutes(5) or add import java.time.Duration at the top of the script.
| timeout = Duration.ofMinutes(5) | |
| timeout = java.time.Duration.ofMinutes(5) |
| /** | ||
| * Enable effective POM generation for tests. | ||
| * Clears the skip flag so MuleApplication uses effective POM | ||
| */ | ||
| void useEffectivePomGeneration() { | ||
| System.clearProperty('mule.linter.skipEffectivePom') | ||
| } |
There was a problem hiding this comment.
useEffectivePomGeneration() clears a JVM-global system property but never restores it. Because tests run in the same fork/JVM, a single test enabling effective POM generation can make subsequent tests unexpectedly attempt Maven resolution (slow/flaky/offline failures). Consider returning the previous value and restoring it in cleanup(), or provide a scoped helper (e.g., execute a closure with effective POM enabled and then restore).
| - Build system: Gradle. | ||
| - Language mix: mostly Groovy, plus a small Java-based Maven plugin module. | ||
| - Test framework: Spock on JUnit Platform. | ||
| - Java toolchain: Java 8. |
There was a problem hiding this comment.
AGENTS.md states the repo uses a Java 8 toolchain, but this PR (and CI) indicate Java 17. Update this guide to match the actual build/toolchain decision so agents and contributors don’t use the wrong JDK.
| - Java toolchain: Java 8. | |
| - Java toolchain: Java 17. |
| </http:error-response> | ||
| </http:listener> | ||
| <avio-logger:log doc:name="INFO HTTP Request Recieved" doc:id="3d47742d-9593-4f30-a5a9-f449bada1951" config-ref="avio-core-logging-config" correlationId="#[correlationId]" message='#["HTTPS Request Received: " ++ attributes.method ++ " " ++ attributes.requestUri]' includeLocationInfo="true" category="com.avioconsulting.mulelinter" /> | ||
| <avio-logger:log doc:name="INFO HTTP Request Recieved" doc:id="3d47742d-9593-4f30-a5a9-f449bada1951" config-ref="AVIO_Logger_Config" correlationId="#[correlationId]" message='#["HTTPS Request Received: " ++ attributes.method ++ " " ++ attributes.requestUri]' includeLocationInfo="true" category="com.avioconsulting.mulelinter" /> |
There was a problem hiding this comment.
Typo in doc:name: "Recieved" should be "Received".
Build Configuration Fixes (6 issues): Issue #1: Remove outputs.upToDateWhen { true } from test task - This was causing tests to be skipped when they should run - Removed the line that marked tests as always up-to-date Issue #2: Add Duration import to buildSrc convention - Added 'import java.time.Duration' at top of file - Fixes compilation error for test timeout configuration Issue #3: Align Java toolchain with CI (Java 17) - Changed toolchain from Java 8 to Java 17 in groovy-common-conventions.gradle - Matches CI workflow (.github/workflows/build.yml) Java version Issue #4 & #10: Remove gradle.taskGraph access for configuration cache compatibility - In buildSrc/groovy-common-conventions.gradle: Replaced taskGraph.whenReady with startParameter check - In mule-linter-core/build.gradle: Removed taskGraph.hasTask and taskGraph.whenReady, simplified to direct dependency - These changes enable Gradle configuration cache to work properly Issue #7: Align Spock version with Groovy 4 in buildSrc - Updated buildSrc/build.gradle from spock-bom:2.2-groovy-3.0 to 2.4-groovy-4.0 - Matches the Groovy 4 version used by rest of project Documentation/Environment Fixes (3 issues): Issue #9: Remove machine-specific settings file - Deleted .settings/org.eclipse.buildship.core.prefs (was already git-ignored via .settings/) - File contained absolute paths and local JDK configuration Issue #11: Make Develocity scans conditional on CI - Changed publishing.onlyIf from { true } to check CI environment variables - Only publishes scans when CI=true or GITHUB_ACTIONS is set - Prevents leaking local development build data Issue #12: Update AGENTS.md Java version to 17 - Changed documentation from Java 8 to Java 17 to match actual build configuration All changes verified with successful build.
Issue #5: System property restoration in TestApplication - Added previousSkipEffectivePomValue field to store previous property value - Modified useEffectivePomGeneration() to save previous value before clearing - Added cleanup() method to restore system property after tests - Prevents test pollution where one test's effective POM setting affects others Issue #6: Silent fallback on Maven failure in MuleApplication - Changed getEffectivePomFile() to throw RuntimeException instead of silently falling back - Provides clear error message with Maven exit code and troubleshooting hint - Fail-fast approach prevents rules from silently operating on incomplete POM data Issue #8: Temp file leak on Maven exception - Moved deleteOnExit() registration immediately after temp file creation - Wrapped Maven invocation in try-catch to ensure temp file cleanup on exception - Prevents effective-pom temp files from accumulating in /tmp on Maven failures All changes verified with successful build.
Issue #13: Update test config-ref names to match fixture naming convention - Changed all occurrences of 'avio-core-logging-config' to 'AVIO_Logger_Config' - Updated 5 test files (19 occurrences total): * FlowErrorHandlerRuleTest.groovy * LoggerAttributesRuleTest.groovy * LoggerCategoryExistsRuleTest.groovy * LoggerMessageContentsRuleTest.groovy * LoggerMessageExistsRuleTest.groovy - Now consistent with SampleMuleApp fixture naming (AVIO Logger v2 convention) Issue #14: Confirm Mule runtime 4.6.0 compatibility - Build passes with mule.maven.plugin.version 4.6.0 - All tests validated against updated runtime version Issue #15: Document externalized property expectations - Added comments to global-config.xml in both test fixtures explaining that ${http.host} and ${http.port} are intentionally externalized - Clarifies these are expected to be provided via properties files at runtime - Linter parses XML structure only, does not require resolved values All changes verified with successful build.
Issue #5: System property restoration in TestApplication - Added previousSkipEffectivePomValue field to store previous property value - Modified useEffectivePomGeneration() to save previous value before clearing - Added cleanup() method to restore system property after tests - Prevents test pollution where one test's effective POM setting affects others Issue #6: Silent fallback on Maven failure in MuleApplication - Changed getEffectivePomFile() to throw RuntimeException instead of silently falling back - Provides clear error message with Maven exit code and troubleshooting hint - Fail-fast approach prevents rules from silently operating on incomplete POM data Issue #8: Temp file leak on Maven exception - Moved deleteOnExit() registration immediately after temp file creation - Wrapped Maven invocation in try-catch to ensure temp file cleanup on exception - Prevents effective-pom temp files from accumulating in /tmp on Maven failures All changes verified with successful build.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 53 out of 54 changed files in this pull request and generated 4 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| } | ||
|
|
||
| def cleanup() { | ||
| testApp.remove() |
There was a problem hiding this comment.
useEffectivePomGeneration() clears the mule.linter.skipEffectivePom system property, but the spec’s cleanup only calls testApp.remove() and never restores the property. This can leak state into later tests and cause them to unexpectedly attempt effective-POM generation (hang/fail depending on Maven/network). Call testApp.cleanup() (property restore) in the Spock cleanup() method (ideally in a finally), or fold the restoration into TestApplication.remove() so it always happens.
| testApp.remove() | |
| try { | |
| testApp.cleanup() | |
| } finally { | |
| testApp.remove() | |
| } |
Issue #15 & #16: Add @IgnoreIf for Maven availability - Added @IgnoreIf annotation to skip tests when Maven not configured - Tests require maven.home system property or MAVEN_HOME environment variable - Prevents test failures on machines without Maven or network access Issue #17: Fix typo 'occured' -> 'occurred' - Fixed typo in FlowErrorHandlerRuleTest error message Issue #18: Remove onlyIf from generateGDSL task - Removed onlyIf predicate that could cause stale GDSL output - Now relies on Gradle's inputs/outputs up-to-date checking only Issue #19: Add system property cleanup in EffectivePomIntegrationTest - Added testApp.cleanup() call before testApp.remove() to restore system properties - Prevents state leakage to subsequent tests All fixes verified with successful build.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 53 out of 54 changed files in this pull request and generated 9 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| <http:body><![CDATA[#[payload]]]></http:body> | ||
| </http:error-response> | ||
| </http:listener> | ||
| <avio-logger:log doc:name="INFO HTTP Request Recieved" doc:id="3d47742d-9593-4f30-a5a9-f449bada1951" config-ref="AVIO_Logger_Config" correlationId="#[correlationId]" message='#["HTTPS Request Received: " ++ attributes.method ++ " " ++ attributes.requestUri]' includeLocationInfo="true" category="com.avioconsulting.mulelinter" /> |
There was a problem hiding this comment.
Typo in doc:name: “Recieved” should be “Received”. Since this string is user-facing in sample configs/tests, fixing it avoids propagating the misspelling.
| arguments=--init-script /home/adesjard/.cache/opencode/bin/jdtls/config_linux/org.eclipse.osgi/58/0/.cp/gradle/init/init.gradle | ||
| auto.sync=false | ||
| build.scans.enabled=false | ||
| connection.gradle.distribution=GRADLE_DISTRIBUTION(WRAPPER) | ||
| connection.project.dir= | ||
| eclipse.preferences.version=1 | ||
| gradle.user.home= | ||
| java.home=/Library/Java/JavaVirtualMachines/adoptopenjdk-16.jdk/Contents/Home | ||
| java.home=/home/adesjard/.sdkman/candidates/java/21.0.2-graalce | ||
| jvm.arguments= |
There was a problem hiding this comment.
This Buildship prefs file contains developer-machine specific absolute paths (e.g., init-script under /home/... and a local java.home). These values are not portable and will break other contributors’ IDE imports; they also risk leaking local environment details. Remove this file from version control (and keep it ignored), or replace it with a repo-wide, machine-agnostic configuration if one is actually required.
| <?xml version="1.0" encoding="UTF-8"?> | ||
| <projectDescription> | ||
| <name>mule-linter</name> | ||
| <comment>Project mule-linter created by Buildship.</comment> | ||
| <projects> | ||
| </projects> | ||
| <buildSpec> | ||
| <buildCommand> | ||
| <name>org.eclipse.buildship.core.gradleprojectbuilder</name> | ||
| <arguments> | ||
| </arguments> | ||
| </buildCommand> | ||
| </buildSpec> | ||
| <natures> | ||
| <nature>org.eclipse.buildship.core.gradleprojectnature</nature> | ||
| </natures> | ||
| <filteredResources> | ||
| <filter> | ||
| <id>1634743890935</id> | ||
| <id>1776107304972</id> | ||
| <name></name> | ||
| <type>30</type> | ||
| <matcher> | ||
| <id>org.eclipse.core.resources.regexFilterMatcher</id> | ||
| <arguments>node_modules|.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__</arguments> | ||
| <arguments>node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__</arguments> | ||
| </matcher> |
There was a problem hiding this comment.
The repository now ignores .project, but this file is still tracked and has IDE-generated identifiers/regex settings that are workspace-specific. To avoid churn and accidental IDE state sharing, remove .project from version control (git rm) and rely on the .gitignore entry.
| copyFileFromBaseApp(PomFile.POM_XML) | ||
| // Create a simplified pom.xml for tests to avoid slow effective-pom generation | ||
| // The real MuleApplication constructor will use effective-pom which tries to download | ||
| // dependencies from MuleSoft repositories, causing tests to hang |
There was a problem hiding this comment.
addPom() now includes comments saying it creates a simplified pom.xml to avoid effective-POM generation, but the method only copies the sample POM and doesn’t modify it. Either implement the simplification (or switch to addMinimalPom(...)) or remove/adjust the comment to match the actual behavior so future readers don’t assume a performance optimization that isn’t happening.
| copyFileFromBaseApp(PomFile.POM_XML) | |
| // Create a simplified pom.xml for tests to avoid slow effective-pom generation | |
| // The real MuleApplication constructor will use effective-pom which tries to download | |
| // dependencies from MuleSoft repositories, causing tests to hang | |
| // Copy the sample application's pom.xml into the temporary test app. | |
| // This method does not simplify or rewrite the POM; tests that need a | |
| // different POM structure should use a dedicated test fixture method. | |
| copyFileFromBaseApp(PomFile.POM_XML) |
| File resourceFile = new File(resource.file) | ||
| new File(targetDir, resourceFile.name) << resourceFile.text |
There was a problem hiding this comment.
copyFileFromResource builds a File from resource.file, which can be URL-encoded (spaces, etc.) and can behave unexpectedly across platforms. Prefer converting via resource.toURI() (or using getResourceAsStream and copying) to ensure the resource resolves reliably.
| File resourceFile = new File(resource.file) | |
| new File(targetDir, resourceFile.name) << resourceFile.text | |
| String resourceName = resourcePath.tokenize('/').last() | |
| File targetFile = new File(targetDir, resourceName) | |
| resource.openStream().withCloseable { inputStream -> | |
| targetFile.withOutputStream { outputStream -> | |
| outputStream << inputStream | |
| } | |
| } |
| outputs.file(outputGdslFile) | ||
| } | ||
|
|
||
| // Wire GDSL generation to jar task (only runs if onlyIf condition is met) |
There was a problem hiding this comment.
The comment says generateGDSL “only runs if onlyIf condition is met”, but the task is always wired via jar.dependsOn(generateGDSL) and there is no onlyIf predicate. Either add the intended onlyIf (e.g., behind a -PgenerateDocs/-PgenerateGdsl flag) or update the comment to reflect that it always runs when building the jar.
| // Wire GDSL generation to jar task (only runs if onlyIf condition is met) | |
| // Wire GDSL generation to the jar task; execution is controlled by Gradle up-to-date checks |
| // Add timeout to prevent hanging | ||
| setTimeoutInSeconds(60) | ||
| it |
There was a problem hiding this comment.
The Maven invoker timeout is hard-coded to 60 seconds. On slower networks or first-time dependency resolution, generating an effective POM can legitimately take longer, so this can introduce flaky failures. Consider making the timeout configurable (system property/env var) and/or using a higher default.