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

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

Related

Eclipse can't find a class on my classpath

The project is a maven project.
run as maven install works
mvn install works
I have tried mvn eclipse:eclipse to update project, I can see the jar file in my properties order and export
I have closed and reopened the project
I have deleted and re added the project
I have done a refresh
I have done a maven update project
I have cleaned the project
maven disable maven nature and then configure convert to maven project
It builds just fine from:
The command line:
mvn install
In eclipse run as maven install
It works in intellij idea
For the love of all that is holy...
There was a class of the same name in this project with all lines commented out.
Deleting that source file fixed the problem.

Eclipse maven not adding dependencies

I am new to maven and am experiencing difficulties while trying to mavenise a Java project.
Setting:
IDE: Eclipse Oxygen.2 Release (4.7.2)
Java: 8
m2e: 1.8.2
What I did:
- copy-pasted the entire original java project and renamed it
- right-click in eclipse: Configure > Convert to Maven project
- in java build path, deletion of libraries import from original local lib repo. The build path shows the Maven Dependencies folder, with the only junit library.
- maven install => downloaded things in the user/.m2/repository/, but not all.
What does not work:
When I try to add a dependency right from a file:
,
nothing pops up in the artifact selection windows, even though there is a commons-logging/ folder in m2/repository
When I try to add the dependency manually in the pom.xml:
<dependency>
<groupId>org.kie.modules</groupId>
<artifactId>org-apache-commons-configuration-main</artifactId>
<version>6.5.0.Final</version>
<type>pom</type>
</dependency>
but the package resolution error still appears in the java file, and I get this warning after Maven install
`[WARNING] The POM for org.kie.modules:org-apache-commons-configuration-main:pom:6.5.0.Final is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details`
I did Maven Update project, eclipse project clean, nothing changes.
My goal for now is just that eclipse understands (at least for one library), that it has to take it from maven repository. I still have many other dependencies to solve (intra-project), but that will be the next step.
Thanks for your help.
The cause of the issue is stated in the warning message :
[WARNING] The POM for
org.kie.modules:org-apache-commons-configuration-main:pom:6.5.0.Final
is invalid, transitive dependencies (if any) will not be available,
enable debug logging for more details
It means that the pom.xml downloaded in your local maven repository exists but is not valid.
Delete the folder of the dependency downloaded in your local maven repository and try again.
If you still have the same problem, check that your central repository that provides the dependency provides also correctly the pom.xml for that.
You can do it by browsing the directory of the dependency from a web browser.
For example we can see that the maven central repository provides a valid pom :
http://central.maven.org/maven2/org/kie/modules/org-apache-commons-collections-main/6.5.0.Final/org-apache-commons-collections-main-6.5.0.Final.pom

Maven dependencies complaining jars files are missing in .m2 repository, but jar files are inplace

Maven dependencies complaining that few jars files are missing for ex:
cucumber-junit, cucumber-jave, surefile-plugin
but these are in place , these jar present in .m2 repository.
Please let me know , if anyone can help me
I have added cucumber plugin in eclipse.
I did Maven -update, Maven clean but nothing is solving issue

Eclipse - Wrong project name when importing maven project

I'm using eclipse mars and I'm working on a multi modules maven 2 project.
Since now it was always working fine when importing the project into eclispe.
My project structure is like
myproject
|-common
|-dao
|- ...
In each pom the artifact-id is
<artifactId>myproject-common</artifactId>
<artifactId>myproject-dao</artifactId>
...
What I always did till now
retrieve the project from svn
mvn clean install
mvn eclispe:eclipse
in eclipse import > existing project > browse to myproject and it displays the good project names : myproject-common, myproject-dao, ...
But since today the last step gives me the folder name in place of the artifact name : common, dao, ...
And after import, lot of errors saying eg. that Project 'dao' is missing required Java Project: 'myproject-common'
I don't understand. Same version of eclispe,maven and java than few months ago.
And after mvn eclipse:eclispe, the .project file is containing the good name
<projectDescription>
<name>myproject-common</name>
How can I solve that ?
I solved it by changing:
import > existing project
to:
Import -> Maven -> Existing Maven Projects

Maven Error While updating Dependencies

I have a maven project in which i am getting the following error. I am using eclipse IDE
An internal error occurred during: "Importing Maven projects".
Unsupported IClasspathEntry kind=4
I have followed below steps for resolving this error. The reason for this error is class path file located in your project folder.
Disable Maven Nature for your project ( If in eclipse, right click on the project --> Maven --> Disable Maven Nature).
Delete the class path file in your project folder.
Re- enable the Maven Nature Again (right click on project --> configure --> Convert to Maven Project).
Try to Maven clean, install and Run the project.
Here's a better answer: stop using eclipse.
Here's the eclipse bug page:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=394042
They seem to have no interest in fixing this issue, so if you require|prefer to use the command line for projects, then really there is no fix but to quit eclipse.