Mulesoft - Failed to read artifact descriptor for org.mule.tools.maven:mule-app-maven-plugin:jar:1.7: Could not transfer artifact - mule

I am setting up an existing mule application but running into below error. any help please..
[ERROR] Unresolveable build extension: Plugin org.mule.tools.maven:mule-app-maven-plugin:1.7 or
one of its dependencies could not be resolved:
Failed to read artifact descriptor for org.mule.tools.maven:mule-app-maven-plugin:jar:1.7:
Could not transfer artifact org.mule.tools.maven:mule-app-maven-plugin:pom:1.7 from/to maven-default-http-blocker (http://0.0.0.0/):
Blocked mirror for repositories: [mulesoft-release (http://repository.mulesoft.org/releases/, default, releases)] -> [Help 2]

It looks like your pom.xml or settings.xml is referencing one of the MuleSoft Maven Repositories using HTTP instead of HTTPS. Try changing all URL to use https://.... You can see the recommended configurations in the documentation: https://docs.mulesoft.com/mule-runtime/3.9/configuring-maven-to-work-with-mule-esb

Adding Mirrors on settings file resolved the issue.
Found the solution from below post
How to disable maven blocking external HTTP repositores?
<mirrors>
<mirror>
<id>my-repository-http-unblocker1</id>
<mirrorOf>mulesoft-release</mirrorOf>
<name></name>
<url>http://repository.mulesoft.org/releases/</url>;
<blocked>false</blocked>
</mirror>
<mirror>
<id>jfrog-http-unblocker1</id>
<mirrorOf>jfrog</mirrorOf>
<name></name>
<url>http://repo.jfrog.org/artifactory/plugins-releases-local</url>;
<blocked>false</blocked>
</mirror>
</mirrors>

Related

Failed to retrieve plugin descriptor for org.apache.maven.plugins:maven-clean-plugin:2.5: Plugin org.apache.maven.plugins:maven-clean-plugin:2.5

I am new to Maven,
I want to install all the artifacts to my local maven, when i tried to run my script.Got bellow error.
[INFO] Scanning for projects...Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-clean-plugin/2.5/maven-clean-plugin-2.5.pom
[WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:maven-clean-plugin:2.5: Plugin org.apache.maven.plugins:maven-clean-plugin:2.5 or on
e of its dependencies could not be resolved: Failed to read artifact descriptorfor org.apache.maven.plugins:maven-clean-plugin:jar:2.5
Please help in resolving this issue. What do i need to do in my setting.xml, which proxy ip i need to give as my poxy is been disabled on my system.

maven in 5 min not working

I have downloaded latest
maven 3.0.3, java version "1.6.0_18".
mvn –version
Apache Maven 3.0.3 (r1075438; 2011-02-28 18:31:09+0100)
Maven home: C:\software\apache-maven-3.0.3
Java version: 1.5.0_05, vendor: Sun Microsystems Inc.
Java home: C:\software\jdk1.5.0.15\jre
Default locale: en_GB, platform encoding: Cp1252
OS name: "windows xp", version: "5.1", arch: "x86", family: "windows"
My application located at: C:\Temp\ecm_esv\app\ENT_APP\ESV>. I am getting following error message:
C:\Temp\ecm_esv\app\ENT_APP\ESV>mvn archetype:generate -DgroupId=com.mycompany.app -DartifactId=my-app -DarchetypeArtifactId=maven-archetype-quickstart -DinteractiveMode=false
[INFO] Scanning for projects...
Downloading: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-clean-plugin/2.4.1/maven-clean-plugin-2.4.1.pom
[WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:maven-clean-plugin:2.4.1: Plugin org.apache.maven.plugins:maven-clean-plugin:2.4.1 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-clean-plugin:jar:2.4.1
Downloading: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-install-plugin/2.3.1/maven-install-plugin-2.3.1.pom
[WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:maven-install-plugin:2.3.1: Plugin org.apache.maven.plugins:maven-install-plugin:2.3.1 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-install-plugin:jar:2.3.1
Downloading: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-deploy-plugin/2.5/maven-deploy-plugin-2.5.pom
[WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:maven-deploy-plugin:2.5: Plugin org.apache.maven.plugins:maven-deploy-plugin:2.5 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-deploy-plugin:jar:2.5
Downloading: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-site-plugin/2.0.1/maven-site-plugin-2.0.1.pom
[WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:maven-site-plugin:2.0.1: Plugin org.apache.maven.plugins:maven-site-plugin:2.0.1 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-site-plugin:jar:2.0.1
Downloading: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-antrun-plugin/1.3/maven-antrun-plugin-1.3.pom
[WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:maven-antrun-plugin:1.3: Plugin org.apache.maven.plugins:maven-antrun-plugin:1.3 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-antrun-plugin:jar:1.3
Downloading: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-assembly-plugin/2.2-beta-5/maven-assembly-plugin-2.2-beta-5.pom
[WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:maven-assembly-plugin:2.2-beta-5: Plugin org.apache.maven.plugins:maven-assembly-plugin:2.2-beta-5 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-assembly-plugin:jar:2.2-beta-5
Downloading: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-dependency-plugin/2.1/maven-dependency-plugin-2.1.pom
[WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:maven-dependency-plugin:2.1: Plugin org.apache.maven.plugins:maven-dependency-plugin:2.1 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-dependency-plugin:jar:2.1
Downloading: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-release-plugin/2.0/maven-release-plugin-2.0.pom
[WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:maven-release-plugin:2.0: Plugin org.apache.maven.plugins:maven-release-plugin:2.0 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-release-plugin:jar:2.0
Downloading: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-metadata.xml
Downloading: http://repo1.maven.org/maven2/org/codehaus/mojo/maven-metadata.xml
[WARNING] Could not transfer metadata org.apache.maven.plugins/maven-metadata.xml from/to central (http://repo1.maven.org/maven2): Error transferring file: repo1.maven.org
[WARNING] Could not transfer metadata org.codehaus.mojo/maven-metadata.xml from/to central (http://repo1.maven.org/maven2): Error transferring file: repo1.maven.org
Downloading: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-metadata.xml
Downloading: http://repo1.maven.org/maven2/org/codehaus/mojo/maven-metadata.xml
[WARNING] Could not transfer metadata org.apache.maven.plugins/maven-metadata.xml from/to central (http://repo1.maven.org/maven2): Error transferring file: repo1.maven.org
[WARNING] Could not transfer metadata org.codehaus.mojo/maven-metadata.xml from/to central (http://repo1.maven.org/maven2): Error transferring file: repo1.maven.org
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.406s
[INFO] Finished at: Mon Apr 18 15:51:05 CEST 2011
[INFO] Final Memory: 1M/3M
[INFO] ------------------------------------------------------------------------
[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:\Temp\ecm_esv\app\ENT_APP\ESV), central (http://repo1.maven.org/maven2)] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/NoPluginFoundForPrefixException
C:\Temp\ecm_esv\app\ENT_APP\ESV>
C:\software\apache-maven-3.0.3\conf\settings.xml
I have enabled proxies here as:
….
<proxies>
<!-- proxy
| Specification for one proxy, to be used in connecting to the network.
|-->
<proxy>
<id>optional</id>
<active>true</active>
<protocol>http</protocol>
<host>www.BT.co.uk</host>
<port>80</port>
<nonProxyHosts>localhost|google.com</nonProxyHosts>
</proxy>
</proxies>
What is the problem I am facing here? Why it is not downloading?
Found solution:
Solution #1:
issue was with proxy in settings.xml file:
<host>webproxy</host>
to get host goto IE->tools->connection->LAN settings->advanced->http.
=====
Solution #2:
if auto configured proxy is given: then
1> open IE(or any browser)
2> get the url address from your browser through IE->Tools->internet option->connections->LAN Settings-> get address and give in url eg: as http://autocache.abc.com/ and enter, a file will be downloaded with .pac format, save to desktop
3> open .pac file in textpad, identify PROXY:
In your editor, it will come something like:
return "PROXY web-proxy.ind.abc.com:8080; PROXY proxy.sgp.abc.com:8080";
4> go to Maven settings.xml and enter as:
<proxy>
<id>optional</id>
<active>true</active>
<protocol>http</protocol>
<host>web-proxy.ind.abc.com</host>
<port>8080</port>
</proxy>
5> run mvn:install through command prompt or run through eclipse.
=====
Solution #3:
For any other issues delete maven local repository and run mvn:install again.
Clearly this is an issue of proxy. Either use VPN or edit procy setting in setting.xml.
I searched lot about this error. Finally, I used VPN(Virtual private network ) to disable the proxy and was able to use cemtral repository of Maven.
Window-Preferences-Maven-User Settings. Check, does settings.xml exists? if eclipse says no, get settings.xml from you friend or set the path to it.
Try checking proxy settings in settings.xml file located under following directory:
C:\Users\UserName\.m2
I just copied setting.xml which comes under "\apache-maven-3.1.1\conf" directory, to the directory "${user.home}/.m2/)" of windows machine and change the required proxy setting according to my network as below and it worked for me.
<proxy>
<id>optional</id>
<active>true</active>
<protocol>http</protocol>
<host>www-proxy.xxxx</host>
<port>8080</port>
</proxy>
Thanks --
Kamran Shahzad
We have observed that the maven project creation fails when it tries to download the archtype from this URL: Maven Repository which falls under "https" protocol.
So solution #2 mentioned above worked only after a little change to the settings.xml. Instead of using "http" protocol I have to use "https"
<proxy>
<id>optional</id>
<active>true</active>
<protocol>https</protocol>
<host>web-proxy.ind.abc.com</host>
<port>8080</port>
Hope it helps someone.
Note: Make sure that you check the following internet settings.
Internet Explorer > Internet Options > Connections [TAB] > LAN Settings > Under Proxy server check Use proxy server for LAN > Advanced > Check "same proxy server for all protocols" and Click OK.
Adding below under proxy tag in settings.xml worked for me
<proxy>
<id>optional</id>
<active>true</active>
<protocol>https</protocol>
<host>web-proxy.ind.abc.com</host>
<port>8080</port>
</proxy>

Maven: missing net.sf.json-lib

I found net.sf.json-lib in the central repository. Copy-pasted the dependency (with version 2.3), and then when I build I get this error:
[INFO] Unable to find resource 'net.sf.json-lib:json-lib:jar:2.2.3' in repository central (http://repo1.maven.org/maven2)
[ERROR] BUILD ERROR
[INFO] ---------------------------------------------------------
[INFO] Failed to resolve artifact.
Missing:
----------
1) net.sf.json-lib:json-lib:jar:2.3
Try downloading the file manually from the project website.
I tried using version 2.2.3, but I'm getting the same error. Why am I getting this error? I can override it by installing it locally, but I want to understand what the problem is.
Edit - I deleted the package from my local repository, and tried again, this time getting a checksum error. I guess I should file a bug report with json-lib.
[WARNING] *** CHECKSUM FAILED - Error retrieving checksum file for net/sf/json-lib/json-lib/2.3/json
-lib-2.3.pom - IGNORING
Looking at the maven-central repo, you need to specify a classifier for this dependency.
Either jdk13 or jdk15, like this:
<dependency>
<groupId>net.sf.json-lib</groupId>
<artifactId>json-lib</artifactId>
<version>2.4</version>
<classifier>jdk15</classifier>
</dependency>
For gradle as sample
compile 'net.sf.json-lib:json-lib:2.4:jdk15'
OR
compile group: 'net.sf.json-lib', name: 'json-lib', version: '2.4', classifier: 'jdk15'
I searched for more classifier's could not find anything other than jdk15 (don't go looking or jdk16 or jdk17)
Barring khimarbaise's comment about trustworthiness, you can install it locally using maven install:
http://maven.apache.org/plugins/maven-install-plugin/examples/specific-local-repo.html
mvn install:install-file -Dfile=path-to-your-artifact-jar
-DgroupId=your.groupId
-DartifactId=your-artifactId
-Dversion=version
-Dpackaging=jar
-DlocalRepositoryPath=path-to-specific-local-repo
For ivy users, after trying many different iterations to configure my ivy.xml to properly find this dependency, this finally worked for me:
<dependency org="net.sf.json-lib" name="json-lib" rev="2.4">
<artifact name="json-lib" url="http://repo1.maven.org/maven2/net/sf/json-lib/json-lib/2.4/json-lib-2.4-jdk15.jar"/>
</dependency>

teamcity 5.1 maven proxy configuration

I created a new build configuration and tried to run the same. However I encounter errors saying the artifacts could not be found in the repository. If I run the maven build from command line for the same workspace, the build works well. The proxy configuration has been mentioned in ./m2/settings.xml and the settings file has been mentioned in the build configuration. I tried even placing the proxy configuration in TeamCity\buildAgent\plugins\maven\conf\settings.xml but it does not seem to help. Kindly let me know if you have any pointers.
Caused by: org.apache.maven.plugin.InvalidPluginException: Unable to build project for plugin 'org.apache.maven.plugins:maven-site-plugin': POM 'org.apache.maven.plugins:maven-site-plugin' not found in repository: Unable to download the artifact from any repository[16:59:48]: org.apache.maven.plugins:maven-site-plugin:pom:2.0-beta-7[16:59:48]: from the specified remote repositories:[16:59:48]: central (http://repo1.maven.org/maven2)[16:59:48]: for project org.apache.maven.plugins:maven-site-plugin[16:59:48]: at org.apache.maven.plugin.DefaultPluginManager.checkRequiredMavenVersion(DefaultPluginManager.java:293)[16:59:48]: at org.apache.maven.plugin.DefaultPluginManager.verifyVersionedPlugin(DefaultPluginManager.java:205)[16:59:48]: at org.apache.maven.plugin.DefaultPluginManager.verifyPlugin(DefaultPluginManager.java:184)[16:59:48]: at org.apache.maven.plugin.DefaultPluginManager.loadPluginDescriptor(DefaultPluginManager.java:1642)[16:59:48]: at org.apache.maven.lifecycle.DefaultLifecycleExecutor.verifyPlugin(DefaultLifecycleExecutor.java:1540)[16:59:48]: ... 19 more[16:59:48]: Caused by: org.apache.maven.project.ProjectBuildingException: POM 'org.apache.maven.plugins:maven-site-plugin' not found in repository: Unable to download the artifact from any repository[16:59:48]: org.apache.maven.plugins:maven-site-plugin:pom:2.0-beta-7[16:59:48]: from the specified remote repositories:[16:59:48]: central (http://repo1.maven.org/maven2)[16:59:48]: for project org.apache.maven.plugins:maven-site-plugin[16:59:48]: at org.apache.maven.project.DefaultMavenProjectBuilder.findModelFromRepository(DefaultMavenProjectBuilder.java:605)[16:59:48]: at org.apache.maven.project.DefaultMavenProjectBuilder.buildFromRepository(DefaultMavenProjectBuilder.java:251)[16:59:48]: at org.apache.maven.plugin.DefaultPluginManager.checkRequiredMavenVersion(DefaultPluginManager.java:277)[16:59:48]: ... 23 more[16:59:48]: Caused by: org.apache.maven.artifact.resolver.ArtifactNotFoundException: Unable to download the artifact from any repository[16:59:48]: org.apache.maven.plugins:maven-site-plugin:pom:2.0-beta-7[16:59:48]: from the specified remote repositories:[16:59:48]: central (http://repo1.maven.org/maven2)[16:59:48]: at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:228)[16:59:48]: at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:90)[16:59:48]: at org.apache.maven.project.DefaultMavenProjectBuilder.findModelFromRepository(DefaultMavenProjectBuilder.java:558)[16:59:48]: ... 25 more[16:59:48]: Caused by: org.apache.maven.wagon.ResourceDoesNotExistException: Unable to download the artifact from any repository[16:59:48]: at org.apache.maven.artifact.manager.DefaultWagonManager.getArtifact(DefaultWagonManager.java:404)[16:59:48]: at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:216)[16:59:48]: ... 27 more
Have you tried setting the settings.xml within the Maven installation
e.g. for my TeamCity installation /usr/local/apache-maven/apache-maven-2.2.1/conf/settings.xml
Don't forget that TeamCity will probably be running as its own user, so ~/.m2/settings.xml may not be where you think it is.

Maven : Parent project not resolved, transitive dependencies not used for compiling

After searching and trying a lot of things I need a Maven maven :)
So, my problem is that on my development box (which is Windows 2003) I can build my maven project, but on the Bamboo server (x86_64 x86_64 x86_64 GNU/Linux) it fails because one of the modules doesn't have a library and the compiling doesn't find a class.
The class is found in a transitive dependency, dependency that it seems to me that is not resolved.
I've run the command "mvn -X clean install" on both boxes and compared the output.
The only change I think it's relevant is
On dev-box
[DEBUG] Retrieving parent-POM: pl.com.abg.iacsro:sapscndp-claimprocessing:pom:1.0-SNAPSHOT for project: pl.com.abg.iacsro:sapscndp-claimprocessing-api:jar:DEV2010 from the repository.
On Bamboo box
[DEBUG] Retrieving parent-POM: pl.com.abg.iacsro:sapscndp-claimprocessing:pom:1.0-SNAPSHOT for project: null:sapscndp-claimprocessing-api:jar:DEV2010 from the repository.
It seems to me that maven doesn't resolve the parent of the module, because later in the build process I've seen (on Bamboo box)
[WARNING] POM for 'pl.com.abg.iacsro:sapscndp-claimprocessing-api:pom:DEV2010:provided' is invalid.
Its dependencies (if any) will NOT be available to the current build.
[DEBUG] Reason: Failed to validate POM for project pl.com.abg.iacsro:sapscndp-claimprocessing-api at Artifact [pl.com.abg.iacsro:sapscndp-claimprocessing-api:pom:DEV2010:provided]
Validation Errors:
[DEBUG] 'dependencies.dependency.version' is missing for pl.com.abg.iacsro:systemcore-jobs-api:jar
[DEBUG] 'dependencies.dependency.version' is missing for pl.com.abg.iacsro:workflow-crossconflictresolution-api:jar
[DEBUG] 'dependencies.dependency.version' is missing for pl.com.abg.iacsro:iacs-commons-objectfactory:jar
[DEBUG] 'dependencies.dependency.version' is missing for ro.siveco.iacsro:farmerregistry-api:jar
I've also found this
[WARNING] POM for 'pl.com.abg.iacsro:sapscndp-claimprocessing-api:pom:DEV2010:provided' is invalid.
but I've checked and validated myself the pom of the dependency against the xsd, so the pom is valid.
Do you have any idea how to resolve this ?
Many thanks!
P.S. : In case maybe I've overlooked something, here's the full listing from the Bamboo box http://dl.dropbox.com/u/402296/install.txt
When I see such an entry:
[DEBUG] Connecting to repository: 'Artifactory-internal-repository' with url: 'http://192.168.0.59:8081/artifactory/repo'.
Downloading: http://192.168.0.59:8081/artifactory/repo/pl/com/abg/iacsro/onthespotcheck/1.0-SNAPSHOT/onthespotcheck-1.0-SNAPSHOT.pom
[DEBUG] Using Wagon implementation lightweight from default mapping for protocol http
[DEBUG] Artifact resolved
[WARNING] POM for 'pl.com.abg.iacsro:onthespotcheck-checks-api:pom:DEV2009_2:provided' is invalid.
I'm tempted to ask if there is anything particular to say about onthespotcheck-1.0-SNAPSHOT.pom?
As a side note, you have a bunch of:
for project: null:artifactId:version
that I find pretty weird. Why is the groupId null? Anything worth to mention about your pom?