I have an issue when I launch the " mvn install " commande, my level with Maven is "curious begginer"
I'm on :
and I launch maven with a cmd consol
in my pom.xml, I have :
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>1.4</version>
</dependency>
but when I launch " mvn install " on this pom.xml
[INFO] Error building POM (may not be this project's POM).
Project ID: commons-io:commons-io:jar:2.2
Reason: Cannot find parent: org.apache.commons:commons-parent for project: commo
ns-io:commons-io:jar:2.2 for project commons-io:commons-io:jar:2.2
I used maven to see the dependency tree, and I see nowhere an "commons-io" version 2.2...
In my local repo I have a commons-io 1.4 and it worked very well until now, I re-download all my local repo several times but I didn't see any change.
I tried to change the remote repo too but still, no changes.
So my problem is this error, which forbid me to generate my jar and I don't understand where this 2.2 come from ...
By advance thank you :)
EDIT
finally I download jars then I used the command :
mvn install:install-file -DgroupId=<your_group_name> \
-DartifactId=<your_artifact_name> \
-Dversion=<snapshot> \
-Dfile=<path_to_your_jar_file> \
-Dpackaging=jar \
-DgeneratePom=true
in order to install manually all the missing dependency.
thanks for your help :) and if anyone have a explanation about this isssue, please post it !
Try cleaning the whole repository cache. Delete the folder
userhome/.m2/repository
Maven will recreate it.
Just running 'mvn clean' alone will not delete the repository, it just cleans the target folder
(On Windows the repo will be at C:\Users\yourusername\.m2\repository)