Mule Plugin for Maven - maven

I'm using the mule-maven-plugin as explained here: https://docs.mulesoft.com/mule-user-guide/v/3.7/mule-maven-plugin#running-integration-tests , using "mvn deploy" will donwload the mule 3.7.2 to the target folder but standalone won't fire up, instead it throws this error
The Mule Enterprise Edition service was launched, but failed to start.
If i manually trigger the mule.bat everything works as expected and standalone is able to run the projects on the app/ folder.
Logs: https://drive.google.com/folderview?id=0B-RSwLHJZLJqckJESVJpMEJqeUU&usp=sharing

Carlos, I see a couple of thigs in the logs:
Unable to install the Mule Enterprise Edition service - El servicio especificado ya existe. (0x431)
Probably you already have a Mule service running, can you try stopping it before running the plugin?
[INFO] Using MULE_HOME: C:\cygwin64\home\Carlos Parra\workspace\mule\dummy-project\target\mule-enterprise-standalone-3.7.2
If (1) doesn't solve the problem can you try to use a directory without spaces?
Please tell me if this works.

Related

Problem running BIRTViewer in Oracle Weblogic 14.1.1

I have created a war file of birt-runtime-4.12.0-20221128 as in the instructions for POJO deploymnet. I am running weblogic 14.1.1 and I can successfully deploy it. Weblogic is running Java Version: 1.8.0_331. Is this sufficient?
When I browse to the following path: http://localhost:7001/birt/index.jsp
I get the following error: Error 404--Not Found
Any suggestions on how to make it work?
I tried building it many times and many ways and this is the only way that it successfully deployed but doesnt work.
Sorry, but BIRT 4.12 needs Java >= 11.

exec-maven-plugin cannot run "mvn" command on Windows machine

I have a Spring Boot 2 project which is a ReST API, and I am using Spring Rest.
I am using 2 plugins to generate an SDK other projects to import to call my API. The first plugin is com.github.kongchen:swagger-maven-plugin:3.17 to generate the swagger-codegen-spec file, and the second is org.openapitools:openapi-generator-maven-plugin:3.2.3 to then generate the actual SDK files as another mvn project.
Finally, I have automated component tests that use that SDK to run tests against the running API.
My goal, is to actually BUILD the SDK as part of the original project build. So when I run "mvn install" on my-api-project, I end up with the web-app jar AND the sdk jar when it is complete, without having to run "mvn install" on the SDK as a secondary step.
I've successfully accomplished this on Linux/Mac in 2 different ways. First was to use the antrun plugin. However, this did not work on my co-worker's Windows 10, 64 bit machine. He was getting many issues regarding invalid directories and shell not being installed, etc.
So I tried using the exec-maven-plugin instead, which seems to be a lot cleaner, and more OS agnostic. Again, this works great in Linux/Max, but in Windows, now we get this error:
Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.5.0:exec
(build swagger-codegen sources) on project my-api: Command execution
failed.: Cannot run program "C:\Program Files\Apache\maven\bin\mvn"
(in directory
"C:\Users\user1\Documents\GitHub\my-project\my-java-sdk"):
CreateProcess error=193, %1 is not a valid Win32 application -> [Help
1]
When he uses the cmd window he can run "mvn install" in that directory just fine.
Any ideas??
This error was fixed by upgrading the exec-maven-plugin version to the latest version. Spring Boot was supplying the version, which was 1.5.0, but the latest is 1.6.0.

Jenkins Websphere Deployment doesnt retain application configurations

I am using Jenkins version 1.644 and trying to deploy a web application to Websphere 8.5 application server. Jenkins job completed successfully and application is visible through admin console. After the first install, i manually configured Three application configurations namely,
1. Virtual Host
2. Context Root and
3 Modules
after these setup application comes up fine.
Now when i run the Jenkins Job again (option used is Install/Update application), it overrides all the configurations.
Please Let me know how to keep the configurations after each build from Jenkins.
Websphere Plugin Configuration
You can create a build deploy job which will call wsadmin tool and there you can pass parameter in key value pairs
Here is an article which talks about how to build job with parameterized configuration.
http://www.touchdownconsulting.nl/2011/03/building-and-deploying-websphere-applications-with-jenkins-ci/
I have not tried this but looks like it suits your requirement.
Hope this helps!
Current Jenkins Websphere deploy plugin (1.3.4) version does not allow to pass
1. Virtual Host
2. Context Root and
3. Modules
I created a Jython script using AdminApp WAS Utility and updated these parameters
AdminApp.edit("appname", ['-MapWebModToVH', [["appname", "appname.war,WEB-INF/web.xml", "api_host"]]])
AdminApp.edit("appname", ['-CtxRootForWebMod', [["appname", "appname.war,WEB-INF/web.xml", "/appname"]]])
AdminApp.edit("appname",['-MapModulesToServers', [["appname","appname.war,WEB-INF/web.xml","WebSphere:cell=appcell01,node=node12v,server=web2+WebSphere:cell=Cell01,node=node11v,server=web1+WebSphere:cell=Cell01,cluster=api-cluster"]]])
AdminConfig.save()
Used Jenkins Remote SSH Plugin to invoke this script.

Team City: Cannot Redeploy to Tomcat7

I have a build configuration that uses the Team City deployer plugin.
I'm using a container deploy to deploy the war file to Tomcat.7.0.63 installed as a service on a Windows Server 2012 R2 box.
The first time I run the the build, the artifact (a war file_ deploys successfully.
The second time, and all subsequent runs, the deploy fails.
The error message:
Build failure message received: org.codehaus.cargo.container.ContainerException: Failed to undeploy
The log file error:
Caused by: org.codehaus.cargo.container.tomcat.internal.TomcatManagerException: FAIL - Unable to delete
When I go to the webapps folder on the remote server, the war file is deleted, but the expanded folder is only partially deleted. Most files are gone, except for a png file.
I am not able to manually delete the folder because Tomcat still has a lock on it.
If I restart tomcat, I'm then able to run the build successfully (war file deploys).
One thought I had was to restart Tomcat before or after each deploy.
How would I restart Tomcat from TeamCity?
Or perhaps, does anyone have suggestions on how to fix this problem?
You can configure the Tomcat Context using the antiResourceLocking option, as detailed further in the online documentation. This does come with some trade-offs however; definitely worth reading the documentation in full and evaluating if it's a suitable option for your application.

Running mule application in MuleStudio

While running mule application in MuleStudio, I see 2 options.
Run As > Mule Application
Run As > Mule Application with Maven
I always used first option which worked fine, until a point of time when I defined maven filter. Using the first option the filters were not getting resolved, so I tried to run using second option which resulted in the following error --
[12:04:57] Starting build...
Error: Could not find or load main class local
I created a test project for sharing this problem and uploaded it on github https://github.com/hshira/mule-mvn-filter
pom.xml > https://github.com/hshira/mule-mvn-filter/blob/master/pom.xml
Please suggest me, what is the right way to resolve filters in MuleStudio.
FYI ... the filtered property is resolved correctly if I build on terminal using mvn command
it could be issue with maven setup on your local machine.

Resources