Eclipse Maven Project import compiler-plugin:2.3.2 - eclipse

Using jdk8, Maven 3.3.3, Eclipse Mars Release (4.5.0).
Trying to import a Maven project into eclipse (Import 'existing Maven project'). Getting error: 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: Failure to transfer org.apache.maven.plugins:maven-compiler-plugin:pom:2.3.2 from https://repo.maven.apache.org/maven2
Have tried to install this plugin- whatever I tried 'Install New Software"- did not work.
Tried adding a couple of M2E connectors also. I now have:
m2e connector for maven-remote-resources-plugin
m2e connector for the Maven Dependency Plugin
How to solve this? Thanks

I was finally able to solve this by maven cli- mvn eclipse:eclipse. Then I was able to import the project into eclipse.
Before that I tried other maven cli commands: mvn clean install, package, etc - none worked.
So one more painful saga endured

Related

Spring tool suit could not build with maven

my project can be built from the command line with maven clean install but i cannot update it through maven-> update project. it says
Could not calculate build plan: Plugin
org.apache.maven.plugins:maven-resources-plugin:2.4 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
i have tried installing maven-resources-plugin.jar manually to the repository, still its the same.

maven in command line succeed, but failed when using the same maven in eclipse

I'm trying to build the project of hadoop. I followed the official document as follows on how to do that.
http://wiki.apache.org/hadoop/HowToContribute
https://wiki.apache.org/hadoop/EclipseEnvironment
I've git clone the project, maven install it successfully, but when I import the project, or even a sub-project like 'hadoop-yarn-api', I got the following errors on maven:
Description Resource Path Location Type
Plugin execution not covered by lifecycle configuration: org.apache.hadoop:hadoop-maven-plugins:3.0.0-SNAPSHOT:protoc (execution: compile-protoc, phase: generate-sources) pom.xml /hadoop-yarn-api line 73 Maven Project Build Lifecycle Mapping Problem
Then I'm trying to mvn clean install the project via External Tools Configuration in eclipse, it also failed on:
[ERROR] Failed to execute goal org.apache.hadoop:hadoop-maven-plugins:3.0.0-SNAPSHOT:protoc (compile-protoc) on project hadoop-yarn-api: org.apache.maven.plugin.MojoExecutionException: 'protoc --version' did not return a version -> [Help 1]
But the curious part is that when I cd into the root directory of 'hadoop-yarn-api' and invoke mvn clean install, it can be built successfully.
I'm using m2ecipse in eclipse, and I'm sure that I've changed to the maven which is exactly the one that I'm used in command line, not the embedded one.
And I've installed protocol buffers 2.5.0:
$ protoc --version
libprotoc 2.5.0
Could anyone give me some idea? Many thanks!
P.S.
Eclipse Java EE IDE - Juno Service Release 2
m2e - 1.4.1.20140328-1905
Mac 1- 0.9.4
maven - 3.0.5
Hadoop - 2.2.0

Referenced classpath entry for JAR in local maven repository missing when importing nutch

I am trying to import nutch 1.4 into Eclipse. I cloned git repository and then build it using Maven. Then, I imported it in Eclipse as Maven project, but I'm getting the following error:
The archive: /home/devang/.m2/repository/javax/jms/jms/1.1/jms-1.1.jar which is referenced by the classpath, does not exist.
I've seen this behaviour when I had a project already imported in Eclipse, but then deleted the local Maven repository.
To solve this, make m2eclipse re-download the project's dependencies:
Right-click on the project and select Maven > Update Project...
Select Force Update of Snapshots/Releases and hit OK

gwt - Error when importing a gwt project using Maven import in Eclipse

I am using Eclipse, Version: Indigo Service Release 1.
My GWT version is 2.4.0. I installed everything like GWT and Maven related plugins.
I am trying to import a existing gwt-maven project. When importing, I see this dialog:
Can anyone tell me why and how to solve it?
Google is your dear friend.
By entering "no marketplace entries found to handle gwt-mavn-plugin", I got:
Error when importing Maven-GWT project ("No marketplace entries found to handle gwt-maven-plugin")
gwt-maven-plugin with Eclipse Indigo
Eclipse: Import Maven project, missing maven-gae-plugin
EDIT :
Actually I would advise you to use maven from the command line instead of using the Maven plugin in Eclipse as I had exprienced many issues with it.
From the command line, run the following commands:
To compile and install : mvn clean install
to generate eclipse project: mvn eclipse:eclipse
Afterwards, from your eclipse, import your generated project as a normal project and voila!
Hope this helps!

Run maven:install will copy more jars to WEB-INF/lib than i expect

Eclipse Indigo; m2e 1.1.0; Maven integration for WTP 0.15.3; Maven 3.0.4
My web project has some dependency projects in the same workspace. All projects are installed. When i run maven install, except to see all dependencies in WEB-INF/lib.
When i run maven install plugin or maven war plugin, the WEB-INF/lib will be filled with dependencies, but they are a lot more than i expected, from the "dependency Hierarchy" or "Effective POM" view of the POM file, or from Maven dependencies in classpath view, i can not find the dependencies.
Run Maven->update projects does not help.
So where these dependencies come from or where should i start to debug?
EDIT
Previously my project has a large dependency tree(100+ jars), some of them are not needed, so i decided to remove them. My project depends on a common project, which has some not needed dependencies, i remove them from POM dependencies and run maven install for the whole projects dependency tree, success. then i run maven install on my project, it should not include the jars i removed from the common project, but, unfortunately they are there in WEB-INF/lib.
If you want to know where your dependencies are coming from, run:
mvn dependency:tree
from the command line. This shows how transitive dependencies are pulled in from your declared dependencies.
You can also run:
mvn dependency:analyze
to see if you can remove any unused dependencies to lessen the number of JARs packaged.
Problem solved, I delete the whole project and import from remote, run maven-install, it worked. Still have no idea why it not work before even after i run "maven clean install" on all dependency projects.