1
votes
<dependency>
    <groupId>com.cardboardfish</groupId>
    <artifactId>http-sms</artifactId>
    <version>1.0</version>
</dependency>

i have the jar and already tried through maven command to install but its getting failled

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
2

2 Answers

2
votes

after a lot of task.. i found that due to pom.xml file missing it is giving the exception so, i have created a pom.xml for cbfsms.jar with following attribute

<?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>

than i used the Maven command and it worked for me

mvn install:install-file -Dfile=cbfsms.jar -DgroupId=com.cardboardfish -DartifactId=http-sms -Dversion=1.0 -Dpackaging=jar

1
votes

Due to an exception that you provided

The goal you specified requires a project to execute but there is no POM in this directory

you run your maven commands in another directory that your pom.xml located. So go to where that your pom located and then run your desired maven commands.