I changed a simple maven project to a maven dynamic web project adding this line to my pom.xml:
...
<packaging>war</packaging>
....
I updated my project using maven -> update project
The m2e plugin now rewrote the project meta-files (.project and .classpath, as well as files in the .settings folder).
After it was done i got an error in my build path:
Archive for required library:
'~/m2/repository/com/orientechnologies/orient-commons/1.6.5/orient-
commons-1.6.5.pom' in project 'RelationExtraction'
cannot be read or is not a valid ZIP
The maven dependency:
<dependency>
<groupId>com.orientechnologies</groupId>
<artifactId>orientdb-graphdb</artifactId>
<version>1.6.5</version>
</dependency>
Also i cant run my main anymore:
Error: main class myPackage.main.Main could not be found or loaded
I tried the following:
- I deleted all folders in my
~/m2/
folder and updated my project again - I restarted eclipse
- I closed and reopened my project
- I restarted my computer
Inside the folder ~/m2/repository/com/orientechnologies/orient-commons/1.6.5/
are
the following files:
- _maven.repositories
- orient-commons-1.6.5.jar
- orient-commons-1.6.5.jar.sha1
- orient-commons-1.6.5.pom
- orient-commons-1.6.5.pom.sha1
I can see in my Maven Dependencies in my project that maven is trying to load the pom and not the jar:
When i delete
...
<packaging>war</packaging>
....
Maven loads the correct jar and not the pom.