Git Product home page Git Product logo

maven-mule-rest-plugin's Introduction

#Maven Mule REST Plugin#

This is a project to utilize the RESTful interface that is provided for the Management console on Mule ESB's Enterprise Edition.

This plugin assumes that you have configured the maven-mule-plugin to generated the mule application archive

This is a personal project and is not affiliated with MuleSoft or the maven mule plugin in any way.

Example:

<project>
	...
	<build>
		<plugins>
			<plugin>
				<groupId>com.github.nicholasastuart</groupId>
				<artifactId>mule-mmc-rest-plugin</artifactId>
				<version>1.2.0</version>
			</plugin>
		</plugins>
	</build>
	...
</project>

Calling the plugin

There is only one goal, deploy. To call the plugin, do the following

mule-mmc-rest-plugin:deploy

This goal will

  • delete an existing mule application archive from the MMC Repository if version contains "SNAPSHOT"
  • upload the mule application archive to the MMC Repository
  • delete an existing deployment having the same application name
  • create a new deployment this the uploaded archive, with target the given serverGroup
  • perform a deploy request to make MMC deploy into target server group

Security

In order to post to the Mule Repository, you need only these permissions:

  • Repository Read
  • Repository Modify

Configuration Options

Property Description Default
muleApiUrl The URL of the Mule MMC API (usually .../api) http://localhost:8585/mmc/api
name What to name the application when it is uploaded to the repository MuleApplication
deploymentName What to name the deployment when it is uploaded to the repository same as name
version What version to give the software when it is uploaded to the repository Current Time, in MM-dd-yyyy HH:mm:ss format
serverGroup The name of the target Mule serverGroup
password The password to the Mule MMC API.
username The username to the Mule MMC API.

maven-mule-rest-plugin's People

Contributors

dfundak avatar joeltucci avatar mjhoffman65 avatar nicholasastuart avatar palma avatar rhoegg avatar

Stargazers

 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

maven-mule-rest-plugin's Issues

How to get 1.2.2 SNAPSHOT version?

From the maven2 repository, I can only get 1.2.0 plugin version
After I git clone the source code and compile (mvn clean package), I get the following error:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-javadoc-plugin:3.0.0:jar (attach-javadocs) on project mule-mmc-rest-plugin: MavenReportException: Error while generating Javadoc:
[ERROR] Exit code: 1 - D:\gitDirectory\Maven-Mule-REST-Plugin\src\main\java\org\mule\tools\maven\rest\Deploy.java:16: error: unknown tag: goal
[ERROR] * @goal deploy
[ERROR] ^
[ERROR] D:\gitDirectory\Maven-Mule-REST-Plugin\src\main\java\org\mule\tools\maven\rest\Deploy.java:17: error: unknown tag: execute
[ERROR] * @execute phase="compile"
[ERROR] ^
[ERROR] D:\gitDirectory\Maven-Mule-REST-Plugin\src\main\java\org\mule\tools\maven\rest\Deploy.java:18: error: unknown tag: requiresDirectInvocation [ERROR] * @requiresDirectInvocation true
[ERROR] ^
[ERROR] D:\gitDirectory\Maven-Mule-REST-Plugin\src\main\java\org\mule\tools\maven\rest\Deploy.java:19: error: unknown tag: requiresDependencyResolution
[ERROR] * @requiresDependencyResolution runtime
[ERROR] ^
[ERROR] D:\gitDirectory\Maven-Mule-REST-Plugin\src\main\java\org\mule\tools\maven\rest\Deploy.java:84: error: unknown tag: parameter
[ERROR] * @parameter expression="${basedir}/src/main/app"
[ERROR] ^
[ERROR] D:\gitDirectory\Maven-Mule-REST-Plugin\src\main\java\org\mule\tools\maven\rest\Deploy.java:85: error: unknown tag: required
[ERROR] * @required
[ERROR] ^
[ERROR] D:\gitDirectory\Maven-Mule-REST-Plugin\src\main\java\org\mule\tools\maven\rest\Deploy.java:102: error: unknown tag: parameter
[ERROR] * @parameter expression="${clusterName}"
[ERROR] ^
[ERROR] D:\gitDirectory\Maven-Mule-REST-Plugin\src\main\java\org\mule\tools\maven\rest\Deploy.java:55: error: unknown tag: parameter
[ERROR] * @parameter expression="${deploymentName}"
[ERROR] ^
[ERROR] D:\gitDirectory\Maven-Mule-REST-Plugin\src\main\java\org\mule\tools\maven\rest\Deploy.java:37: error: unknown tag: parameter
[ERROR] * @parameter alias="appName" expression="${appName}"
[ERROR] ^
[ERROR] D:\gitDirectory\Maven-Mule-REST-Plugin\src\main\java\org\mule\tools\maven\rest\Deploy.java:39: error: unknown tag: required
[ERROR] * @required
[ERROR] ^
[ERROR] D:\gitDirectory\Maven-Mule-REST-Plugin\src\main\java\org\mule\tools\maven\rest\Deploy.java:90: error: unknown tag: parameter
[ERROR] * @parameter expression="muleApiUrl"
[ERROR] ^
[ERROR] D:\gitDirectory\Maven-Mule-REST-Plugin\src\main\java\org\mule\tools\maven\rest\Deploy.java:91: error: unknown tag: required
[ERROR] * @required
[ERROR] ^
[ERROR] D:\gitDirectory\Maven-Mule-REST-Plugin\src\main\java\org\mule\tools\maven\rest\Deploy.java:47: error: unknown tag: parameter
[ERROR] * @parameter expression="${name}"
[ERROR] ^
[ERROR] D:\gitDirectory\Maven-Mule-REST-Plugin\src\main\java\org\mule\tools\maven\rest\Deploy.java:30: error: unknown tag: parameter
[ERROR] * @parameter expression="${project.build.directory}"
[ERROR] ^
[ERROR] D:\gitDirectory\Maven-Mule-REST-Plugin\src\main\java\org\mule\tools\maven\rest\Deploy.java:31: error: unknown tag: required
[ERROR] * @required
[ERROR] ^
[ERROR] D:\gitDirectory\Maven-Mule-REST-Plugin\src\main\java\org\mule\tools\maven\rest\Deploy.java:76: error: unknown tag: parameter
[ERROR] * @parameter expression="${password}"
[ERROR] ^
[ERROR] D:\gitDirectory\Maven-Mule-REST-Plugin\src\main\java\org\mule\tools\maven\rest\Deploy.java:77: error: unknown tag: required
[ERROR] * @required
[ERROR] ^
[ERROR] D:\gitDirectory\Maven-Mule-REST-Plugin\src\main\java\org\mule\tools\maven\rest\Deploy.java:96: error: unknown tag: parameter
[ERROR] * @parameter expression="${serverGroup}"
[ERROR] ^
[ERROR] D:\gitDirectory\Maven-Mule-REST-Plugin\src\main\java\org\mule\tools\maven\rest\Deploy.java:97: error: unknown tag: required
[ERROR] * @required
[ERROR] ^
[ERROR] D:\gitDirectory\Maven-Mule-REST-Plugin\src\main\java\org\mule\tools\maven\rest\Deploy.java:70: error: unknown tag: parameter
[ERROR] * @parameter expression="${username}"
[ERROR] ^
[ERROR] D:\gitDirectory\Maven-Mule-REST-Plugin\src\main\java\org\mule\tools\maven\rest\Deploy.java:71: error: unknown tag: required
[ERROR] * @required
[ERROR] ^
[ERROR] D:\gitDirectory\Maven-Mule-REST-Plugin\src\main\java\org\mule\tools\maven\rest\Deploy.java:63: error: unknown tag: parameter
[ERROR] * @parameter expression="${version}"
[ERROR] ^
[ERROR]
[ERROR] Command line was: "C:\Program Files\Java\jdk1.8.0_152\jre..\bin\javadoc.exe" @options @packages
[ERROR]
[ERROR] Refer to the generated Javadoc files in 'D:\gitDirectory\Maven-Mule-REST-Plugin\target\apidocs' dir.
[ERROR]
[ERROR] -> [Help 1]
[ERROR]

Can you tell me why I get these errors? Thank you very much.

HTTPException: HTTP response '409: The operation was unsuccessful because a resource with that name already exists

I am getting following error while deploying application using Maven/mule-mmc-rest plugin

[ERROR] Failed to execute goal com.github.nicholasastuart:mule-mmc-rest-plugin:1.2.0:deploy (mule-mmc-upload) on project project1: Error in attempting to deploy archive: org.apache.cxf.transport.http. HTTPException: HTTP response '409: The operation was unsuccessful because a resource with that name already exists.' when communicating with http://localhost:8585/mmc-3.7.0/api -> [Help 1]

http://forums.mulesoft.com/questions/38972/deployment-failing-while-deploying-using-mavenmule.html#answer-39109

Java Version : javac 1.8.0_45
OS : Microsoft Windows [Version 6.1.7601]
MMC: mmc-3.7.0
Mule: mule-enterprise-3.7.0

The default version is rejected by MMC 3.4.1

While deploying a new appliation to the repository I noticed that the default version that is generated by the plugin contains a space. This leads tot he following response from the API:
{"message":"Unrecognized argument: Application version <11-25-2013 09:55:00> is not valid: must not contain any of <[, /, *, ?, ", <, >, |, +, -v, ]>."}

Would be best in my opinion to define the format as 'yyyyMMdd-HH:mm' so it matches the version that is generated when uploaded manually.

Trying to use plug-in throws malformed URL exception

Using plug in in Maven with muleApiUrl= "http://tribmuledev.tribpub.com:8080/mmc-console-3.5.3/api"

Throws: [ERROR] Failed to execute goal com.github.nicholasastuart:mule-mmc-rest-plugin:1
.2.0:deploy (default-cli) on project axsyncservice: Unable to parse configuratio
n of mojo com.github.nicholasastuart:mule-mmc-rest-plugin:1.2.0:deploy for param
eter muleApiUrl: Cannot convert 'muleApiUrl' to URL: no protocol: muleApiUrl ->
[Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal c
om.github.nicholasastuart:mule-mmc-rest-plugin:1.2.0:deploy (default-cli) on pro
ject axsyncservice: Unable to parse configuration of mojo com.github.nicholasast
uart:mule-mmc-rest-plugin:1.2.0:deploy for parameter muleApiUrl: Cannot convert
'muleApiUrl' to URL

Support "upserting" artifacts

If I use the plug-in as part of a CI build, mule-rest:deploy fails after the first deploy because an artifact with the same version (say "1.0-SNAPSHOT") already exists.

It would be nice to offer the option to upsert the artifact, ie insert it if new or update it if already existing.

Maven deployment error for https

Hi,

Am using this plugin to deploy mule application to mmc via maven, however since the mmc is enabled ssl configuration is throwing error for ssl handshake. how could this be rectified to have successful deployment.

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.