Grails Release plugin is not deploying plugin on a remote maven repository
Asked Answered
E

3

7

I'm having problems to deploy a plugin with the command maven-deploy on a remote repo. I installed the latest version of the Release plugin (2.0.2).

I get this error:

| Loading Grails 2.0.4
| Configuring classpath.
| Environment set to development.....
| Packaging Grails application.....
| Compiling 33 GSP files for package [myPackage].....
| Plugin packaged grails-plugin-myPlugin.jar
| Skipping POM generation because 'pom.xml' exists in the root of the project..
| Error Error executing script MavenDeploy: : Error downloading wagon provider from the remote repository: Missing:
----------
1) org.apache.maven.wagon:wagon-http:jar:1.0-beta-2
Try downloading the file manually from the project website.
Then, install it using the command: 
  mvn install:install-file -DgroupId=org.apache.maven.wagon -DartifactId=wagon-http -Dversion=1.0-beta-2 -Dpackaging=jar -Dfile=/path/to/file
Alternatively, if you host your own repository you can deploy the file there: 
  mvn deploy:deploy-file -DgroupId=org.apache.maven.wagon -DartifactId=wagon-http -Dversion=1.0-beta-2 -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]
Path to dependency: 
1) unspecified:unspecified:jar:0.0
2) org.apache.maven.wagon:wagon-http:jar:1.0-beta-2
----------
1 required artifact is missing.

for artifact: 
 unspecified:unspecified:jar:0.0
from the specified remote repositories:
 central (http://repo1.maven.org/maven2)
(Use --stacktrace to see the full trace)

Thanks for your help

Extremist answered 6/6, 2012 at 6:46 Comment(1)
Have u tried adding wagon as a dependency for the plugin?Monsour
N
1

I had the same problem and could handle it this way:

  • Install Maven2
  • Configure proxy as described here

This is enough to solve your problem.

If your maven server requires authentication you can proceed as described here or here

~/.m2/settings.xml:

<settings>
  <proxies>
   <proxy>
      <active>true</active>
      <protocol>http</protocol>
      <host>proxyserver.mydomain.com</host>
      <port>8080</port>
      <username>user</username>
      <password>pass</password>
      <nonProxyHosts>*.bla.com.br|*.blabla.biz</nonProxyHosts>
    </proxy>
  </proxies>
  <servers>
    <server>
      <id>myrepo</id>
      <username>user</username>
      <password>pass</password>
    </server>
  </servers>
</settings>
Nisi answered 21/3, 2013 at 19:5 Comment(0)
A
1

I found a workaround for this issue. Since something tries to retrieve wagon-http dependency using deprecated http maven repository url, we can manually preinstall this dependency in our local repository:

mvn org.apache.maven.plugins:maven-dependency-plugin:2.1:get -Dartifact=org.apache.maven.wagon:wagon-http:1.0-beta-2 -Dpackaging=jar -DrepoUrl=https://repo1.maven.org/maven2

After that publish-plugin command should work.

Possible fix for that issue would be upgrade grails-release plugin to v3.1.3(didn't work for me): link

Axil answered 2/2, 2021 at 12:5 Comment(0)
V
0

This looks like a Maven issue:

Maven fails to download a required dependency org.apache.maven.wagon:wagon-http:jar:1.0-beta-2 from http://repo1.maven.org/maven2

Since the required artifact can be found in Maven central this may be a result of a networking issue

Veronicaveronika answered 6/6, 2012 at 7:36 Comment(3)
don't think its a networking issue. I'm behind a proxy and configured it in the maven settings.xml. I downloaded the wagon-http-1.0-beta-2-sources.jar from the maven central. But when i'm running mvn install:install-file -DgroupId=org.apache.maven.wagon -DartifactId=wagon-http -Dversion=1.0-beta-2 -Dpackaging=jar -Dfile=/path/to/file i also get an error that tells that the access to the repo is forbidden...Extremist
If you are behind a proxy, it may be blocking jar download requests. You can run maven with the -X -e switches to get additional information that will help resolving the issue.Veronicaveronika
When you use install:install-file it should use just your local repository without any external connection...can be a permission problem in the file system?Maren

© 2022 - 2024 — McMap. All rights reserved.