<dependency>
<groupId>com.cardboardfish</groupId>
<artifactId>http-sms</artifactId>
<version>1.0</version>
</dependency>
У меня есть баночка, и я уже пробовал установить ее с помощью команды maven, но ее не удалось установить
mvn install:install-file -Dfile=cbfsms.jar -DgroupId=com.cardboardfish -DartifactId=http-sms -Dversion=1.0 -Dpackaging=jar
[INFO] Scanning for projects... [INFO]
------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO]
------------------------------------------------------------------------ [INFO] Total time: 0.125 s [INFO] Finished at:
2018-03-11T11:18:07+05:30 [INFO] Final Memory: 4M/116M [INFO]
------------------------------------------------------------------------ [ERROR] The goal you specified requires a project to execute but there
is no POM in this directory
(C:\Users\test\.m2\repository\com\cardboardfish\http-sms\1.0). 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
Из-за исключения, которое вы предоставили
The goal you specified requires a project to execute but there is no POM in this directory
вы запускаете свои команды maven в другом каталоге, в котором находится ваш pom.xml. Так что перейдите туда, где находится ваш pom, а затем запустите нужные команды maven.
после большого количества задач ... я обнаружил, что из-за отсутствия файла pom.xml он дает исключение, поэтому я создал pom.xml для cbfsms.jar со следующим атрибутом
<?xml version = "1.0" encoding = "UTF-8"?>
<project xmlns = "http://maven.apache.org/POM/4.0.0" xmlns:xsi = "http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation = "http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.cardboardfish</groupId>
<artifactId>http-sms</artifactId>
<version>1.0</version>
<name>cardboard_fish_sbf_sms_jar</name>
<description>helpful jar for sms utilities</description>
<dependencies>
</dependencies>
</project>
чем я использовал команду Maven, и это сработало для меня
mvn install:install-file -Dfile=cbfsms.jar -DgroupId=com.cardboardfish -DartifactId=http-sms -Dversion=1.0 -Dpackaging=jar