5

I am using Eclipse Juno with the m2e plugin. I converted my java project into a maven project via Eclipse

Right click on project > goto menu configure > Convert to maven project.

thats my pom.xml file

And these are the errors:

Multiple annotations found at this line:
- Plugin execution not covered by lifecycle configuration: org.apache.maven.plugins:maven-compiler-
 plugin:2.3.2:compile (execution: default-compile, phase: compile)
- Plugin execution not covered by lifecycle configuration: org.apache.maven.plugins:maven-compiler-
 plugin:2.3.2:testCompile (execution: default-testCompile, phase: test-compile)
- CoreException: Could not get the value for parameter compilerId for plugin execution default-
 compile: PluginResolutionException: Plugin org.apache.maven.plugins:maven-compiler-plugin:2.3.2 or one of 
 its dependencies could not be resolved: The following artifacts could not be resolved: 
 org.codehaus.plexus:plexus-compiler-manager:jar:1.8.1, org.codehaus.plexus:plexus-compiler-javac:jar:1.8.1: 
 Failure to transfer org.codehaus.plexus:plexus-compiler-manager:jar:1.8.1 from http://repo.maven.apache.org/
 maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central 
 has elapsed or updates are forced. Original error: Could not transfer artifact org.codehaus.plexus:plexus-compiler-
 manager:jar:1.8.1 from/to central (http://repo.maven.apache.org/maven2): connection timed out to http://
 repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-compiler-manager/1.8.1/plexus-compiler-
 manager-1.8.1.jar
- CoreException: Could not get the value for parameter compilerId for plugin execution default-
 testCompile: PluginResolutionException: Plugin org.apache.maven.plugins:maven-compiler-plugin:2.3.2 or one 
 of its dependencies could not be resolved: The following artifacts could not be resolved: 
 org.codehaus.plexus:plexus-compiler-manager:jar:1.8.1, org.codehaus.plexus:plexus-compiler-javac:jar:1.8.1: 
 Failure to transfer org.codehaus.plexus:plexus-compiler-manager:jar:1.8.1 from http://repo.maven.apache.org/
 maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central 
 has elapsed or updates are forced. Original error: Could not transfer artifact org.codehaus.plexus:plexus-compiler-
 manager:jar:1.8.1 from/to central (http://repo.maven.apache.org/maven2): connection timed out to http://
 repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-compiler-manager/1.8.1/plexus-compiler-
 manager-1.8.1.jar

How to solve this problem? Please help.

Pero
  • 774
  • 3
  • 15
  • 34
  • 2
    Seems like a network issue as your logs say plexus-compiler-manager-1.8.1.jar failed to download due to network timeout. Try creating a vanilla maven project setup and ensure that works and then retry on this project. Do an eclipse restart and full project refresh after getting the vanilla project working. – Anurag Kapur Feb 12 '13 at 22:52
  • For beginners starting with Eclipse, Maven , M2E and GWT it would be tough ask to ramp on all the things new. You can instead start of from GWT Maven sample project and import it into eclipse using "Import" -> "Existing Maven projects" . GWT's samples folder in the downloadable from here -> http://google-web-toolkit.googlecode.com/files/gwt-2.5.0.zip – appbootup Feb 13 '13 at 03:41
  • 1
    I noticed you have "selenium" in your screenshot. Are you sure you need to tag it with GWT? – appbootup Feb 13 '13 at 03:42
  • hmm i did it because i want to test my gwt app. – Pero Feb 15 '13 at 19:40
  • Look there: http://stackoverflow.com/questions/8834806/m2eclipse-error Did that solved your problem? – Marcin Stachniuk May 23 '13 at 20:20

2 Answers2

1

Eclipse Juno have some problem on creating a Maven project, the best way would to create Maven project,create Java and convert it.

Juno also has the problem with life cycle configuration of Maven, in building,compiling,installing. so please turn off your build automatically too.

Follow the below instruction to fix this issue.

Check if your proxy settings on Eclipse is behind your company corporate network.

To change this goto-> window->prefernces->General-> network connection and change the active providers.

If you have some proxy details, select Manaul as active provider and edit it. Add the proxy details , ie., host name and port , and click save.

Else try to get it from your company network team.

After this goto maven settings by Goto->window->prefernces->Maven-> user settings

Check if there is xml file called settings.xml if not add the code below to the file and save on the path.

For reference it will be locatedon : users\your name.m2

<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/>
  <proxies>
    <proxy>
      <id>myproxy</id>
      <active>true</active>
      <protocol>http</protocol>
      <host>proxy name</host>
      <port>number</port>
      <username></username>
      <password></password>
      <nonProxyHosts>localhost,127.0.0.1</nonProxyHosts>
    </proxy>
  </proxies>
  <profiles/>
  <activeProfiles/>
</settings>

Even after this, if it does not works, Goto command prompt. navigate to project location. type command one after the other. - mvn clean - mvn compile - mvn install

Hope it will work for you and others.

Ayyappadas
  • 103
  • 1
  • 1
  • 10
0

You can right-click on your project then Maven > Update Project..., then select Force Update of Snapshots/Releases checkbox then click OK.

Ramesh Korla
  • 64
  • 2
  • 3
  • 8