0

I have been trying out some setup from github for which Maven is required. Below is the link: https://github.com/freemansoft/fire-samples# While trying to setup the server I get below error:

mvn clean install

Error resolving version for plugin 'org.apache.maven.plugins:maven-jar-plugin' from the repositories [local (/home/gpadmin/.m2/repository), projectPlugins (file:///home/gpadmin/Downloads/fire-samples-master/cache-demo/lib/), central [Link 1]]: Plugin not found in any plugin repository -> [Help 1]

I provide the version definition in POM.XML to 2.4/2.3/2.5 and below is the error I'm encountering for all the cases:

[ERROR] Plugin [Link 2] or one of its dependencies could not be resolved: Failed to read artifact descriptor for [Link 2]: Could not transfer artifact [Link 2] from/to central ([Link 1]): repo.maven.apache.org: No address associated with hostname -> [Help 1] [Link 3]: Plugin [Link 2] or one of its dependencies could not be resolved: Failed to read artifact descriptor for [Link 2]

I am behind a proxy which I think might be an issue for this. Also I tried to access [Link 1] from the browser but its not accessible either instead it asks to access another link. In case this is the issue please guide me to the correct file to alter this setting. I have tried to change this in POM.XML file but there's no such link available. I can't find the settings.xml file either.

Please help me with the issue here as I'm still new to these(MVN/GITHUB) and might be missing something trivial.

Note:

  1. Unable to post more than 2 links due to 10 reputation points hence
    attaching those links in the comment section.
  2. In case you find this post naive please bear with me as I'm still new.
  3. If you find this post useful please mark it as such, as having 1 reputation (being new) I'm unable to post multiple links, mark anything as useful etc.
  4. If any further information is required please let me know so I can update
user3032283
  • 373
  • 2
  • 10
  • LINK 1 http://repo.maven.apache.org/maven2 LINK 2 org.apache.maven.plugins:maven-clean-plugin:2.5 Link 3 org.apache.maven.plugin.PluginResolutionException – user3032283 Apr 22 '14 at 11:37

2 Answers2

0

You must supply the ~/.m2/repository/settings.xml file yourself in order to configure Maven locally. You can find more details here...

http://maven.apache.org/guides/mini/guide-configuring-maven.html

And here...

http://maven.apache.org/ref/3.2.1/maven-settings/settings.html

In the setting.xml file, you can configure proxies if you are having networks issues.

See comment 1 below (argh)...

In looking at the project's pom.xml as well as the error message above, Maven seems to be unable to pull the dependency from Central (suggesting a network issue), and definitely wont't find it locally, based on this definition...

<pluginRepositories>
    <!-- lets us use the lib directory as a maven repo for resources 
        we don't have access to -->
    <pluginRepository>
        <id>projectPlugins</id>
        <name>Project Maven Repository</name>
        <url>file://${basedir}/lib/</url>
    </pluginRepository>
</pluginRepositories>

The maven-jar-plugin will not exist in "file://${basedir}/lib" unless you downloaded it manually and stuck it in ./lib.

John Blum
  • 7,381
  • 1
  • 20
  • 30
  • You should be able to access the following URL without issue if your network/proxy is configured properly: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-jar-plugin/2.4/maven-jar-plugin-2.4.jar – John Blum Apr 22 '14 at 17:46
  • I can not provide proxy to this setup. Hence I think my best bet is to use a local repository here. I've tried downloading the jar along with the dependencies and moved all under /home/gpadmin/.m2/repository/. Still I get the same error. Also another concern here is why would this look for version 2.6 for the Maven-Jar-Plugin when in the pom.xml file its mentioned 2.2 as shown below: org.apache.maven.plugins maven-jar-plugin 2.2 – user3032283 Apr 29 '14 at 13:47
0

Also, if you are looking for more samples on Spring Data GemFire and GemFire, have a look at...

https://github.com/spring-projects/spring-gemfire-examples

And...

http://pubs.vmware.com/vfabric53/topic/com.vmware.vfabric.gemfire.7.0/getting_started/book_intro.html

John Blum
  • 7,381
  • 1
  • 20
  • 30
  • Thanks for the suggestion. Although the first oen I've already tried and failed due to similar network related issues for Gradle. Please let me know if you have suggestions for the issues with Gradle. I've tried using proxy as well but to no avail. As for the second one I'll give it a try not sure if it'll work on Pivotal's Distro. – user3032283 Apr 24 '14 at 13:25