Code Monkey home page Code Monkey logo

mule-maven-plugin's Introduction

Mule Artifact Tools

The project contains all the modules required to create Mule artifacts and to deploy them to the different environments of the Anypoint Platform.

Modules

  • mule-classloader-model

  • mule-packager

  • mule-deployer

  • mule-maven-plugin

  • mule-artifact-it

mule-classloader-model

Contains the abstract model which describes the descriptor files used when generating a repository for heavy weight packages

mule-packager

Contains the Java API that allows you to create the different Mule artifacts:

  • mule-application

  • mule-policy

  • mule-domain

  • mule-domain-bundle

It also contains a set of validators to ensure that the artifact can be generated properly

mule-deployer

Contains the Java API that allows you to deploy the Mule artifacts to the different environments

mule-maven-plugin

Is the Maven Plugin that provides Maven integration. Through it you can package different Mule artifacts and deploy them to both Nexus Servers and the different Anypoint Environments.

mule-artifact-it

Contains the integration tests for the modules:

  • mule-packager

  • mule-deployer

  • mule-maven-plugin

Debugging

In case you run into problems while using the plugin and wants to try find the cause by yourself, you can easily debug the plugin using mvnDebug. These are the steps:

  • Clone this project;

  • In the project base folder, checkout to the tag that corresponds to the version of the mule project that you are building/deploying;

  • Then, run

mvn clean install
  • In your IDE, create a new remote debug configuration and set the port to 8000;

  • Run the command that failed and that you want to debug, but replace mvn by mvnDebug (check the tips session below);

  • Place a breakpoint in one of the mojos of the mule-maven-plugin module (that should be a good starting point);

  • Start debugging.

Tips:

To find the right tag, run

git tag -l
  • And then run

git checkout <tag_name>

Also, if the build failed when invoking (as an example)

mvn clean deploy -DmuleDeploy

You should debug by running

mvnDebug clean deploy -DmuleDeploy

mule-maven-plugin's People

Contributors

aguozden avatar aiannucci avatar alandsantamaria avatar andresgregoire avatar anosenzo avatar asequeira avatar damiansima avatar egrave avatar elrodro83 avatar facundopoblete avatar fernandezlautaro avatar fernandothea avatar frossisfdc avatar gsfernandes avatar igua95 avatar jaatadiamulesoft avatar jcgrethe avatar joshrosso avatar juarez-fabian avatar kip-mulesoft avatar lucianorm avatar marianogonzalez avatar marianomerlo avatar mpereyra-salesforce avatar pablokraan avatar pablolagreca avatar rbourbonnavarro avatar rodriguez-jorge avatar tomasperezc avatar williampinho avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mule-maven-plugin's Issues

log4j Vulnerability Security fix

Will there be a version update for log4j to resolve the log4j vulnerability? The current log4j version you're using is vulnerable.

finalName is no longer working after plug-in version 3.3.5 or so

Hello All,

Recently we have encountered an issue where all of our multi-tenant deployments failed. We were using a single Mule API project for deploying to different tenants. We accomplished this by deploying each API with a suffix that was controlled via our build environment, which modified the xml attribute finalName (See Below). We are being forced to use a higher version of the mule deployment plugin 3.8.2 and setting this finalName no longer works. Can anyone tell us if this lose of functionality is a bug or a change in the direction of the mule deployment plug-in. Are there any workarounds that can be used to change the final artifact name?

Thank you,

  • Kevin
<plugin>
				<groupId>org.mule.tools.maven</groupId>
				<artifactId>mule-maven-plugin</artifactId>
				<version>${mule.maven.plugin.version}</version>
				<extensions>true</extensions>
				<configuration>
					<classifier>mule-application</classifier>
					<armDeployment>
						<uri>https://anypoint.mulesoft.com</uri>
						<target>${target}</target>
						<targetType>${target.type}</targetType>
						<username>${username}</username>
						<password>${password}</password>
						<environment>${environment}</environment>
						<muleVersion>4.2.0</muleVersion>
						<properties>
							<sap.env>${sap.env}</sap.env>
						</properties>
						<applicationName>${application.name}</applicationName>
					</armDeployment>
					**<finalName>${project.artifactId}${sap.env}-${project.version}</finalName>**
				</configuration>
			</plugin>

Update - Example of finalName working is past versions

The below link shows the working behavior in past version the plug-in

https://help.mulesoft.com/s/article/Controlling-final-JAR-file-name-when-using-Maven-deployment-pipeline

mule-deployer - JdkConnectorProvider does not support http/s proxy connections

Hi.

I'm the lead integration developer at Charles Darwin University - CDU. We have recently been upgrading our Mulesoft app's to the new MuleSoft Java 17 version which has resulted in having to upgrade the Mulesoft Mule-Maven-Plugin from version 3.8.2 to 4.1.0. Our app migration are going fine how-ever we've run into problems when using our onprem gitlab runner to deploy the apps to the cloudhub, I've traced the problem to the (mule-maven-plugin\mule-deployer\src\main\java\org\mule\tools\client\core\AbstractClient.java
) file that set's the jersey.client.ClientConfig connectorProvider to org.glassfish.jersey.jdk.connector.JdkConnectorProvider instead of letting jersey use the default HttpUrlConnectorProvider.

Because of our local network security all of our on-prem docker containers must use a http/s proxy to connect to the internet. All requests from the docker container from the container host is blocked. Our gitlab CI script that we use to deploy our scripts is provided in [i]. Investigating the issues further, we found out that the JdkConnectorProvider does not support http/s proxies which are set via the https.proxyHost and https.proxyPort arguments. The jstack call stack of the problem is provided in [ii].

I've tested the following jersey Connector implementation's bellow in [iii], which are supported by jersey (https://eclipse-ee4j.github.io/jersey.github.io/documentation/latest/appendix-properties.html).

jersey.config.client.proxy.uri
URI of a HTTP proxy the client connector should use. Default value is not set. Currently supported with ApacheConnectorProvider, Apache5ConnectorProvider, GrizzlyConnectorProvider, HelidonConnectorProvider, NettyConnectorProvider, and JettyConnectorProvider only.

How-ever, due to them modifying the http headers it results in a http response of 400 from cloudhub with the message org.jvnet.mimepull.MIMEParsingException: Missing start boundary. . This is also reported by other projects such as (eclipse-ee4j/jersey#5094).

To solve our deployment problem I've removed the offending line configuration.connectorProvider(new org.glassfish.jersey.jdk.connector.JdkConnectorProvider()); from the (mule-maven-plugin\mule-deployer\src\main\java\org\mule\tools\client\core\AbstractClient.java
), and deployed a quickfix mule-maven-plugin 4.1.0-SNAPSHOT version to our gitlab repository, which has resolved the issue. But this isn't really a long term solution.

[iii] jersey Connector implementation's
ApacheConnectorProvider
GrizzlyConnectorProvider
JettyConnectorProvider
NettyConnectorProvider

[i] Gitlab .gitlab-ci.yml container script.

image: maven:3.9.6-eclipse-temurin-17

variables:
  APP_NAME: "student-admission-process-api"
  BUSINESSGROUP: "Student Services"
  MAVEN_CLI_OPTS: "-s $CI_BUILDS_DIR/.m2/settings.xml --batch-mode"
  MAVEN_OPTS: "-Dmaven.repo.local=/.m2/repository"

cache:
  key: one-key-to-rule-them-all
  when: 'always'
  paths:
    - .m2/repository

stages:
  - intialize
  - deploy
  - muleDeploy_dev
  - muleDeploy_prd

maven_intialize:
  stage: intialize
  only:
  - develop
  - JDK17upgrade
  - staging
  - master
  script:
    - echo "Copy Maven seting file"
    - mkdir -p $CI_BUILDS_DIR/.m2 && cp $MAVEN_SETTINGS_XML $CI_BUILDS_DIR/.m2/settings.xml
    - echo $CI_PROJECT_DIR
    - echo $PWD

maven_deploy_to_exchange:
  stage: deploy
  only:
  - develop
  - JDK17upgrade
  - staging
  script:
    - echo "Deploying the project (to Exchange) with the Mule Maven Plugin"
    - mvn $MAVEN_CLI_OPTS clean deploy

maven_deploy_to_dev:
  stage: muleDeploy_dev
  environment:
    name: DEV
    action: stop
  only:
  - develop
  - JDK17upgrade
  dependencies:
    - maven_deploy_to_exchange
  script:
  - echo "Deploying the project (to Cloudhub - DEV environment) with the Mule Maven Plugin"
  - mvn $MAVEN_CLI_OPTS deploy 
    -P cloudhub
    -U
    -DmuleDeploy
    -Dmule.applicationName=$APP_NAME
    -Dch.businessGroup="$BUSINESSGROUP"
    -Dch.connectedAppClientId=$ANYPOINT_CONNECTEDAPP_CLIENTID
    -Dch.connectedAppClientSecret=$ANYPOINT_CONNECTEDAPP_SECRET
    -Dmule.org.client_id=$ORGANIZATION_CLIENTID
    -Dmule.org.client_secret=$ORGANIZATION_SECRET
    -Dch.workers=1
    -Dch.workerType=MICRO
    -Dhttps.proxyHost=baza.cdu.edu.au
    -Dhttps.proxyPort=3128
    -Dmule.env.uri=dev
    -Dmule.env=DEV
    -Dmule.environment=DEV
    -Drtf.jsonlogger.priority=INFO
    -Dsecure.key="$SECURE_KEY_DEV"

[ii] Jstack when using the JdkConnectorProvider.

  • Note please see the following lines bellow where the JdkConnectorProvider/JdkConnector is used.
        at org.glassfish.jersey.jdk.connector.internal.JdkConnector.apply(JdkConnector.java:128)
        at org.glassfish.jersey.jdk.connector.internal.JdkConnector.apply(JdkConnector.java:59)
   java.lang.Thread.State: WAITING (parking)
        at jdk.internal.misc.Unsafe.park([email protected]/Native Method)
        - parking to wait for  <0x00000000e1cf79e8> (a java.util.concurrent.CountDownLatch$Sync)
        at java.util.concurrent.locks.LockSupport.park([email protected]/LockSupport.java:211)
        at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquire([email protected]/AbstractQueuedSynchronizer.java:715)
        at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireSharedInterruptibly([email protected]/AbstractQueuedSynchronizer.java:1047)
        at java.util.concurrent.CountDownLatch.await([email protected]/CountDownLatch.java:230)
        at org.glassfish.jersey.jdk.connector.internal.ChunkedBodyOutputStream.doInitialBlocking(ChunkedBodyOutputStream.java:249)
        at org.glassfish.jersey.jdk.connector.internal.ChunkedBodyOutputStream.write(ChunkedBodyOutputStream.java:92)
        at org.glassfish.jersey.jdk.connector.internal.IntercecommitStreamptingOutputStream.write(InterceptingOutputStream.java:48)
        at org.glassfish.jersey.message.internal.CommittingOutputStream.write(CommittingOutputStream.java:200)
        at org.glassfish.jersey.message.internal.WriterInterceptorExecutor$UnCloseableOutputStream.write(WriterInterceptorExecutor.java:276)
        at sun.nio.cs.StreamEncoder.writeBytes([email protected]/StreamEncoder.java:234)
        at sun.nio.cs.StreamEncoder.implFlushBuffer([email protected]/StreamEncoder.java:313)
        at sun.nio.cs.StreamEncoder.implFlush([email protected]/StreamEncoder.java:318)
        at sun.nio.cs.StreamEncoder.flush([email protected]/StreamEncoder.java:160)
        - locked <0x00000000e1b90088> (a java.io.OutputStreamWriter)
        at java.io.OutputStreamWriter.flush([email protected]/OutputStreamWriter.java:248)
        at org.glassfish.jersey.message.internal.ReaderWriter.writeToAsString(ReaderWriter.java:170)
        at org.glassfish.jersey.message.internal.AbstractMessageReaderWriterProvider.writeToAsString(AbstractMessageReaderWriterProvider.java:107)
        at org.glassfish.jersey.message.internal.StringMessageProvider.writeTo(StringMessageProvider.java:76)
        at org.glassfish.jersey.message.internal.StringMessageProvider.writeTo(StringMessageProvider.java:36)
        at org.glassfish.jersey.message.internal.WriterInterceptorExecutor$TerminalWriterInterceptor.invokeWriteTo(WriterInterceptorExecutor.java:242)
        at org.glassfish.jersey.message.internal.WriterInterceptorExecutor$TerminalWriterInterceptor.aroundWriteTo(WriterInterceptorExecutor.java:227)
        at org.glassfish.jersey.message.internal.WriterInterceptorExecutor.proceed(WriterInterceptorExecutor.java:139)
        at org.glassfish.jersey.message.internal.MessageBodyFactory.writeTo(MessageBodyFactory.java:1116)
        at org.glassfish.jersey.client.ClientRequest.doWriteEntity(ClientRequest.java:461)
        at org.glassfish.jersey.client.ClientRequest.writeEntity(ClientRequest.java:443)
        at org.glassfish.jersey.jdk.connector.internal.JdkConnector.apply(JdkConnector.java:128)
        at org.glassfish.jersey.jdk.connector.internal.JdkConnector.apply(JdkConnector.java:59)
        at org.glassfish.jersey.client.ClientRuntime.invoke(ClientRuntime.java:297)
        at org.glassfish.jersey.client.JerseyInvocation.lambda$invoke$0(JerseyInvocation.java:662)
        at org.glassfish.jersey.client.JerseyInvocation$$Lambda$2676/0x00007fddf0a42000.call(Unknown Source)
        at org.glassfish.jersey.client.JerseyInvocation.call(JerseyInvocation.java:697)
        at org.glassfish.jersey.client.JerseyInvocation.lambda$runInScope$3(JerseyInvocation.java:691)
        at org.glassfish.jersey.client.JerseyInvocation$$Lambda$2677/0x00007fddf0a42240.call(Unknown Source)
        at org.glassfish.jersey.internal.Errors.process(Errors.java:292)
        at org.glassfish.jersey.internal.Errors.process(Errors.java:274)
        at org.glassfish.jersey.internal.Errors.process(Errors.java:205)
        at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:390)
        at org.glassfish.jersey.client.JerseyInvocation.runInScope(JerseyInvocation.java:691)
        at org.glassfish.jersey.client.JerseyInvocation.invoke(JerseyInvocation.java:661)
        at org.glassfish.jersey.client.JerseyInvocation$Builder.method(JerseyInvocation.java:439)
        at org.glassfish.jersey.client.JerseyInvocation$Builder.post(JerseyInvocation.java:345)
        at org.mule.tools.client.core.AbstractClient.post(AbstractClient.java:61)
        at org.mule.tools.client.authentication.AuthenticationServiceClient.loginWithConnectedApp(AuthenticationServiceClient.java:147)
        at org.mule.tools.client.authentication.AuthenticationServiceClient.getBearerTokenForConnectedApp(AuthenticationServiceClient.java:88)
        at org.mule.tools.client.AbstractMuleClient.getBearerToken(AbstractMuleClient.java:340)
        at org.mule.tools.client.AbstractMuleClient.init(AbstractMuleClient.java:100)
        at org.mule.tools.client.core.AbstractClient.initialize(AbstractClient.java:125)
        - locked <0x00000000e3ef6bf0> (a org.mule.tools.client.cloudhub.CloudHubClient)
        at org.mule.tools.client.core.AbstractClient.get(AbstractClient.java:90)
        at org.mule.tools.client.cloudhub.CloudHubClient.isDomainAvailable(CloudHubClient.java:199)
        at org.mule.tools.deployment.cloudhub.CloudHubArtifactDeployer.createOrUpdateApplication(CloudHubArtifactDeployer.java:123)
        at org.mule.tools.deployment.cloudhub.CloudHubArtifactDeployer.deployApplication(CloudHubArtifactDeployer.java:85)
        at org.mule.tools.deployment.cloudhub.CloudHubApplicationDeployer.deploy(CloudHubApplicationDeployer.java:41)
        at org.mule.tools.deployment.DefaultDeployer.deploy(DefaultDeployer.java:50)
        at org.mule.tools.maven.mojo.deploy.DeployMojo.doExecute(DeployMojo.java:45)
        at org.mule.tools.maven.mojo.deploy.AbstractMuleDeployerMojo.execute(AbstractMuleDeployerMojo.java:91)
        at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:126)
        at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2(MojoExecutor.java:328)
        at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute(MojoExecutor.java:316)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:212)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:174)
        at org.apache.maven.lifecycle.internal.MojoExecutor.access$000(MojoExecutor.java:75)
        at org.apache.maven.lifecycle.internal.MojoExecutor$1.run(MojoExecutor.java:162)
        at org.apache.maven.plugin.DefaultMojosExecutionStrategy.execute(DefaultMojosExecutionStrategy.java:39)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:159)
        at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:105)
        at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:73)
        at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:53)
        at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:118)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:261)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:173)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:101)
        at org.apache.maven.cli.MavenCli.execute(MavenCli.java:906)
        at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:283)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:206)
        at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0([email protected]/Native Method)
        at jdk.internal.reflect.NativeMethodAccessorImpl.invoke([email protected]/NativeMethodAccessorImpl.java:77)
        at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke([email protected]/DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke([email protected]/Method.java:568)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:283)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:226)
        at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:407)
        at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:348)

Disable "inbound traffic" from plugin not working

while trying to disable inbound traffic from maven plugin, we see that it enables by default and set the first domain for the cluster.

enabling in the UI is possible but not from maven plugin, we tried as well with AMC application manager with same result when we modify the json to have a null value, example: "inbound": {"publicUrl":null}

when checking the code of the plugin the code for RequestBuilder.java specifies the following.

private String resolveUrl(RuntimeFabricDeploymentSettings deploymentSettings, String targetId) {
JsonArray domains = client.getDomainInfo(targetId);
if (deploymentSettings.getPublicUrl() == null && domains.size() > 0) {
String domain = domains.get(0).getAsString();
return domain.replace(DOMAIN_WILDCARD, deployment.getApplicationName());
} else {
return deploymentSettings.getPublicUrl();
}
}

which explain the behavior explained above.

Processing classes failed when XML configuration file contains properties placeholders

In the config XML we use properties placeholders to define the streaming:

<http:request doc:name="Request to server" url="https://localhost:9090/api"
					config-ref="HTTP_Request_configuration" method="GET">
					<repeatable-in-memory-stream initialBufferSize="${http.streaming.mem.init.size}"
						bufferSizeIncrement="${http.streaming.mem.inc.size}" maxBufferSize="${http.streaming.mem.max.size}" bufferUnit="MB" />
					<http:headers>#[attributes.headers -- ['host','content-length']]</http:headers>
					<http:query-params>#[attributes.queryParams]</http:query-params>
				</http:request>

Simply run mvn clean package results in:

[ERROR] Failed to execute goal org.mule.tools.maven:mule-maven-plugin:3.6.3:process-classes (default-process-classes) on project test-project: Execution default-process-classes of goal org.mule.tools.maven:mule-maven-plugin:3.6.3:process-classes failed: Exception resolving param 'bufferSizeIncrement' with value '${http.streaming.mem.inc.size}' at 'api.xml:199:6' (java.lang.NumberFormatException: For input string: "${http.streaming.mem.inc.size}") -> [Help 1]

Which is wrong, since the placeholder gets resolved once the runtime deploys the application.
Any idea how to fix this? Replacing the placeholder manually by some number is one option, but not good. Reverting Mule Maven plugin back to 3.5.4 is another option, but Studio is always complaining about the project is not upgraded.

I think this issue should be fixed by relaxing validations in cases where there is a placeholder instead of the right value.

Allow <muleVersion>3.9.2 09-20-2019</muleVersion> for cloudhub deployment

Currently is limited to carry a major version only:
e.g. <muleVersion>3.9.2</muleVersion> or <muleVersion>4.2.1</muleVersion>.

Due to mule-hotfix workflow the worker gets the newest hotfix runtime in case of

  • new deployment
  • update mule to newer minorVersion.

This leads to (eventually) get runtimes on production that not have been tested on test-environments (sandbox).

Request is to be able to specify the runtime update during . Either via

  • append internal name <muleVersion>3.9.2 09-20-2019</muleVersion> (not nice)
  • add new attribute: <muleVersionName>09-20-2019</muleVersionName>
  • or/and new attribute: <muleVersionId>5d853858e09d7e2c47529e49</muleVersionId>

and modify your deploy entpoints (PUT https://anypoint.mulesoft.com/cloudhub/api/v2/applications/) accordingly.

Example runtime for values above:
https://anypoint.mulesoft.com/cloudhub/api/mule-versions/3.9.2/updates/5d853858e09d7e2c47529e49

{
	"id": "5d853858e09d7e2c47529e49",
	"name": "09-20-2019",
	"releaseDate": 1569011800524,
	"releaseNotes": "https://docs.mulesoft.com/release-notes/cloudhub-runtimes-release-notes",
	"flags": {
		"performLog4jReplacement": true,
		"skipMMCPairing": true,
		"log4j1Used": false,
		"usingMuleAgent": true,
		"vpnSupported": true,
		"monitoringSupported": true,
		"objectStoreV1": false,
		"loggingNgSupported": true,
		"diagnosticsSupported": true,
		"persistentQueuesSupported": true,
		"asyncScheduleSupported": false,
		"muleLivenessSupported": false
	}
}

See https://help.mulesoft.com/s/ideas#0872T0000009uk9QAA

MessageBodyReader not found for media type=text/plain;charset=utf-8

When I try to use the Connected App deployment with Mule Runtime 4.2.2, Mule Maven Plugin 3.4.0, I am receiving the below error while Jenkins Build.
MessageBodyReader not found for media type=text/plain;charset=utf-8, type=class org.mule.tools.client.arm.model.Environments, genericType=class org.mule.tools.client.arm.model.Environments

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Rate-Limited

These updates are currently rate-limited. Click on a checkbox below to force their creation now.

  • Update powermock.version to v2.0.9 (org.powermock:powermock-api-mockito2, org.powermock:powermock-module-junit4)
  • Update dependency com.github.spotbugs:spotbugs to v4.7.3
  • Update dependency com.github.spotbugs:spotbugs-maven-plugin to v4.7.3.5
  • Update dependency com.google.guava:guava to v27.1-jre
  • Update dependency com.mulesoft.mule.distributions:mule-ee-distribution-standalone to v4.6.0-20230320
  • Update dependency commons-cli:commons-cli to v1.5.0
  • Update dependency commons-io:commons-io to v2.13.0
  • Update dependency io.qameta.allure:allure-java-commons to v2.24.0
  • Update dependency org.apache.commons:commons-compress to v1.24.0
  • Update dependency org.apache.commons:commons-exec to v1.3
  • Update dependency org.apache.commons:commons-lang3 to v3.13.0
  • Update dependency org.apache.maven.plugins:maven-compiler-plugin to v3.11.0
  • Update dependency org.apache.maven.plugins:maven-enforcer-plugin to v3.4.1
  • Update dependency org.apache.maven.plugins:maven-jar-plugin to v3.3.0
  • Update dependency org.apache.maven.plugins:maven-plugin-plugin to v3.9.0
  • Update dependency org.apache.maven.plugins:maven-shade-plugin to v3.5.0
  • Update dependency org.apache.maven.plugins:maven-source-plugin to v3.3.0
  • Update dependency org.apache.maven:maven-compat to v3.9.4
  • Update dependency org.mock-server:mockserver-netty to v5.15.0
  • Update dependency org.mockito:mockito-core to v2.28.2
  • Update dependency org.mule.runtime:mule-api to v1.6.0-20230417
  • Update dependency org.mule.runtime:mule-artifact-ast-serialization to v1.2.0-20230417
  • Update dependency org.mule.runtime:mule-artifact-ast-xml-parser to v1.2.0-20230417
  • Update dependency org.mule:mule-maven-client-impl to v1.8.0-20230417
  • Update dependency org.yaml:snakeyaml to v2.2
  • Update jersey monorepo to v2.40 (org.glassfish.jersey.media:jersey-media-moxy, org.glassfish.jersey.media:jersey-media-multipart, org.glassfish.jersey.core:jersey-client)
  • Update maven.version to v3.9.4 (org.apache.maven:maven-core, org.apache.maven:maven-plugin-api)
  • Update mule.version to v4.6.0-20230417 (org.mule.runtime:mule-module-artifact-activation, org.mule.runtime:mule-module-deployment-model-impl, com.mulesoft.mule.runtime.modules:mule-runtime-ee-extension-model, org.mule.runtime:mule-module-tls, org.mule.runtime:mule-module-javaee, org.mule.runtime:mule-module-extensions-xml-support, com.mulesoft.anypoint:mule-module-autodiscovery, com.mulesoft.mule.runtime:mule-core-ee, org.mule.runtime:mule-module-logging)
  • Update dependency com.google.guava:guava to v32
  • Update dependency com.marvinformatics.formatter:formatter-maven-plugin to v2
  • Update dependency com.mulesoft.anypoint:api-gateway-api to v4
  • Update dependency com.vdurmont:semver4j to v3
  • Update dependency de.skuzzle:semantic-version to v2
  • Update dependency org.apache.maven.plugins:maven-dependency-plugin to v3
  • Update dependency org.apache.maven.plugins:maven-resources-plugin to v3
  • Update dependency org.apache.maven.plugins:maven-surefire-plugin to v3
  • Update dependency org.apache.maven.shared:maven-dependency-tree to v3
  • Update dependency org.codehaus.plexus:plexus-archiver to v4
  • Update dependency org.codehaus.plexus:plexus-component-annotations to v2
  • Update dependency org.codehaus.plexus:plexus-container-default to v2
  • Update dependency org.mockito:mockito-core to v5
  • Update dependency org.slf4j:slf4j-api to v2
  • Update jersey monorepo to v3 (major) (org.glassfish.jersey.media:jersey-media-moxy, org.glassfish.jersey.media:jersey-media-multipart, org.glassfish.jersey.core:jersey-client)
  • ๐Ÿ” Create all rate-limited PRs at once ๐Ÿ”

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

maven
mule-artifact-it/mule-deployer-it/pom.xml
  • org.mule.tools.maven:mule-artifact-it 3.9.0-SNAPSHOT
mule-artifact-it/mule-packager-it/pom.xml
  • org.mule.tools.maven:mule-artifact-it 3.9.0-SNAPSHOT
mule-artifact-it/pom.xml
mule-classloader-model/pom.xml
mule-deployer/pom.xml
  • org.apache.maven.plugins:maven-source-plugin 3.2.0
mule-extension-model-loader/pom.xml
  • org.mule.runtime:mule-artifact-ast-xml-parser 1.1.0-20220622
  • org.mule.runtime:mule-artifact-ast-serialization 1.1.0-20220622
  • com.mulesoft.anypoint:api-gateway-api 1.5.0-20220125
mule-maven-plugin/pom.xml
  • org.apache.maven.plugins:maven-shade-plugin 3.2.3
mule-packager/pom.xml
pom.xml
  • org.apache.maven.plugins:maven-dependency-plugin 2.10
  • com.mulesoft.mule.distributions:mule-ee-distribution-standalone 4.4.0
  • org.apache.maven.plugins:maven-dependency-plugin 2.10
  • com.mulesoft.mule.distributions:mule-ee-distribution-standalone 4.4.0
  • org.mule.runtime:mule-module-logging 4.5.0-20220622
  • com.mulesoft.mule.runtime:mule-core-ee 4.5.0-20220622
  • com.mulesoft.anypoint:mule-module-autodiscovery 4.5.0-20220622
  • org.mule.runtime:mule-module-extensions-xml-support 4.5.0-20220622
  • org.mule.runtime:mule-module-javaee 4.5.0-20220622
  • org.mule.runtime:mule-module-tls 4.5.0-20220622
  • com.mulesoft.mule.runtime.modules:mule-runtime-ee-extension-model 4.5.0-20220622
  • org.mule.runtime:mule-module-deployment-model-impl 4.5.0-20220622
  • org.mule.runtime:mule-module-artifact-activation 4.5.0-20220622
  • org.mule.runtime:mule-api 1.5.0-20220622
  • org.mule:mule-maven-client-impl 1.6.0
  • org.apache.maven.plugins:maven-plugin-plugin 3.6.0
  • io.qameta.allure:allure-java-commons 2.8.1
  • org.apache.maven:maven-plugin-api 3.8.6
  • org.sonatype.plexus:plexus-sec-dispatcher 1.4
  • org.apache.maven:maven-core 3.8.6
  • org.apache.maven.plugin-tools:maven-plugin-annotations 3.6.0
  • org.mule:mule-maven-client-impl 1.6.0
  • org.apache.commons:commons-compress 1.21
  • org.codehaus.plexus:plexus-archiver 3.7.0
  • org.mule.runtime:mule-api 1.5.0-20220622
  • org.mule.tools.maven:exchange-mule-plugin-utils 0.0.17
  • org.apache.commons:commons-lang3 3.10
  • org.apache.commons:commons-collections4 4.4
  • org.apache.commons:commons-exec 1.2
  • commons-io:commons-io 2.7
  • commons-logging:commons-logging 1.2
  • commons-cli:commons-cli 1.4
  • org.jdom:jdom2 2.0.6
  • com.google.guava:guava 27.0-jre
  • com.google.code.gson:gson 2.8.6
  • org.yaml:snakeyaml 2.0
  • com.vdurmont:semver4j 2.2.0
  • de.skuzzle:semantic-version 1.2.0
  • org.glassfish.jersey.core:jersey-client 2.25
  • org.glassfish.jersey.media:jersey-media-multipart 2.25
  • org.glassfish.jersey.media:jersey-media-moxy 2.31
  • org.slf4j:slf4j-api 1.8.0-beta2
  • javax.activation:javax.activation-api 1.2.0
  • javax.xml.bind:jaxb-api 2.3.1
  • org.codehaus.plexus:plexus-component-annotations 1.7.1
  • org.apache.maven:maven-compat 3.8.6
  • org.codehaus.plexus:plexus-container-default 1.7.1
  • org.apache.maven.shared:maven-dependency-tree 1.2
  • org.apache.maven.shared:maven-verifier 1.8.0
  • junit:junit 4.13
  • org.hamcrest:hamcrest-all 1.3
  • org.mockito:mockito-core 2.23.4
  • org.powermock:powermock-module-junit4 2.0.0
  • org.powermock:powermock-api-mockito2 2.0.0
  • org.mock-server:mockserver-netty 5.7.2
  • log4j:log4j 1.2.17
  • org.skyscreamer:jsonassert 1.5.0
  • org.apache.maven.plugins:maven-resources-plugin 2.7
  • org.apache.maven.plugins:maven-compiler-plugin 3.8.1
  • com.mycila:license-maven-plugin 4.2
  • com.mulesoft.license:license 1.4.0
  • com.marvinformatics.formatter:formatter-maven-plugin 1.9.2
  • org.apache.maven.plugins:maven-surefire-plugin 2.22.2
  • org.apache.maven.plugins:maven-jar-plugin 3.2.0
  • com.github.spotbugs:spotbugs-maven-plugin 4.1.3
  • com.github.spotbugs:spotbugs 4.2.0
  • org.jacoco:jacoco-maven-plugin 0.8.6
  • org.apache.maven.plugins:maven-enforcer-plugin 3.0.0-M3
  • org.jacoco:jacoco-maven-plugin 0.8.6
  • com.github.spotbugs:spotbugs-maven-plugin 4.1.3

Stacktrace logged in case HTTP(s)_PROXY is set without password

The new
/mule-maven-plugin-parent/mule-maven-plugin/src/main/java/org/mule/tools/maven/config/proxy/ProxyConfiguration.java
(since MMP-512 - Support deployment using proxies 3.x (#330))

is checking whether HTTP_PROXY is set (isAbleToSetupProxy) but then it throws a NoSuchFieldException in case password or port is missing (btw. should replace & with &&)

That exception

[INFO] --- mule-maven-plugin:3.3.6:deploy (default-cli) @ dt0b35-mule-template-test-m4 ---
[ERROR] Fail to configure proxy settings.
java.lang.NoSuchFieldException: Missing proxy configuration.
	at org.mule.tools.maven.config.proxy.ProxyConfiguration.buildProxyFromProperties(ProxyConfiguration.java:108)
	at org.mule.tools.maven.config.proxy.ProxyConfiguration.getProxy(ProxyConfiguration.java:90)
	at org.mule.tools.maven.config.proxy.ProxyConfiguration.handleProxySettings(ProxyConfiguration.java:44)
 	at org.mule.tools.maven.mojo.deploy.AbstractMuleDeployerMojo.setupProxy(AbstractMuleDeployerMojo.java:141)
	at org.mule.tools.maven.mojo.deploy.AbstractMuleDeployerMojo.execute(AbstractMuleDeployerMojo.java:87)
	at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:132)

later on is ignored in AbstractMuleDeployerMojo.setupProxy().

Deployment works as expected and Maven Build exits with

[INFO] BUILD SUCCESS

Even the mule.ProxyConfiguration fails the http request is correctly performed with the env.HTTPS_PROXY configuration (without authentication) later on in the http libraries (either via Apache/Grizzly - I did not check which one is used...)

As the only purpose of ProxyConfiguration is to fill the java.net.Authenticator
a less verbose message "Proxy User/Password not set" would be sufficient.

Allow using WagonTransporter (or configure aether)

By default the mule-maven-plugin is using aether-transport-http but that cannot be configured via settings.xml
with .m2/settings.xml//servers/server/configuration/httpConfiguration
(see references to org.eclipse.aether.transport.http.GlobalState.setExpectContinue(CompoundKey, boolean) and org.eclipse.aether.transport.http.HttpTransporterFactory)

What we need is for example a configuration for our nexus: preemptive + http-continue:

<configuration>
	<httpConfiguration>
		<all>
			<params>
				<property>
					<name>http.authentication.preemptive</name>
					<value>%b,true</value>
				</property>
				<property>
					<name>http.protocol.expect-continue</name>
					<value>%b,false</value>
				</property>
			</params>
		</all>
	</httpConfiguration>
</configuration>

and that can be achieved with wagon transport only.

Workaround is to exclude the aether-transport-http from mule-maven-client-impl

<pluginManagement>
	<plugins>
		<plugin>
			<groupId>org.mule.tools.maven</groupId>
			<artifactId>mule-maven-plugin</artifactId>
			<dependencies>
				<dependency>
					<groupId>org.mule</groupId>
					<artifactId>mule-maven-client-impl</artifactId>
					<version>${mule-maven-client-impl.version}</version>
					<exclusions>
						<exclusion>
							<groupId>org.eclipse.aether</groupId>
							<artifactId>aether-transport-http</artifactId>
						</exclusion>
					</exclusions>
				</dependency>
			</dependencies>
		</plugin>
	</plugins>
</pluginManagement>

Allow 0.1 workers when deploying

Currently when deploying applications using this plugin, the minimum worker size is Integer(1).

Please allow for worker sizes of decimal value such as 0.1

For example

0.1

Many new clients of MuleSoft only get 1 or 2 cores and want to run a POC involving applications deployed on decimal valued vCores

Runtime Fabric inbound publicURL doe not support <publicUrl></publicUrl> to avoid Ingress mapping for private API

In Runtime Fabric BYOK the behaviour expected in order not to have a Ingress mapping at the deploy /redeploy time is that if the configuration is

<http>										
	<inbound>		
	     <publicUrl></publicUrl>									 												
	</inbound>
</http>

No ingress mapping will be created in the deployment and the application will not be exposed. In order to solve this we have to modify the class org.mule.tools.model.anypoint.Inbound.java by defaulting publicUrl to "" with

@Parameter(defaultValue = "")
  protected String publicUrl = "";

Connection timeout when running plugin behind an http proxy

I have a Jenkins machine in a network behind an http proxy. Maven is configured right with proxy in settings.xml but the plugin doesn't consider that and the calls to anypoint.mulesoft.com APIs throw a timeout exception.
I wish I could configure an http proxy to reach Anypoint APIs.

Skip configuration

Because sometimes I need to deploy my artifact to Artifactory and sometimes to Cloudhub (via mule-maven-plugin), would be very useful to have a skip property in the mule-maven-plugin configuration.

undeploy fails with IOException

When stopping mule standalone server (version 3.4.1), the undeploy execution fails with the stacktrace below:

Caused by: org.apache.maven.plugin.MojoExecutionException: Could not delete directory [..//target/mule-standalone-3.4.1/apps/]
at org.mule.tools.maven.plugin.mule.Undeployer.undeploy(Undeployer.java:72)
at org.mule.tools.maven.plugin.mule.Undeployer.execute(Undeployer.java:43)
at org.mule.tools.maven.plugin.mule.UndeployMojo.standalone(UndeployMojo.java:123)
at org.mule.tools.maven.plugin.mule.UndeployMojo.doExecute(UndeployMojo.java:38)
at org.mule.tools.maven.plugin.mule.AbstractMuleMojo.execute(AbstractMuleMojo.java:176)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
... 30 more
Caused by: java.io.IOException: Unable to delete directory..//target/mule-standalone-3.4.1/apps//lib.
at org.apache.commons.io.FileUtils.deleteDirectory(FileUtils.java:1541)
at org.apache.commons.io.FileUtils.forceDelete(FileUtils.java:2270)
at org.apache.commons.io.FileUtils.cleanDirectory(FileUtils.java:1653)
at org.apache.commons.io.FileUtils.deleteDirectory(FileUtils.java:1535)
at org.apache.commons.io.FileUtils.forceDelete(FileUtils.java:2270)
at org.mule.tools.maven.plugin.mule.Undeployer.undeploy(Undeployer.java:66)
... 36 more
Would it be better if we use FileDeleteStrategy.FORCE.deleteQuietly(file) so that there's no exception thrown and the next time we do a maven clean verify, the target directories get deleted and we have a clean slate?

It is not possible to keep manually added properties and update existing ones.

The configuration of mule-maven-plugin allows to set false
which is fine for keeping manually added properties like

secure.properties.key=..........

when re-deploying a new application.
see /mule-deployer/src/main/java/org/mule/tools/deployment/cloudhub/CloudHubArtifactDeployer.java => resolveProperties(..)

But when setting overrideProperties to false all properties which already exist in the worker are kept.
Due to that e.g. changing <org.mule.runtime.core.api.processor.strategy.AsyncProcessingStrategyFactory.DEFAULT_MAX_CONCURRENCY>16</org.mule.runtime.core.api.processor.strategy.AsyncProcessingStrategyFactory.DEFAULT_MAX_CONCURRENCY>
to
<org.mule.runtime.core.api.processor.strategy.AsyncProcessingStrategyFactory.DEFAULT_MAX_CONCURRENCY>32</org.mule.runtime.core.api.processor.strategy.AsyncProcessingStrategyFactory.DEFAULT_MAX_CONCURRENCY>
in the pom.xml does not have any effect because the original value 16 is taken in resolveProperties(...)

So we need to deploy with overrideProperties=true to get the updated MAX_CONCURRENCY but then worker is not starting
because secure.properties.key is missing. It needs to be added manually again (which makes automatic deployment useless).

As there are several solutions to solve this I first want to start discussion before creating a pull request.

Solution 1: Just keep manually added

  • take entries of originalApplication.getProperties() for those ones not in deployment.getProperties()

Solution 2: Specify property names to be kept

  • Add a List to configuration instead of overrideProperties:
    <keepPropertyNames><keepPropertyName></keepPropertyName></keepPropertyNames>
    where all properties are specyfied which sould be taken from originalApplication.getProperties().
    In our case: <keepPropertyName>secure.properties.key</keepPropertyName>

Solution 3: Specify property names to override always

  • Add a List to configuration instead of overrideProperties:
    <forceOverwritePropertyNames><forceOverwritePropertyName></forceOverwritePropertyName></forceOverwritePropertyNames>
    In our case: <forceOverwritePropertyName>org.mule.runtime.core.api.processor.strategy.AsyncProcessingStrategyFactory.DEFAULT_MAX_CONCURRENCY</forceOverwritePropertyName>

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Rate-Limited

These updates are currently rate-limited. Click on a checkbox below to force their creation now.

  • Update dependency org.apache.maven.plugins:maven-plugin-plugin to v3.6.4
  • Update dependency org.apache.maven.plugins:maven-source-plugin to v3.2.1
  • Update dependency org.jacoco:jacoco-maven-plugin to v0.8.8
  • Update dependency org.jdom:jdom2 to v2.0.6.1
  • Update dependency org.mule.runtime:mule-api to v1.5.0-20220922
  • Update dependency org.mule.runtime:mule-artifact-ast-serialization to v1.1.0-20220922
  • Update dependency org.mule.runtime:mule-artifact-ast-xml-parser to v1.1.0-20220922
  • Update dependency org.skyscreamer:jsonassert to v1.5.1
  • Update mule.version to v4.5.0-20220922 (org.mule.runtime:mule-module-artifact-activation, org.mule.runtime:mule-module-deployment-model-impl, com.mulesoft.mule.runtime.modules:mule-runtime-ee-extension-model, org.mule.runtime:mule-module-tls, org.mule.runtime:mule-module-javaee, org.mule.runtime:mule-module-extensions-xml-support, com.mulesoft.anypoint:mule-module-autodiscovery, com.mulesoft.mule.runtime:mule-core-ee, org.mule.runtime:mule-module-logging)
  • Update powermock.version to v2.0.9 (org.powermock:powermock-api-mockito2, org.powermock:powermock-module-junit4)
  • Update dependency com.github.spotbugs:spotbugs to v4.7.2
  • Update dependency com.github.spotbugs:spotbugs-maven-plugin to v4.7.2.1
  • Update dependency com.google.guava:guava to v27.1-jre
  • Update dependency commons-cli:commons-cli to v1.5.0
  • Update dependency commons-io:commons-io to v2.11.0
  • Update dependency org.apache.commons:commons-lang3 to v3.12.0
  • Update dependency org.apache.maven.plugins:maven-compiler-plugin to v3.10.1
  • Update dependency org.apache.maven.plugins:maven-enforcer-plugin to v3.1.0
  • Update dependency org.apache.maven.plugins:maven-jar-plugin to v3.3.0
  • Update dependency org.mockito:mockito-core to v2.28.2
  • Update dependency org.mule:mule-maven-client-impl to v1.7.0-20220922
  • Update dependency org.yaml:snakeyaml to v1.33
  • Update jersey monorepo to v2.37 (org.glassfish.jersey.media:jersey-media-moxy, org.glassfish.jersey.media:jersey-media-multipart, org.glassfish.jersey.core:jersey-client)
  • Update dependency com.google.guava:guava to v31
  • Update dependency com.marvinformatics.formatter:formatter-maven-plugin to v2
  • Update dependency com.mulesoft.anypoint:api-gateway-api to v4
  • Update dependency com.mycila:license-maven-plugin to v4
  • Update dependency com.vdurmont:semver4j to v3
  • Update dependency commons-logging:commons-logging to v99
  • Update dependency de.skuzzle:semantic-version to v2
  • Update dependency org.apache.maven.plugins:maven-dependency-plugin to v3
  • Update dependency org.apache.maven.plugins:maven-resources-plugin to v3
  • Update dependency org.apache.maven.shared:maven-dependency-tree to v3
  • Update dependency org.codehaus.plexus:plexus-archiver to v4
  • Update dependency org.codehaus.plexus:plexus-component-annotations to v2
  • Update dependency org.codehaus.plexus:plexus-container-default to v2
  • Update dependency org.mockito:mockito-core to v4
  • Update dependency org.slf4j:slf4j-api to v2
  • Update jersey monorepo to v3 (major) (org.glassfish.jersey.media:jersey-media-moxy, org.glassfish.jersey.media:jersey-media-multipart, org.glassfish.jersey.core:jersey-client)
  • ๐Ÿ” Create all rate-limited PRs at once ๐Ÿ”

Errored

These updates encountered an error and will be retried. Click on a checkbox below to force a retry now.

  • Update dependency com.mulesoft.anypoint:api-gateway-api to v1.5.0-20220922
  • Update dependency junit:junit to v4.13.2
  • Update dependency log4j:log4j to v1.2.17-atlassian-13
  • Update dependency org.apache.maven.plugin-tools:maven-plugin-annotations to v3.6.4
  • Update dependency org.slf4j:slf4j-api to v1.8.0-beta4
  • Update dependency com.google.code.gson:gson to v2.9.1
  • Update dependency com.mulesoft.mule.distributions:mule-ee-distribution-standalone to v4.5.0-20220922
  • Update dependency org.apache.commons:commons-exec to v1.3
  • Update dependency org.apache.maven.plugins:maven-shade-plugin to v3.4.0
  • Update dependency org.mock-server:mockserver-netty to v5.14.0

Detected dependencies

maven
mule-artifact-it/mule-deployer-it/pom.xml
  • org.mule.tools.maven:mule-artifact-it 3.9.0-SNAPSHOT
mule-artifact-it/mule-packager-it/pom.xml
  • org.mule.tools.maven:mule-artifact-it 3.9.0-SNAPSHOT
mule-artifact-it/pom.xml
  • org.mule.tools.maven:mule-artifact-tools 3.9.0-SNAPSHOT
mule-classloader-model/pom.xml
  • org.mule.tools.maven:mule-artifact-tools 3.9.0-SNAPSHOT
mule-deployer/pom.xml
  • org.mule.tools.maven:mule-artifact-tools 3.9.0-SNAPSHOT
  • org.apache.maven.plugins:maven-source-plugin 3.2.0
mule-extension-model-loader/pom.xml
  • org.mule.tools.maven:mule-artifact-tools 3.9.0-SNAPSHOT
  • org.mule.runtime:mule-artifact-ast-xml-parser 1.1.0-20220622
  • org.mule.runtime:mule-artifact-ast-serialization 1.1.0-20220622
  • com.mulesoft.anypoint:api-gateway-api 1.5.0-20220125
mule-maven-plugin/pom.xml
  • org.mule.tools.maven:mule-artifact-tools 3.9.0-SNAPSHOT
  • org.apache.maven.plugins:maven-shade-plugin 3.2.3
mule-packager/pom.xml
  • org.mule.tools.maven:mule-artifact-tools 3.9.0-SNAPSHOT
pom.xml
  • org.apache.maven.plugins:maven-dependency-plugin 2.10
  • com.mulesoft.mule.distributions:mule-ee-distribution-standalone 4.4.0
  • org.apache.maven.plugins:maven-dependency-plugin 2.10
  • com.mulesoft.mule.distributions:mule-ee-distribution-standalone 4.4.0
  • org.mule.runtime:mule-module-logging 4.5.0-20220622
  • com.mulesoft.mule.runtime:mule-core-ee 4.5.0-20220622
  • com.mulesoft.anypoint:mule-module-autodiscovery 4.5.0-20220622
  • org.mule.runtime:mule-module-extensions-xml-support 4.5.0-20220622
  • org.mule.runtime:mule-module-javaee 4.5.0-20220622
  • org.mule.runtime:mule-module-tls 4.5.0-20220622
  • com.mulesoft.mule.runtime.modules:mule-runtime-ee-extension-model 4.5.0-20220622
  • org.mule.runtime:mule-module-deployment-model-impl 4.5.0-20220622
  • org.mule.runtime:mule-module-artifact-activation 4.5.0-20220622
  • org.mule.runtime:mule-api 1.5.0-20220622
  • org.mule:mule-maven-client-impl 1.6.0
  • org.apache.maven.plugins:maven-plugin-plugin 3.6.0
  • org.apache.maven:maven-plugin-api 3.8.6
  • org.sonatype.plexus:plexus-sec-dispatcher 1.4
  • org.apache.maven:maven-core 3.8.6
  • org.apache.maven.plugin-tools:maven-plugin-annotations 3.6.0
  • org.mule:mule-maven-client-impl 1.6.0
  • org.apache.commons:commons-compress 1.21
  • org.codehaus.plexus:plexus-archiver 3.7.0
  • org.mule.runtime:mule-api 1.5.0-20220622
  • org.mule.tools.maven:exchange-mule-plugin-utils 0.0.17
  • org.apache.commons:commons-lang3 3.10
  • org.apache.commons:commons-collections4 4.4
  • org.apache.commons:commons-exec 1.2
  • commons-io:commons-io 2.7
  • commons-logging:commons-logging 1.2
  • commons-cli:commons-cli 1.4
  • org.jdom:jdom2 2.0.6
  • com.google.guava:guava 27.0-jre
  • com.google.code.gson:gson 2.8.6
  • org.yaml:snakeyaml 1.26
  • com.vdurmont:semver4j 2.2.0
  • de.skuzzle:semantic-version 1.2.0
  • org.glassfish.jersey.core:jersey-client 2.25
  • org.glassfish.jersey.media:jersey-media-multipart 2.25
  • org.glassfish.jersey.media:jersey-media-moxy 2.31
  • org.slf4j:slf4j-api 1.8.0-beta2
  • javax.activation:javax.activation-api 1.2.0
  • javax.xml.bind:jaxb-api 2.3.1
  • org.codehaus.plexus:plexus-component-annotations 1.7.1
  • org.apache.maven:maven-compat 3.8.6
  • org.codehaus.plexus:plexus-container-default 1.7.1
  • org.apache.maven.shared:maven-dependency-tree 1.2
  • org.apache.maven.shared:maven-verifier 1.8.0
  • junit:junit 4.13
  • org.hamcrest:hamcrest-all 1.3
  • org.mockito:mockito-core 2.23.4
  • org.powermock:powermock-module-junit4 2.0.0
  • org.powermock:powermock-api-mockito2 2.0.0
  • org.mock-server:mockserver-netty 5.7.2
  • log4j:log4j 1.2.17
  • org.skyscreamer:jsonassert 1.5.0
  • org.apache.maven.plugins:maven-resources-plugin 2.7
  • org.apache.maven.plugins:maven-compiler-plugin 3.8.1
  • com.mycila:license-maven-plugin 2.11
  • com.marvinformatics.formatter:formatter-maven-plugin 1.9.2
  • org.apache.maven.plugins:maven-surefire-plugin 2.22.2
  • org.apache.maven.plugins:maven-jar-plugin 3.2.0
  • com.github.spotbugs:spotbugs-maven-plugin 4.1.3
  • com.github.spotbugs:spotbugs 4.2.0
  • org.jacoco:jacoco-maven-plugin 0.8.6
  • org.apache.maven.plugins:maven-enforcer-plugin 3.0.0-M3
  • org.jacoco:jacoco-maven-plugin 0.8.6
  • com.github.spotbugs:spotbugs-maven-plugin 4.1.3

Hardcoded Cloudhub Domains in IT

Can't someone just create an app on "test-app-12345" "maven-plugin-cloudhub-business-group-test", "maven-plugin-cloudhub-undeploy-test" and "maven-plugin-cloudhub-deploy-test" Cloudhub domains and your integration tests are always going to fail?

mule-deployer not waiting for app to start

The deploy goal for plugin 2.3.2 does not correctly verify that the application has been deployed and started.

https://github.com/mulesoft/mule-maven-plugin/blob/2.x/mule-deployer/src/main/java/org/mule/tools/verification/cloudhub/CloudHubDeploymentVerification.java#L52

includes a check for the json field deploymentUpdateStatus which seemingly creates a race condition. The field may not be available soon enough after requesting the deployment and subsequently requesting the status of the application.

Here's an example of the behavior

[INFO] Checking if application: app-name has started
[DEBUG] HTTP Request
GET https://anypoint.mulesoft.com/cloudhub/api/v2/applications/app-name
Accept: application/json
User-Agent: mule-deployer
Authorization: bearer ***
X-ANYPNT-ENV-ID: ***
X-ANYPNT-ORG-ID: ***


[DEBUG] HTTP response
200 OK
transfer-encoding: chunked
Server: nginx
Access-Control-Allow-Origin: *
Access-Control-Allow-Methods: GET, POST, DELETE, PUT, OPTIONS, HEAD
Connection: keep-alive
Date: Thu, 28 Mar 2019 21:06:07 GMT
Access-Control-Allow-Headers: Origin, Authorization, Accept, X-Requested-With, Content-Type, Access-Control-Request-Method, Access-Control-Request-Headers, x-anypnt-env-id, x-anypnt-org-id
Content-Type: application/json
{
  "versionId": "5c940db2d14c5813dac8f9c7",
  "domain": "app-name",
  "fullDomain": "app-name.us-e2.cloudhub.io",
  "properties": {
    "anypoint.platform.client_id": "****",
    "mule.env": "dev",
    "anypoint.platform.client_secret": "******************",
    "vault.secret": "****************"
  },
  "propertiesOptions": {
    "anypoint.platform.client_secret": {
      "secure": true
    },
    "vault.secret": {
      "secure": true
    }
  },
  "status": "STARTED",
  "workers": {
    "type": {
      "name": "Micro",
      "weight": 0.1,
      "cpu": "0.1 vCores",
      "memory": "500 MB memory"
    },
    "amount": 1,
    "remainingOrgWorkers": 1.9000000000000001,
    "totalOrgWorkers": 2.4
  },
  "workerStatuses": [
    {
      "id": "***",
      "host": "***",
      "port": 0,
      "status": "STARTED",
      "deployedRegion": "us-east-2",
      "staticIPEnabled": false
    }
  ],
  "lastUpdateTime": 1553806955134,
  "fileName": "mule-agent-tester-1.4.0-SNAPSHOT.zip",
  "muleVersion": {
    "version": "3.9.1",
    "updateId": "***",
    "endOfSupportDate": 1633737600000
  },
  "region": "us-east-2",
  "persistentQueues": false,
  "persistentQueuesEncryptionEnabled": false,
  "persistentQueuesEncrypted": false,
  "monitoringEnabled": true,
  "monitoringAutoRestart": true,
  "staticIPsEnabled": false,
  "hasFile": true,
  "secureDataGatewayEnabled": false,
  "loggingNgEnabled": true,
  "loggingCustomLog4JEnabled": false,
  "insightsReplayDataRegion": "us-east-2",
  "deploymentGroup": {
    "id": "***",
    "name": "US East (Ohio)"
  },
  "updateRuntimeConfig": false,
  "trackingSettings": {
    "trackingLevel": "DISABLED"
  },
  "logLevels": [    
  ],
  "ipAddresses": [    
  ]
}
[INFO] Artifact app-name deployed

Redeployment to cloudhub with applicationName containing UPPERCASE letters caused "Domain not available" error

Version: 2.2.1

I could deploy to cloudhub on initial deployment but whenever i tried to update the application by redeployment it will throws Domain is not available error. Here is part of my pom.xml.

<plugin>
  <groupId>org.mule.tools.maven</groupId>
  <artifactId>mule-maven-plugin</artifactId>
  <version>2.2.1</version>
  <configuration>
    <skip>${lc.profile.skip.deploy}</skip>
    <deploymentType>cloudhub</deploymentType>
    <muleVersion>${mule.version}</muleVersion>
    <username>${env.ANYPOINT_USERNAME}</username>
    <password>${env.ANYPOINT_PASSWORD}</password>
    <environment>${lc.profile.env}</environment>
    <redeploy>true</redeploy>
    <application>target/${project.artifactId}-${project.version}.zip</application>
    <applicationName>${lc.profile.env}-${project.artifactId}</applicationName>
    <workerType>Micro</workerType>
    <properties>
       <anypoint.platform.analytics_base_uri>https://analytics-ingest.anypoint.mulesoft.com</anypoint.platform.analytics_base_uri>
       <anypoint.platform.coreservice_base_uri>https://anypoint.mulesoft.com/accounts</anypoint.platform.coreservice_base_uri>
       <anypoint.platform.platform_base_uri>https://anypoint.mulesoft.com/apiplatform</anypoint.platform.platform_base_uri>
       <anypoint.platform.contracts_base_uri>https://anypoint.mulesoft.com/apigateway/ccs</anypoint.platform.contracts_base_uri>
       <anypoint.platform.client_id>${env.ANYPOINT_CLIENT_ID}</anypoint.platform.client_id>
       <anypoint.platform.client_secret>${env.ANYPOINT_CLIENT_SECRET}</anypoint.platform.client_secret>
       <lc.profile.env>${lc.profile.env}</lc.profile.env>
       <lc.profile.api.version>${lc.profile.api.version}</lc.profile.api.version>
       <lc.anypoint.api.name>${lc.anypoint.api.name}</lc.anypoint.api.name>
    </properties>
  </configuration>
  <executions>
    <execution>
      <id>deploy-cloudhub</id>
      <phase>deploy</phase>
      <goals>
        <goal>deploy</goal>
      </goals>
    </execution>
  </executions>
</plugin>

The applicationName depends on properties and if it contains UPPERCASE letters, those letters will be lowercased after the deployment as shown on the Anypoint runtime manager.

And the end, i guess a possible root cause of the error is In the CloudhubDeployer.java, the string comparison at line 97 is case sensitive.

So during the redeployment, the findApplicationFromCurrentUser() would return null since the the string comparison is case sensitive and resulted in Domain is not available error.

Specify applicationโ€™s filepath by <application> in cloudhub deployment causes invalid domain error

Version: 2.2.1

According to the documentation, the <application> set in the plugin configuration is for specifying the artifact file path. i found that if i only include <application> without <applicationName>, the deployment will failed due to the following error.

[ERROR] Failed: 400 Bad Request: {"message":"Domains can only contain upto 42 alpha numeric characters and dashes and cannot end with a dash."}
[ERROR] Failed to deploy abc.zip: Failed to deploy application abc.zip
org.mule.tools.maven.plugin.mule.DeploymentException: Failed to deploy application abc.zip
	at org.mule.tools.maven.plugin.mule.cloudhub.CloudhubDeployer.deploy(CloudhubDeployer.java:102)
	at org.mule.tools.maven.plugin.mule.DeployMojo.deployWithDeployer(DeployMojo.java:194)
	at org.mule.tools.maven.plugin.mule.DeployMojo.cloudhub(DeployMojo.java:171)
	at org.mule.tools.maven.plugin.mule.DeployMojo.doExecute(DeployMojo.java:157)
	at org.mule.tools.maven.plugin.mule.AbstractMuleMojo.execute(AbstractMuleMojo.java:214)
	at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:154)
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:146)
	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:117)
	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:81)
	at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
	at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:309)
	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:194)
	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:107)
	at org.apache.maven.cli.MavenCli.execute(MavenCli.java:993)
	at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:345)
	at org.apache.maven.cli.MavenCli.main(MavenCli.java:191)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
	at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
	at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
	at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: org.mule.tools.maven.plugin.mule.ApiException: 400 Bad Request: {"message":"Domains can only contain upto 42 alpha numeric characters and dashes and cannot end with a dash."}
	at org.mule.tools.maven.plugin.mule.cloudhub.CloudhubApi.isNameAvailable(CloudhubApi.java:207)
	at org.mule.tools.maven.plugin.mule.cloudhub.CloudhubDeployer.deploy(CloudhubDeployer.java:64)
	... 26 more

On the other hand, if i include applicationName in the plugin configuration, the deployment works fine.

So these two configs have to go together?

Cannot publish artifact to the Exchange using -DaltDeploymentRepository

I have updated my Maven settings so that the following snippet is present:

<server>
  <id>my-id</id>
  <username>my-user</username>
  <password>{my-encrypted-password}</password>
</server>

I'm also using the default pom.xml that is generated by the Anypoint Studio v7.5.x as soon as you create a new project.
The next step is to build the project and create an artifact:

mvn clean package -nsu -DskipMunitTests

The final step is to publish the artifact to the Exchange:

$ mvn deploy -DaltDeploymentRepository=my-id::default::https://maven.anypoint.mulesoft.com/api/v1/organizations/my-org-id/maven

Nevertheless, the aforementioned command fails with the following error:

Failed to deploy artifacts: Could not transfer artifact X from/to my-id (https://maven.anypoint.mulesoft.com/api/v1/organizations/my-org-id/maven): (400)

โ†’ Any ideas what needs to be added to the default pom.xml in order to overcome the HTTP 400 error?

Plugin watches the wrong application when more then one application has the same name

When more than one application (deployment) has the same name and one of them is deployed to runtime fabcric there is a chance that the mule maven plugin will wait for the wrong deployment to become ready.

This scenario is possible when you have two applications with the same name in the same environment and one of the applications are on a runtime fabric and the other is on a standalone server. This will result in a faulty timeout when since the expected deployment status for a runtime fabric application will never occur when the mule maven plugin checks the status of the stand alone application.

Reproduce

  • Make sure to have one stand alone server and a runtime fabric cluster in the same environment
  • Create a new application names "echo" deploy it to one of the standalone server
  • Using the mule maven plugin deploy the same application with the same application name ("echo") to the runtime fabric cluster.
  • Even if the deployment is successful the mule maven plugin will timeout since it tries to track the deployment on the standalone server.

Expected result

The mule maven plugin should verify that it is tracking the deployment it just created, not just a deployment with the same name.

Reference to code:
https://github.com/mulesoft/mule-maven-plugin/blob/2.x/mule-deployer/src/main/java/org/mule/tools/verification/fabric/RuntimeFabricDeploymentVerification.java#L71
https://github.com/mulesoft/mule-maven-plugin/blob/3.x/mule-deployer/src/main/java/org/mule/tools/verification/fabric/RuntimeFabricDeploymentVerification.java#L79

ZipArchiverTest failes on Microsoft Windows

When building on Windows the ZipArchiverTest fails with the error

[INFO] Running org.mule.tools.api.util.ZipArchiverTest
[ERROR] Tests run: 2, Failures: 0, Errors: 2, Skipped: 0, Time elapsed: 0 s <<< FAILURE! - in org.mule.tools.api.util.ZipArchiverTest
[ERROR] toZipWithBlackListTest(org.mule.tools.api.util.ZipArchiverTest)  Time elapsed: 0 s  <<< ERROR!
java.nio.file.InvalidPathException: Illegal char <:> at index 2: /C:/projects/mule-maven-plugin/mule-packager/target/test-classes/app-archiver/META-INF
        at org.mule.tools.api.util.ZipArchiverTest.setUp(ZipArchiverTest.java:34)

[ERROR] toZipTest(org.mule.tools.api.util.ZipArchiverTest)  Time elapsed: 0 s  <<< ERROR!
java.nio.file.InvalidPathException: Illegal char <:> at index 2: /C:/projects/mule-maven-plugin/mule-packager/target/test-classes/app-archiver/META-INF
        at org.mule.tools.api.util.ZipArchiverTest.setUp(ZipArchiverTest.java:34)

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Rate-Limited

These updates are currently rate-limited. Click on a checkbox below to force their creation now.

  • Update dependency org.apache.maven:maven-compat to v3.9.7
  • Update dependency com.google.code.gson:gson to v2.11.0
  • Update dependency org.apache.maven.plugin-tools:maven-plugin-annotations to v3.13.0
  • Update dependency org.apache.maven.plugins:maven-compiler-plugin to v3.13.0
  • Update dependency org.apache.maven.plugins:maven-jar-plugin to v3.4.1
  • Update dependency org.apache.maven.plugins:maven-plugin-plugin to v3.13.0
  • Update dependency org.apache.maven.plugins:maven-shade-plugin to v3.5.3
  • Update dependency org.apache.maven.plugins:maven-site-plugin to v3.12.1
  • Update dependency org.apache.maven.plugins:maven-source-plugin to v3.3.1
  • Update dependency org.apache.maven.plugins:maven-surefire-plugin to v3.2.5
  • Update dependency org.assertj:assertj-core to v3.25.3
  • Update dependency org.codehaus.plexus:plexus-classworlds to v2.8.0
  • Update dependency org.mock-server:mockserver-netty to v5.15.0
  • Update dependency org.mule.runtime:mule-dwb-api to v2.8.0-20240422
  • Update dependency org.yaml:snakeyaml to v2.2
  • Update jersey monorepo to v2.43 (org.glassfish.jersey.media:jersey-media-moxy, org.glassfish.jersey.media:jersey-media-multipart, org.glassfish.jersey.core:jersey-client, org.glassfish.jersey.inject:jersey-hk2, org.glassfish.jersey.connectors:jersey-jdk-connector)
  • Update junit5 monorepo to v5.10.2 (org.junit.jupiter:junit-jupiter-params, org.junit.jupiter:junit-jupiter-engine)
  • Update log4j2 monorepo to v2.23.1 (org.apache.logging.log4j:log4j-core, org.apache.logging.log4j:log4j-slf4j-impl)
  • Update dependency com.google.guava:guava to v33
  • Update dependency com.marvinformatics.formatter:formatter-maven-plugin to v2
  • Update dependency com.mulesoft.anypoint:api-gateway-api to v4
  • Update dependency de.skuzzle:semantic-version to v2
  • Update dependency jakarta.ws.rs:jakarta.ws.rs-api to v4
  • Update dependency org.apache.maven.plugins:maven-dependency-plugin to v3
  • Update dependency org.apache.maven.plugins:maven-resources-plugin to v3
  • Update dependency org.json:json to v20240303
  • Update dependency org.mockito:mockito-core to v5
  • Update dependency xml-apis:xml-apis to v2
  • Update jersey monorepo to v3 (major) (org.glassfish.jersey.media:jersey-media-moxy, org.glassfish.jersey.media:jersey-media-multipart, org.glassfish.jersey.core:jersey-client, org.glassfish.jersey.inject:jersey-hk2, org.glassfish.jersey.connectors:jersey-jdk-connector)
  • ๐Ÿ” Create all rate-limited PRs at once ๐Ÿ”

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Ignored or Blocked

These are blocked by an existing closed PR and will not be recreated unless you click a checkbox below.

Detected dependencies

maven
mule-artifact-it/mule-deployer-it/pom.xml
  • org.mule.tools.maven:mule-artifact-it 4.2.0-SNAPSHOT
mule-artifact-it/mule-packager-it/pom.xml
  • org.mule.tools.maven:mule-artifact-it 4.2.0-SNAPSHOT
mule-artifact-it/pom.xml
  • org.skyscreamer:jsonassert 1.5.1
mule-classloader-model/pom.xml
mule-deployer/pom.xml
  • org.apache.maven.plugins:maven-source-plugin 3.2.0
mule-extension-model-loader/pom.xml
  • org.mule.apache:xerces2-xsd11 2.11.3-MULE-002
mule-maven-plugin/pom.xml
  • org.slf4j:jcl-over-slf4j 2.0.13
  • org.apache.maven.plugins:maven-shade-plugin 3.2.3
mule-packager/pom.xml
  • org.apache.maven.resolver:maven-resolver-supplier 1.9.18
pom.xml
  • org.apache.maven.plugins:maven-dependency-plugin 2.10
  • com.mulesoft.mule.distributions:mule-ee-distribution-standalone 4.7.0-SNAPSHOT
  • org.apache.maven.plugins:maven-dependency-plugin 2.10
  • com.mulesoft.mule.distributions:mule-ee-distribution-standalone 4.7.0-SNAPSHOT
  • com.mulesoft.anypoint:api-gateway-api 1.7.0-SNAPSHOT
  • org.apache.maven.plugins:maven-plugin-plugin 3.6.0
  • org.glassfish.jersey.connectors:jersey-jdk-connector 2.35
  • org.mule.runtime:mule-api 1.7.0-SNAPSHOT
  • com.mulesoft.anypoint:mule-module-autodiscovery 4.7.0-SNAPSHOT
  • com.mulesoft.mule.runtime:mule-core-ee 4.7.0-SNAPSHOT
  • org.mule.runtime:mule-dwb-api 2.5.0
  • com.mulesoft.mule.runtime.modules:mule-runtime-ee-extension-model 4.7.0-SNAPSHOT
  • org.mule.runtime:mule-module-deployment-model-impl 4.7.0-SNAPSHOT
  • org.mule.runtime:mule-module-artifact 4.7.0-SNAPSHOT
  • org.mule.runtime:mule-module-properties-config 4.7.0-SNAPSHOT
  • org.mule.runtime:mule-module-container 4.7.0-SNAPSHOT
  • org.mule.runtime:mule-module-extensions-xml-support 4.7.0-SNAPSHOT
  • org.mule.runtime:mule-artifact-ast 1.3.0-SNAPSHOT
  • org.mule.runtime:mule-artifact-ast-xml-parser 1.3.0-SNAPSHOT
  • org.mule.runtime:mule-artifact-ast-serialization 1.3.0-SNAPSHOT
  • xml-apis:xml-apis 1.4.01
  • org.mule:mule-maven-client-impl 2.1.0
  • org.mule.tools.maven:exchange-mule-plugin-utils 0.0.23
  • org.apache.maven:maven-compat 3.9.6
  • org.apache.maven.shared:maven-verifier 1.8.0
  • org.apache.maven.plugin-tools:maven-plugin-annotations 3.8.1
  • org.json:json 20231013
  • org.apache.logging.log4j:log4j-slf4j-impl 2.22.1
  • org.apache.logging.log4j:log4j-core 2.22.1
  • org.slf4j:slf4j-api 2.0.7
  • org.slf4j:slf4j-simple 2.0.7
  • org.codehaus.plexus:plexus-classworlds 2.6.0
  • com.google.code.gson:gson 2.8.9
  • com.google.guava:guava 32.0.0-jre
  • commons-io:commons-io 2.8.0
  • org.apache.commons:commons-lang3 3.12.0
  • org.apache.commons:commons-exec 1.2
  • org.apache.commons:commons-collections4 4.4
  • jakarta.ws.rs:jakarta.ws.rs-api 2.1.6
  • org.codehaus.plexus:plexus-archiver 4.9.0
  • com.vdurmont:semver4j 3.1.0
  • de.skuzzle:semantic-version 1.2.0
  • org.yaml:snakeyaml 2.0
  • org.glassfish.jersey.inject:jersey-hk2 2.35
  • org.glassfish.jersey.core:jersey-client 2.35
  • org.glassfish.jersey.media:jersey-media-multipart 2.35
  • org.glassfish.jersey.media:jersey-media-moxy 2.31
  • org.junit.jupiter:junit-jupiter-engine 5.9.3
  • org.junit.jupiter:junit-jupiter-params 5.9.3
  • org.assertj:assertj-core 3.24.2
  • org.mockito:mockito-core 4.11.0
  • org.mock-server:mockserver-netty 5.7.2
  • org.codehaus.plexus:plexus-utils 4.0.0
  • org.apache.maven.plugins:maven-resources-plugin 2.7
  • org.apache.maven.plugins:maven-compiler-plugin 3.8.1
  • com.mycila:license-maven-plugin 4.2
  • com.mulesoft.license:license 1.4.0
  • com.marvinformatics.formatter:formatter-maven-plugin 1.9.2
  • org.jacoco:jacoco-maven-plugin 0.8.11
  • org.apache.maven.plugins:maven-surefire-plugin 3.0.0
  • org.apache.maven.plugins:maven-site-plugin 3.7.1
  • org.apache.maven.plugins:maven-jar-plugin 3.2.0
  • com.github.spotbugs:spotbugs-maven-plugin 4.7.2.1
  • org.jacoco:jacoco-maven-plugin 0.8.11
  • com.github.spotbugs:spotbugs-maven-plugin 4.7.2.1

  • Check this box to trigger a request for Renovate to run again on this repository

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Rate Limited

These updates are currently rate limited. Click on a checkbox below to force their creation now.

  • Update dependency org.apache.maven.plugins:maven-plugin-plugin to v3.6.4
  • Update dependency org.apache.maven.plugins:maven-source-plugin to v3.2.1
  • Update dependency org.jacoco:jacoco-maven-plugin to v0.8.8
  • Update dependency org.jdom:jdom2 to v2.0.6.1
  • Update dependency org.mule.runtime:mule-api to v1.5.0-20220922
  • Update dependency org.mule.runtime:mule-artifact-ast-serialization to v1.1.0-20220922
  • Update dependency org.mule.runtime:mule-artifact-ast-xml-parser to v1.1.0-20220922
  • Update dependency org.skyscreamer:jsonassert to v1.5.1
  • Update mule.version to v4.5.0-20220922 (org.mule.runtime:mule-module-artifact-activation, org.mule.runtime:mule-module-deployment-model-impl, com.mulesoft.mule.runtime.modules:mule-runtime-ee-extension-model, org.mule.runtime:mule-module-tls, org.mule.runtime:mule-module-javaee, org.mule.runtime:mule-module-extensions-xml-support, com.mulesoft.anypoint:mule-module-autodiscovery, com.mulesoft.mule.runtime:mule-core-ee, org.mule.runtime:mule-module-logging)
  • Update powermock.version to v2.0.9 (org.powermock:powermock-api-mockito2, org.powermock:powermock-module-junit4)
  • Update dependency com.github.spotbugs:spotbugs to v4.7.2
  • Update dependency com.github.spotbugs:spotbugs-maven-plugin to v4.7.2.0
  • Update dependency com.google.guava:guava to v27.1-jre
  • Update dependency commons-cli:commons-cli to v1.5.0
  • Update dependency commons-io:commons-io to v2.11.0
  • Update dependency org.apache.commons:commons-lang3 to v3.12.0
  • Update dependency org.apache.maven.plugins:maven-compiler-plugin to v3.10.1
  • Update dependency org.apache.maven.plugins:maven-enforcer-plugin to v3.1.0
  • Update dependency org.apache.maven.plugins:maven-jar-plugin to v3.3.0
  • Update dependency org.mockito:mockito-core to v2.28.2
  • Update dependency org.mule:mule-maven-client-impl to v1.7.0-20220922
  • Update dependency org.yaml:snakeyaml to v1.33
  • Update jersey monorepo to v2.37 (org.glassfish.jersey.media:jersey-media-moxy, org.glassfish.jersey.media:jersey-media-multipart, org.glassfish.jersey.core:jersey-client)
  • Update dependency com.google.guava:guava to v31
  • Update dependency com.marvinformatics.formatter:formatter-maven-plugin to v2
  • Update dependency com.mulesoft.anypoint:api-gateway-api to v4
  • Update dependency com.mycila:license-maven-plugin to v4
  • Update dependency com.vdurmont:semver4j to v3
  • Update dependency commons-logging:commons-logging to v99
  • Update dependency de.skuzzle:semantic-version to v2
  • Update dependency org.apache.maven.plugins:maven-dependency-plugin to v3
  • Update dependency org.apache.maven.plugins:maven-resources-plugin to v3
  • Update dependency org.apache.maven.shared:maven-dependency-tree to v3
  • Update dependency org.codehaus.plexus:plexus-archiver to v4
  • Update dependency org.codehaus.plexus:plexus-component-annotations to v2
  • Update dependency org.codehaus.plexus:plexus-container-default to v2
  • Update dependency org.mockito:mockito-core to v4
  • Update dependency org.slf4j:slf4j-api to v2
  • Update jersey monorepo to v3 (major) (org.glassfish.jersey.media:jersey-media-moxy, org.glassfish.jersey.media:jersey-media-multipart, org.glassfish.jersey.core:jersey-client)

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

maven
mule-artifact-it/mule-deployer-it/pom.xml
  • org.mule.tools.maven:mule-artifact-it 3.9.0-SNAPSHOT
  • org.mule.tools.maven:mule-maven-plugin ${project.version}
mule-artifact-it/mule-packager-it/pom.xml
  • org.mule.tools.maven:mule-artifact-it 3.9.0-SNAPSHOT
  • org.mule.tools.maven:mule-maven-plugin ${project.version}
mule-artifact-it/pom.xml
  • org.mule.tools.maven:mule-artifact-tools 3.9.0-SNAPSHOT
mule-classloader-model/pom.xml
  • org.mule.tools.maven:mule-artifact-tools 3.9.0-SNAPSHOT
mule-deployer/pom.xml
  • org.mule.tools.maven:mule-artifact-tools 3.9.0-SNAPSHOT
  • org.apache.maven.plugins:maven-source-plugin 3.2.0
  • org.mule.tools.maven:mule-classloader-model ${project.version}
mule-extension-model-loader/pom.xml
  • org.mule.tools.maven:mule-artifact-tools 3.9.0-SNAPSHOT
  • org.mule.runtime:mule-artifact-ast-xml-parser 1.1.0-20220622
  • org.mule.runtime:mule-artifact-ast-serialization 1.1.0-20220622
  • com.mulesoft.anypoint:api-gateway-api 1.5.0-20220125
mule-maven-plugin/pom.xml
  • org.mule.tools.maven:mule-artifact-tools 3.9.0-SNAPSHOT
  • ${project.groupId}:mule-packager ${project.version}
  • ${project.groupId}:mule-deployer ${project.version}
  • org.apache.maven.plugins:maven-shade-plugin 3.2.3
mule-packager/pom.xml
  • org.mule.tools.maven:mule-artifact-tools 3.9.0-SNAPSHOT
  • org.mule.tools.maven:mule-classloader-model ${project.version}
  • org.mule.tools.maven:mule-deployer ${project.version}
  • org.mule.tools.maven:mule-extension-model-loader ${project.version}
pom.xml
  • org.apache.maven.plugins:maven-dependency-plugin 2.10
  • com.mulesoft.mule.distributions:mule-ee-distribution-standalone 4.4.0
  • org.apache.maven.plugins:maven-dependency-plugin 2.10
  • com.mulesoft.mule.distributions:mule-ee-distribution-standalone 4.4.0
  • org.mule.runtime:mule-module-logging 4.5.0-20220622
  • com.mulesoft.mule.runtime:mule-core-ee 4.5.0-20220622
  • com.mulesoft.anypoint:mule-module-autodiscovery 4.5.0-20220622
  • org.mule.runtime:mule-module-extensions-xml-support 4.5.0-20220622
  • org.mule.runtime:mule-module-javaee 4.5.0-20220622
  • org.mule.runtime:mule-module-tls 4.5.0-20220622
  • com.mulesoft.mule.runtime.modules:mule-runtime-ee-extension-model 4.5.0-20220622
  • org.mule.runtime:mule-module-deployment-model-impl 4.5.0-20220622
  • org.mule.runtime:mule-module-artifact-activation 4.5.0-20220622
  • org.mule.runtime:mule-api 1.5.0-20220622
  • org.mule:mule-maven-client-impl 1.6.0
  • org.apache.maven.plugins:maven-plugin-plugin 3.6.0
  • org.apache.maven:maven-plugin-api 3.8.6
  • org.sonatype.plexus:plexus-sec-dispatcher 1.4
  • org.apache.maven:maven-core 3.8.6
  • org.apache.maven.plugin-tools:maven-plugin-annotations 3.6.0
  • org.mule:mule-maven-client-impl 1.6.0
  • org.apache.commons:commons-compress 1.21
  • org.codehaus.plexus:plexus-archiver 3.7.0
  • org.mule.runtime:mule-api 1.5.0-20220622
  • org.mule.tools.maven:exchange-mule-plugin-utils 0.0.17
  • org.apache.commons:commons-lang3 3.10
  • org.apache.commons:commons-collections4 4.4
  • org.apache.commons:commons-exec 1.2
  • commons-io:commons-io 2.7
  • commons-logging:commons-logging 1.2
  • commons-cli:commons-cli 1.4
  • org.jdom:jdom2 2.0.6
  • com.google.guava:guava 27.0-jre
  • com.google.code.gson:gson 2.8.6
  • org.yaml:snakeyaml 1.26
  • com.vdurmont:semver4j 2.2.0
  • de.skuzzle:semantic-version 1.2.0
  • org.glassfish.jersey.core:jersey-client 2.25
  • org.glassfish.jersey.media:jersey-media-multipart 2.25
  • org.glassfish.jersey.media:jersey-media-moxy 2.31
  • org.slf4j:slf4j-api 1.8.0-beta2
  • javax.activation:javax.activation-api 1.2.0
  • javax.xml.bind:jaxb-api 2.3.1
  • org.codehaus.plexus:plexus-component-annotations 1.7.1
  • org.apache.maven:maven-compat 3.8.6
  • org.codehaus.plexus:plexus-container-default 1.7.1
  • org.apache.maven.shared:maven-dependency-tree 1.2
  • org.apache.maven.shared:maven-verifier 1.8.0
  • org.apache.maven.plugins:maven-verifier-plugin ${maven.verifier.plugin.version}
  • junit:junit 4.13
  • org.hamcrest:hamcrest-all 1.3
  • org.mockito:mockito-core 2.23.4
  • org.powermock:powermock-module-junit4 2.0.0
  • org.powermock:powermock-api-mockito2 2.0.0
  • org.mock-server:mockserver-netty 5.7.2
  • log4j:log4j 1.2.17
  • org.skyscreamer:jsonassert 1.5.0
  • org.apache.maven.plugins:maven-resources-plugin 2.7
  • org.apache.maven.plugins:maven-compiler-plugin 3.8.1
  • com.mycila:license-maven-plugin 2.11
  • com.marvinformatics.formatter:formatter-maven-plugin 1.9.2
  • org.apache.maven.plugins:maven-surefire-plugin 2.22.2
  • org.apache.maven.plugins:maven-jar-plugin 3.2.0
  • com.github.spotbugs:spotbugs-maven-plugin 4.1.3
  • com.github.spotbugs:spotbugs 4.2.0
  • org.jacoco:jacoco-maven-plugin 0.8.6
  • org.apache.maven.plugins:maven-enforcer-plugin 3.0.0-M3
  • org.jacoco:jacoco-maven-plugin 0.8.6
  • com.github.spotbugs:spotbugs-maven-plugin 4.1.3

_muleExlude to ignore files/folders - NOT WORKING

The ignore files or folders to be the part of application package is not working as expected.

Even after including the files name as per the glob pattern or regex or the exact file name it is still packaging the files as part of the jar being built.

Same issue has been addressed in the following stackoverflow also;

https://stackoverflow.com/questions/62317738/how-to-exclude-properties-files-when-packaging-mule-4-project

Can anyone suggest if this really is a bug or am i getting it wrong?

I followed the official documentation https://docs.mulesoft.com/mule-runtime/4.3/package-a-mule-application#exclude-files-from-the-application-package and also few help forum topics https://help.mulesoft.com/s/article/How-to-exclude-the-file-or-folder-at-the-root-level-of-the-mule-application-package-using-muleExclude but in vain.

Do not use File.isHidden() as it is platform-specific

At a few places, such as this, the plug-in uses java.io.File.isHidden() to decide whether to ignore a file.

However, the behavior of File.isHidden() is platform-dependant. On Unixes, it considers files starting with "." to be hidden. On Windows, only files that actually have the "hidden" attribute set are considered hidden.

That produces results that are different depending on the platform. For instance:

mvn package -DonlyMuleSources=true

will result in a JAR file that contains any files starting with "." on Windows, but not on Linux/MacOS.

A workaround could be to consider a file hidden if it either starts with "." or File.isHidden().

The configuration httpHeaders in pom server settings is not working

I have a project in gitlab, and for deploy to a gitlab maven registry, I need to set the custom http header in maven settings file (so-called ci_settings.xml):

<?xml version="1.0"?>
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
    <servers>
        <server>
            <id>gitlab-maven</id>
            <configuration>
                <httpHeaders>
                    <property>
                        <name>Job-Token</name>
                        <value>${env.CI_JOB_TOKEN}</value>
                    </property>
                </httpHeaders>
            </configuration>
        </server>
    </servers>
</settings>

But when I try to deploy to the gitlab maven registry, I got a error 401 and I got a nothing for dependencies (404?). I tried open netcat server nc -l 7777 to see requests and I got this โŒ (bad):

GET /api/v4/projects/123/packages/maven/my/example/group/my-example-connector/1.0.0/my-example-connector-1.0.0.pom HTTP/1.1
Cache-Control: no-cache, no-store
Pragma: no-cache
Host: localhost:7777
Connection: Keep-Alive
User-Agent: Apache-Maven/3.8.6 (Java 11.0.16; Linux 6.5.0-28-generic)
Accept-Encoding: gzip,deflate

When I use 3.8.2, I got this โœ… (good):

GET /api/v4/projects/123/packages/maven/my/example/group/my-example-connector/1.0.0/my-example-connector-1.0.0.pom HTTP/1.1
Cache-control: no-cache
Pragma: no-cache
Job-Token: ${env.CI_JOB_TOKEN}
Host: localhost:7777
Connection: Keep-Alive
User-Agent: Apache-HttpClient/4.5.13 (Java/11.0.16)
Accept-Encoding: gzip,deflate

For tests this issue, I manipulate this part of my pom.xml:

<properties>
    <app.runtime>4.4.0</app.runtime>
    <mule.maven.plugin.version>4.1.0</mule.maven.plugin.version>
</properties>
result mule.maven.plugin.version app.runtime
โŒ BAD 3.0.0 4.4.0
โŒ BAD 3.0.1 4.4.0
โŒ BAD 3.3.4 4.4.0
โŒ BAD 3.4.2 4.4.0
โœ… OK 3.5.1 4.0.0, 4.4.0
โœ… OK 3.5.3 4.4.0
โœ… OK 3.6.3 4.4.0
โœ… OK 3.7.3 4.4.0
โœ… OK 3.8.0 4.4.0
โœ… OK 3.8.2 4.4.0, 4.6.0
โœ… OK 3.8.7 4.4.0, 4.6.0
โŒ BAD 4.0.0 4.4.0, 4.6.0
โŒ BAD 4.1.0 4.4.0, 4.6.0
โŒ BAD 4.1.2 4.4.0, 4.6.0

I did not check the build result to see if it actually runs on mule-runtime. I only checked whether the header was inserted or not.

When I disable the plugin, the dependencies are downloaded, but then there are difficulties with placing the jar in the gitlab maven registry. I have to use maven low level or even use curl.

Does anyone know

  1. If mule-maven-plugin actually affects the maven settings file? Or is it some property or some dependency that does this?
  2. Have I specified the http header settings correctly?
  3. Is there any plan to support custom http headers?

MuleLifecycleMapping refers to non existing plugin

/mule-maven-plugin/mule-maven-plugin/src/main/java/org/mule/tools/maven/mojo/model/lifecycle/mapping/project/MuleLifecycleMapping.java
is referring to maven-site-plugin:3.6.1 but that is not existing.
https://search.maven.org/search?q=g:org.apache.maven.plugins%20AND%20a:maven-site-plugin&core=gav
image

Problem is that

  • Create a blank new Mule4 project
  • mvn org.apache.maven.plugins:maven-dependency-plugin:3.1.1:go-offline
    => fails with
    [ERROR] Failed to execute goal org.apache.maven.plugins:maven-dependency-plugin:3.1.1:resolve-plugins (resolve-plugins) on project bug-xmlmodule-fails: Could not find artifact org.apache.maven.plugins:maven-site-plugin:jar:3.6.1 in centralMirror

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.