简体   繁体   中英

Maven - How to get the parent pom file dependency in sbt project

Not able to resolve the dependencies of maven project in sbt.Here is my issue,

for example :

MyProject => module1(pom.xml) ,module2(pom.xml) , parentPom.xml

After deployment to the artifactory, i have module1.jar,module2.jar and parentPom.pom in the artifactory,when i am trying to add the dependency of module1 in my sbt project i am getting the following error:

sbt.ResolveException: unresolved dependency: org.test#module1;5.22.0-SNAPSHOT: local-snapshots: no ivy file nor artifact found for org.test#MyProject;5.22.0-SNAPSHOT.

Can anyone please help me with this!!

if your module1.jar and module2.jar is a mavne generated jar than go inside jar and fild pom.xml file, it may inside metainf inside jar, search for pom.xml, and look what is the name of pom.xml file inside jar, give the same name in your project pom.xml, if it is not work you can write back to me, can you put your project pom.xml and module1.jar s pom.xml`

Edited:

From the URL you had given in comment is https://github.com/Activiti/Activiti/blob/master/pom.xml After look that pom.xml file you should try to add in your project pom.xml look like this

add dependency

<groupId>org.activiti</groupId>
<artifactId>activiti-root</artifactId>
<modelVersion>4.0.0</modelVersion>

As in above pom.xml it have parent pom so you need that parent pom too in you maven repository.

<parent>
    <groupId>org.sonatype.oss</groupId>
    <artifactId>oss-parent</artifactId>
    <version>7</version>
  </parent>

And you should also ready for internal dependency for activity pom.xml.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM