diff --git a/mule-artifact.json b/mule-artifact.json index 8a6b9da..6956424 100644 --- a/mule-artifact.json +++ b/mule-artifact.json @@ -1,3 +1,3 @@ { - "minMuleVersion": "4.3.0" + "minMuleVersion": "4.5.0" } \ No newline at end of file diff --git a/pom.xml b/pom.xml index 0a771ec..10d3f4d 100644 --- a/pom.xml +++ b/pom.xml @@ -1,10 +1,12 @@ - + 4.0.0 ORG_ID_TOKEN api-error-handler - 6.2.0 + 6.3.0 mule-extension API Error Handler @@ -19,9 +21,19 @@ https://maven.anypoint.mulesoft.com/api/v1/organizations/${project.groupId}/maven - 4.4.0 - 1.5.1 - 4.4.0 + 4.6.2 + 4.1.1 + 1.6.0-rc1 + 1.2.0 + 4.6.0-rc1 + 1.2.0 + 3.1.0 + 1.2.1 + + + src/test/munit + ${basedir}/target/test-mule/munit + 3.3.1 @@ -38,7 +50,7 @@ org.mule.runtime mule-module-extensions-xml-support - ${mule.version} + ${mule.module.extensions.xml.support.version} provided @@ -47,11 +59,60 @@ mule-module-spring-config-ee ${mule.version} provided + + + com.mulesoft.munit + mtf-tools + ${mtf.tools.version} + mule-plugin + test + + + com.mulesoft.munit + munit-runner + ${munit.version} + mule-plugin + test + + + com.mulesoft.munit + munit-tools + ${munit.version} + mule-plugin + test + + org.mule.weave + assertions + ${assertions.version} + test + + + maven-resources-plugin + ${maven.resources.plugin.version} + + + copy-munit-resources + process-test-resources + + copy-resources + + + ${munit.output.directory} + + + ${munit.input.directory} + true + + + + + + org.mule.runtime.plugins @@ -59,20 +120,34 @@ ${mule.extensions.maven.plugin.version} true - - - com.mulesoft.munit - munit-extensions-maven-plugin - - - - org.mule.runtime - mule-core - ${mule.version} - - - + + com.mulesoft.munit.tools + munit-maven-plugin + ${munit.version} + + + com.mulesoft.munit + munit-extensions-maven-plugin + ${munit.extensions.maven.plugin.version} + + + exec-munit-tests + integration-test + + test + + + + + + + ${minVersion} + EE + + + + diff --git a/src/main/resources/META-INF/mule-artifact/mule-artifact.json b/src/main/resources/META-INF/mule-artifact/mule-artifact.json new file mode 100644 index 0000000..8a45544 --- /dev/null +++ b/src/main/resources/META-INF/mule-artifact/mule-artifact.json @@ -0,0 +1,29 @@ +{ + "extensionModelLoaderDescriptor": { + "id": "xml-based", + "attributes": { + "validate-xml": false, + "resources-paths": [ + "module_error_handler_plugin/defaultErrors.dwl", + "module_error_handler_plugin/common.dwl" + ], + "resource-xml": "module-error-handler-plugin.xml" + } + }, + "name": "module-error-handler-plugin", + "requiredProduct": "MULE_EE", + "classLoaderModelLoaderDescriptor": { + "id": "mule", + "attributes": { + "exportedResources": [ + "module_error_handler_plugin/defaultErrors.dwl", + "module_error_handler_plugin/common.dwl" + ] + } + }, + "bundleDescriptorLoader": { + "id": "mule", + "attributes": {} + }, + "minMuleVersion": "4.5.0" +} \ No newline at end of file diff --git a/src/main/resources/module_error_handler_plugin/defaultErrors.dwl b/src/main/resources/module_error_handler_plugin/defaultErrors.dwl index 67725b7..3c228e0 100644 --- a/src/main/resources/module_error_handler_plugin/defaultErrors.dwl +++ b/src/main/resources/module_error_handler_plugin/defaultErrors.dwl @@ -111,7 +111,7 @@ fun getMessage(message) = "code":500, "reason": "Internal Server Error", // Don't provide default error description for expression errors as that is a potential security issue. - "message":vars.expressionError default "" + "message": vars.expressionError default "" }, "APIKIT:NOT_IMPLEMENTED": { "code": 501, diff --git a/src/test/munit/error-handler-plugin-test-suite.xml b/src/test/munit/error-handler-plugin-test-suite.xml new file mode 100644 index 0000000..fa3c52b --- /dev/null +++ b/src/test/munit/error-handler-plugin-test-suite.xml @@ -0,0 +1,920 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file