mavennetbeans

Maven: Error resolving version for plugin


I am trying to get Batik working, having not worked with Java much in the last ten years or so and I'm running into problems with Maven being able to find the org.apache.maven.wagon:wagon-ssh-external package.

When I open or try to build the project in Netbeans, it reports the following error:

   The project org.freehep:freehep-graphicsio:2.1.1 (/home/glenatron/Projects/batik/freehep-graphicsio/pom.xml) has 1 error
     Unresolveable build extension: 
     Error resolving version for plugin 'org.apache.maven.wagon:wagon-ssh-external' from the repositories [local (/home/glenatron/.m2/repository), freehep-maven (http://java.freehep.org/maven2), central (http://www.ibiblio.org/maven2), Codehaus (http://repository.codehaus.org/), Codehaus Snapshots (http://snapshots.repository.codehaus.org/)]:
     Plugin not found in any plugin repository -> [Help 2]

As far as I can tell this is correct, however, I have the following in my pom.xml file for the project:

<repositories>
    <repository>
      <id>freehep-maven</id>
      <name>Maven FreeHEP</name>
      <url>http://java.freehep.org/maven2</url>
    </repository>
    <repository>
        <id>maven-apache</id>
        <name>Maven Apache</name>
        <url>http://repo.maven.apache.org/maven2</url>
    </repository>
    <repository>    
        <id>maven1</id>
        <name>Maven.org</name>
        <url>http://repo1.maven.org/maven2</url>
    </repository>
  </repositories>

From what I can judge a) that plugin should be available in one of those repositories and b) if they are in the pom.xml file, Maven should be searching them but I can't see any sign of it doing that.

The project I am trying to work with is the FreeHEP EMF driver. The bigger screen solution was to use the unsignposted but much more up to date Github repository version.


Solution

  • It turns out that the solution was in the message after all: Error resolving version for plugin.

    So obviously it's not a repository it is a pluginRepository which goes in a different part of pom.xml:

    <pluginRepositories>
        <pluginRepository>    
            <id>maven1</id>
            <name>Maven.org</name>
            <url>http://repo1.maven.org/maven2</url>
        </pluginRepository>
    </pluginRepositories>