11
votes

I recently installed Eclipse 3.7 (Indigo) and now a wanted to start a new project using the integrated Maven plugins.

Problem is, I can't download any dependencies from the central maven 2 repository http://repo1.maven.org/maven2
After creating a new simple Maven project (without an archetype), i constantly get these Error messages:

  • Description Resource Path Location Type CoreException: Could not calculate build plan: Plugin org.apache.maven.plugins:maven-compiler-plugin:2.3.2 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-compiler-plugin:jar:2.3.2: ArtifactResolutionException: The repository system is offline but the artifact org.apache.maven.plugins:maven-compiler-plugin:pom:2.3.2 is not available in the local repository. pom.xml /JAVA line 1 Maven Project Build Lifecycle Mapping Problem
  • Description Resource Path Location Type Could not calculate build plan: Plugin org.apache.maven.plugins:maven-resources-plugin:2.4.3 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-resources-plugin:jar:2.4.3 pom.xml /JAVA line 1 Maven Build Problem
  • Description Resource Path Location Type Plugin execution not covered by lifecycle configuration: org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile (execution: default-compile, phase: compile) pom.xml /JAVA line 1 Maven Project Build Lifecycle Mapping Problem
  • Description Resource Path Location Type Plugin execution not covered by lifecycle configuration: org.apache.maven.plugins:maven-compiler-plugin:2.3.2:testCompile (execution: default-testCompile, phase: test-compile) pom.xml /JAVA line 1 Maven Project Build Lifecycle Mapping Problem

Using an archetype doesn't work at all.

Am I right to just add another repository mirror to get the needed dependencies?
If so, how do I add another one?


Update: I wrote a D:\Users\.m2\settings.xml manually and the m2e-plugin recognized it correctly:
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
                      http://maven.apache.org/xsd/settings-1.0.0.xsd">
  <localRepository/>
  <interactiveMode/>
  <usePluginRegistry/>
  <offline/>
  <pluginGroups/>
  <servers/>
    <mirrors>
        <mirror>
          <id>dotsrc.org</id>
          <url>http://mirrors.dotsrc.org/maven2</url>
          <mirrorOf>central</mirrorOf>
        </mirror>
    </mirrors>
  <proxies/>
  <profiles/>
  <activeProfiles/>
</settings>

Problem is: I can't find a complete mirror of the Maven central repository. I tried every single one I could find on the net, but all are missing some dependencies, archetypes, etc.

Any help out there?

1
@VonC: Thanks for the reply, but i already tried that and it didn't help, since i don't have a proxy problem. I still can connect to the marketplace and download/install other plugins. ... Although, i didn't find the maven settings.xml to change the proxy settings... i guess, it uses the eclipse settings instead (so it should work).Gruber
Would that be related to sonatype.com/people/2011/06/where-is-m2eclipse ? (and the fact the plugin is now called m2e)VonC
@VonC: Well, i already downloaded the prepackaged Bundle (Eclipse & M2E) and that's what bothers me. I have these problems in this out-of-the-box bundle. :/Gruber
'I wrote a settings.xml manually and the m2e-plugin recognized it correctly' - so what was in the settings file that fixed the problem? Please post an answer if you managed to resolve this.hoipolloi

1 Answers

0
votes