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

Shashank Agrawal
  • 25,161
  • 11
  • 89
  • 121
Paul
  • 97
  • 1
  • 5

3 Answers3

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>
rodvlopes
  • 895
  • 1
  • 8
  • 18
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

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

Shashank Agrawal
  • 25,161
  • 11
  • 89
  • 121
Dror Bereznitsky
  • 20,048
  • 3
  • 48
  • 57
  • 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... – Paul Jun 06 '12 at 08:37
  • 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. – Dror Bereznitsky Jun 06 '12 at 09:18
  • 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? – rascio Jun 06 '12 at 09:39