Reputation: 6248
I want to use this library in a small project. I know how to add a jar file to my project but I don't know how to work with maven. I tried the command mvn clean package in cmd but after installing maven but it just errors:
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.070 s
[INFO] Finished at: 2017-08-22T18:23:04+04:30
[INFO] Final Memory: 5M/123M
[INFO] ------------------------------------------------------------------------
[ERROR] The goal you specified requires a project to execute but there is no POM in this directory (C:\Users\aran). Please verify you invoked Maven from the correct directory. -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MissingProjectException
I tried to open cmd in the directory of the project but didn't help. Can anyone help me find the jar file of that library? or give me some instructions on how to work with maven?
Upvotes: 0
Views: 695
Reputation: 32036
I tried the command mvn clean package
Try executing the same command from within the project directory(e.g cd /User/you/yourFolder/mp3agic/) :
mvn clean package
Also in your project's pom.xml file, you need to include this dependency for the linked project:
<dependency>
<groupId>com.mpatric</groupId>
<artifactId>mp3agic</artifactId>
<version>0.9.0</version>
</dependency>
Edit: If your project is not based on maven(as mentioned in the comments below), you shall first convert the project into maven project which would create the pom.xml
required and then use the above commands on the project. This would be helpful for that -IntelliJ - Convert a Java project/module into a Maven project/module.
Upvotes: 2