Maven compile: package does not exist

前端 未结 4 1642
轻奢々
轻奢々 2021-01-07 15:57

I have a (seemingly) simple maven problem I can not solve. In my POM I have specified a dependency to openrdf-sesame like this:


     

        
相关标签:
4条回答
  • 2021-01-07 16:38

    You have to add the following dependency to your build:

    <dependency>
        <groupId>org.openrdf.sesame</groupId>
        <artifactId>sesame-rio-api</artifactId>
        <version>2.7.2</version>
    </dependency>
    

    Furthermore i would suggest to take a deep look into the documentation about how to use the lib.

    0 讨论(0)
  • 2021-01-07 16:45

    the issue happened with me, I resolved by removing the scope tag only and built successfully.

    0 讨论(0)
  • 2021-01-07 16:54

    You do not include a <scope> tag in your dependency. If you add it, your dependency becomes something like:

    <dependency>
         <groupId>org.openrdf.sesame</groupId>
         <artifactId>sesame-runtime</artifactId>
         <version>2.7.2</version>
         <scope> ... </scope>
    </dependency>
    

    The "scope" tag tells maven at which stage of the build your dependency is needed. Examples for the values to put inside are "test", "provided" or "runtime" (omit the quotes in your pom). I do not know your dependency so I cannot tell you what value to choose. Please consult the Maven documentation and the documentation of your dependency.

    0 讨论(0)
  • 2021-01-07 16:56

    Not sure if there was file corruption or what, but after confirming proper pom configuration I was able to resolve this issue by deleting the jar from my local m2 repository, forcing Maven to download it again when I ran the tests.

    0 讨论(0)
提交回复
热议问题