Mule ESB: Maven build fails on /nexus path when trying to deploy Mule project to Cloudhub through Command prompt - mule

I'm trying to deploy Mule project to cloudhub using command prompt. I'm getting the below error:
" Illegal path attribute "/nexus". Path of origin: "/snapshots/org/mule/modules/mule-module- cloudhub/3.0.0-SNAPSHOT/mule-module-cloudhub-3.0.0-20140909.225040-1.pom"
I have tried to remove repository for nexus, but I got the same error. Also referred the url
Connection to http://dev.ee.mulesource.com refused: Operation timed out
Why do Mule Studio 3.4 Builds with Maven Fail or Hangs Indefinitely?
But, when I try to deploy using anypoint GUI, it is being deployed in cloudhub. Problem arises when it comes to console.
Please find my pom repository for Nexus
<repository>
<id>mule-ee-releases</id>
<name>Mule Release Repository</name>
<url>https://repository-master.mulesoft.org/nexus/content/repositories/ci-releases/</url>
</repository>
</repositories>
Settings.xml
<?xml version="1.0" encoding="UTF-8"?>
<settings xmlns="http://maven.apache.org/SETTINGS/1.1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.1.0 http://maven.apache.org/xsd/settings-1.1.0.xsd">
<pluginGroups>
<pluginGroup>org.mule.tools</pluginGroup>
</pluginGroups>
<servers>
<server>
<id>cloudhub.io</id>
<username>my_UserName</username>
<password>PWD</password>
</server>
</servers>
</settings>

Looking at the screenshot, it seems you are trying to deploy your project to https://repository-master.mulesoft.org/snapshots/ You apparently haven't provided the credentials to connect to this server so you can't upload your build artifacts there.
You need to either:
provide credentials that authorize you to deploy to repository-master.mulesoft.org, via: https://maven.apache.org/settings.html#Servers
deploy to another repository where you are authorized to do so, via: https://maven.apache.org/pom.html#Distribution_Management

If you are using a reverse proxy and you have different context paths on either side of it you'll need to map cookies as well.
For Apache you can use:
ProxyPassReverseCookiePath /nexus /
For Nexus you can use:
proxy_cookie_path /nexus /;

Related

Start TestExecute from TeamCity

To test our desktop application we are using TestComplete/TestExecute.
We have a Master project that is started on a Management machine.
This Master project doesn't require interaction with the Desktop, it is not testing our App.
This project will start the Slave remote project (actual UI tests of our app that require Desktop Interaction) on different VMs through TestExecute directly.
We are currently moving our Build process to TeamCity. On this Management machine we have a Build Agent from TeamCity. The Build Agent is running as service with a System Account (not the Local System Account).
We are not using the Local System Account (that can interact to the Desktop) because we need a domain account to access domain resources. And we don't want to start the Agent as a process, we want to keep it at a service.
Right now, we can't start TestExecute directly from TeamCity because TestExecute requires an interactive session and the Account of the Build Agent can't interact with Desktop.
We tried with a script (executed from TeamCity) to create a PSSession with a normal user that have access to Desktop and start TestExecute from this PSSession. But this is not working either.
Here is the exception that we had with both cases (directly and through PSSession):
Start-Process : This command cannot be run due to the error: This operation requires an interactive window station.
At line:3 char:9
+ Start-Process "D:\SmartBear\TestExecute 12\Bin\TestExecute.ex ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [Start-Process], InvalidOperationException
+ FullyQualifiedErrorId : InvalidOperationException,Microsoft.PowerShell.Commands.StartProcessCommand
Does anyone have a solution to start tests with TestExecute from TeamCity ? As I said this project doesn't need to interact with desktop, it will start the UI test on different VMs through TestExecute directly.
Or is it possible for a domain system account (like the one we are using) to interact with the Desktop ?
Inside the installation directory of TestExecute, you can find the manifest File TCLauncher.exe.Manifest :
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
<security>
<requestedPrivileges>
<!-- Here is the relevant part -->
<requestedExecutionLevel level="asInvoker" uiAccess="true">
</requestedExecutionLevel>
</requestedPrivileges>
</security>
</trustInfo>
</assembly>
You can configure the uiAccess to false.
If you don't use the TCLauncher, but directly TestExecute.exe, there is also a Manifest file, with the same section <Security> that you can configure.
You also can specify the level, from asInvoker to highestAvailable, but you might be prompted by the UAC.
The easiest thing you can do is to run the master project from Team City and the master project will invoke UI tests on slave machines. Since the master project does not require access to UI elements, there will not be any problems running it within a non-UI session.

Running Jboss 7 using different config folder under standalone-servers

I'm used to jboss 5 deployment schemes where i use this command to deploy:
D:\jboss5\bin\run.bat -c ZZZ
which will deploy whatever in the jboss5\server\ZZZ folder
I have this structure on my jboss7:
D:\jboss7\
+standalone-servers
++ZZZ
+++modules
when i try to run jboss7 like this:
D:\jboss7\bin\standalone-servers.bat -c ZZZ
it complains with the following:
org.jboss.modules.ModuleNotFoundException: Module
org.jboss.as.standalone:main is not found in local module loader
#7559ec47 (roots: D:\jboss7\standalone-servers\modules) at
org.jboss.modules.LocalModuleLoader.findModule(LocalModuleLoader.java:126)
at
org.jboss.modules.ModuleLoader.loadModuleLocal(ModuleLoader.java:275)
at
org.jboss.modules.ModuleLoader.preloadModule(ModuleLoader.java:222)
at
org.jboss.modules.LocalModuleLoader.preloadModule(LocalModuleLoader.java:94)
at org.jboss.modules.ModuleLoader.loadModule(ModuleLoader.java:204)
at org.jboss.modules.Main.main(Main.java:262)
how to tell jboss7 to look for the right configuration that resides in the folder ZZZ?
appreciate for answers
By default the base directory for a standalone JBoss EAP 6 / JBoss AS 7 instance is ${JBOSS_HOME}/standalone
You can override this by supplying -Djboss.server.base.dir=ZZZ
You need to create ZZZ/configuration and ZZZ/deployment directories, and
place your standalone.xml file in ZZZ/configuration, then start jboss using the option.
standalone.bat -Djboss.server.base.dir=path_to_ZZZ
If your JBoss configuration file is not called standalone.xml then you will also need to add
-Dtarget.appserver.configfile=my_standalone_config.xml
The JBoss instance base directory does not need to be within the ${JBOSS_HOME} subdirectory tree. In fact it is better to keep it somewhere separate as it allows you to update / reinstall JBOSS binaries without overwriting your configuration files.
The modules folder should remain within ${JBOSS_HOME}
So if your ${JBOSS_HOME} were c:\jboss7 it would look something like
C:\jboss7
+bin
+modules
+standalone <- not used!
... etc
c:\standalone-servers
+ZZZ
++configuration
+++standalone.xml
++deployments
A possible reason is your jboss runtime is corrupt. Reason for
**org.jboss.modules.ModuleNotFoundException: org.jboss.as.standalone:main
at org.jboss.modules.ModuleLoader.loadModule(ModuleLoader.java:224)
at org.jboss.modules.Main.main(Main.java:341)**
is that jboss-eap-6.2\modules\system\layers\base\org\jboss\as\server\main package is missing inside your jboss directory. This package contains jboss-as-server-7.3.0.Final-redhat-14.jar and module.xml which are essential to run jboss server.

EXT Plugin not able to merge web.xml in liferay 6.0.6 and Weblogic 10.3

I deployed liferay war on weblogic 10.3 and cretaed EXT which have changes in web.xml.
If i deploy this EXT,weblogic doesn't take these changes which is made by web.xml of EXT.
I googled it and found this is issue in liferay 6.0 and resolved in liferay 6.2
please go through below link for more info:
http://issues.liferay.com/browse/LPS-13222
Howerver I found some workaround in liferay wiki which is suggesting to follow below steps.
copy somewhere existing web.xml
deploy EXT plugin
make plan.xml based on differences between the new web.xml and old one
use plan.xml in administration console
But still wondering how to create plan.xml in step3.
So would like to know how can i create plan.xml based on differnce between new web.xml and old one.
You just have to do a diff. Under Linux, open a console.
Try for example
diff web_old.xml web_new.xml > mydiff.patch
It will display the differences between the two files in a file called "mydiff.patch".
Now, you can patch the deployed web.xml (shutdown your server before) :
cd /path-of-the-web.xml-folder-on-the-server
patch -p0 < mydiff.patch
You can also use the svn diff command to make your diff file.
After these operations, restart your server.
Hope it helps.

Maven deploy fails for Apache Archiva

I have a Maven project which generates a 413.06 KB jar file. I have to deploy it on Apache Archiva based managed repository. I have tried to deploy different versions, and it created required layout and structure, uploaded some files, even it uploaded that jar with 200~ KB. every time the jar file size changes but always it fails to upload 413.06 KB jar file.
Information:-
I am running standalone Archiva
I have given guest account to Global Repository Manager & "Repository Manager - MYREPO"
I have also tried a separate account in Archiva with "Repository Manager - MYREPO" rights and configured it in maven's settings.xml file to set custom timeout.
I am getting following error
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy
(default-deploy) on project SharedshelfRepository: Error deploying artifact: Transfer error:
The server did not respond within the configured timeout. -> [Help 1]
that might be maven-deploy-plugin issue, resources plugin itself needs several dependencies,try manually jar nad p
What version of Maven are you using? You might try 3.0.4 as it has a different HTTP library. I'm also not sure if there's more context for what was happening when it timed out (it seems more request oriented rather than deploy oriented, and deploy does request some metadata).
I can't see that you'd need to alter the timeout, as none of the defaults should apply to such a small file. How long does it take to fail?

mvn archetype:generate does not work-no plugin found for prefix 'archetype'

I want to build a simple project using a existing archetype. But I can't run mvn archetype:generate as it keeps telling me the following information
[ERROR] No plugin found for prefix 'archetype' in the current project and in the
plugin groups [org.apache.maven.plugins, org.codehaus.mojo] available from the
repositories [local (C:\Documents and Settings\ccen\.m2\repository), central (ht
tp://repo1.maven.org/maven2)] -> [Help 1]
I was using MS Windows and didn't use any settings.xml in my ~/.m2 folder and all stuff is brand new. Could any one help me to figure it out?
The other thing that could be going wrong is that your machine is behind a firewall or proxy so your box is not able to hit http://repo1.maven.org/maven2. Try accessing this URL directly in a browser or something to test if you are able to make the request.
The command you should be using to generate a project with an archetype is...
mvn archetype:generate
The command you posted in your question was wrong (missing the first 'e' in archetype). I assume this is just a typo in SO though because the error you posted had archetype spelled correctly.
I believe this error will occur if you are trying to execute this command from a directory that already has a pom.xml file in it. It will try to find an archetype plugin configuration inside the existing pom.xml file.
Try the command again in an empty directory, or at least in one that doesn't have a pom.xml file and it should work.
In case you are behind coporate firewall , configure the proxy setting using "settings.xml" under /conf directory
username,password,host&port values need to be provided.
|
<proxy>
<id>optional</id>
<active>true</active>
<protocol>http</protocol>
<username>proxyuser</username>
<password>proxypass</password>
<host>proxy.host.net</host>
<port>80</port>
<nonProxyHosts>local.net|some.host.com</nonProxyHosts>
</proxy>
This is the issue with your firewall. To check if firewall is on:
Click Start-> click Run-> type wscui.cpl -> click OK.
In Windows Security Center-> click Security
If net work Network Firewall is "on" you need to set the proxy for maven.
Go to /conf -> open settings.xml with notepad
uncomment proxy (if you don't remember proxy settings u can check in webbrowser u r using)
<proxies>
<proxy>
<id>optional</id>
<active>true</active>
<protocol>http</protocol>
<username></username>
<password></password>
<host>www-proxy.us.oracle.com</host>
<port>80</port>
<nonProxyHosts></nonProxyHosts>
</proxy>
</proxies>
You can leave the username and pwd fields blank and set only host and port.
Another problem with Windows (Vista ,Windows 7 onward) is that the command prompt should be running under Administrative privileges (Right click command prompt shortcut and choose "Run ad Administrator" if UAC is on), so simply run command prompt as Administrator before executing mvn archetype:generate.
I had faced this issue while creating vaadin 7 project under windows 7 using following command.
mvn archetype:generate -DarchetypeGroupId=com.vaadin -DarchetypeArtifactId=vaadin-archetype-application -DarchetypeVersion=7.1.8 -DgroupId=im.sma.testproject -DartifactId=testproject -Dversion=1.0 -Dpackaging=war
SMA
I was banging with this problem 2 days, I checked proxy , copied settings.xml from conf folder , deleted user local .m2 folder , came out of eclipse and installed maven directly and tried . None of the above worked.
Finallay the problem fixed by upgrading java home form 1.7 to 1.8 . My maven version is Apache Maven 3.6.3 .
Maven should report proper error for the specific issue but it is not.
Up voted the suggestion of java upgrade in this thread , previously they were down voted
To add Venerik's answer I would elaborate a bit for the naive users like me;
proxy settings in maven
go to apache-maven-3.3.9\conf folder and find settings.xml
open it in any text editor
go to the block of code that looks like below
<proxies>
<!-- proxy
| Specification for one proxy, to be used in connecting to the network.
|
<proxy>
<id>optional</id>
<active>true</active>
<protocol>http</protocol>
<username>proxyuser</username>
<password>proxypass</password>
<host>proxy.host.net</host>
<port>80</port>
<nonProxyHosts>local.net|some.host.com</nonProxyHosts>
</proxy>
-->
</proxies>
Now uncomment the code from (proxy.../proxy) by cutting it and
pasting it
just after (proxies).
Now change according to your proxy settings
In my case it looks like the following
<proxies>
<proxy>
<id>optional</id>
<active>true</active>
<protocol>http</protocol>
<host>authproxy.serc.iisc.ernet.in</host>
<port>3128</port>
<nonProxyHosts>local.net|some.host.com</nonProxyHosts>
</proxy>
<!-- proxy
| Specification for one proxy, to be used in connecting to the network.
|
-->
</proxies>
Now try running mvn archetype:generate and it should run and download
In my case the solution was just run mvn archtype:generate in Safe Mode under your user profile. After that I could run it in normal boot.
I solved this problem disabling the antivirus for a few time while the project is create .
Got the same issue with maven 3. I just upgraded from jdk7 to jdk8 and the issue was resolved
I have face the same problem when using maven 3.6.1 with jdk 1.7.40.
To solve this, i simply update my version of JDk to 1.8.241.
I hope this will help you.
Had same issue and the thing that worked for me was reinstalling java
sudo yum install java
Find the path where java is installed, you can use which java or whereis java or sudo find / -name javac
For me, it was /usr/lib/jvm/java-11-amazon-corretto.x86_64/bin
sudo vi ~/.bashrc
add below lines
export PATH=$PATH:/usr/lib/jvm/java-11-amazon-corretto.x86_64/bin
source .bashrc
and then try your command - mvn archetype:generate.
Since Apache Maven repository URL is updated from http://repo.maven.apache.org/maven2/ to https://repo.maven.apache.org/maven2/ in NetBeans 8.2 or lower version we are facing this issue.
So what's the solution?
Solution 1:-
User Terminal to download an updated maven dependencies Check out this Guide on Maven.Apache.Org
Solution 2:-
Update your NetBeans, Move to Apache NetBeans 11
If this warning is accompanied by the warning:
Received fatal alert: protocol_version
Then check your java version. I was able to solve this issue by upgrading my java version from 7 to 10. See the following:
https://github.com/technomancy/leiningen/issues/2364
I had same problem. Root cause: typed mvn generate:archetype instead archetype:generate.
mvn archetype:generate - is correct way.