close

[Solved] Cannot resolve No versions available for org.osgi.service:org.osgi.service.prefs:jar:[1.1.0,1.2.0) within specified range

I am facing an error with JDT dependencies while installing maven the following error that I am facing: Cannot resolve No versions available for org.osgi.service:org.osgi.service.prefs:jar:[1.1.0,1.2.0) within specified range in Java We will learn about All Possible Solutions So Let’s Get Start with This Article.

How Cannot resolve No versions available for org.osgi.service:org.osgi.service.prefs:jar:[1.1.0,1.2.0) within specified range Error Occurs?

I am facing an error by JDT dependencies while installing maven the following error that I am facing.

Cannot resolve No versions available for org.osgi.service:org.osgi.service.prefs:jar:[1.1.0,1.2.0) within specified range.

So here I am writing all the possible solutions that I have tried to resolve this error.

How To Solve Cannot resolve No versions available for org.osgi.service:org.osgi.service.prefs:jar:[1.1.0,1.2.0) within specified range Error?

  1. How To Solve Cannot resolve No versions available for org.osgi.service:org.osgi.service.prefs:jar:[1.1.0,1.2.0) within specified range Error?

    To Solve Cannot resolve No versions available for org.osgi.service:org.osgi.service.prefs:jar:[1.1.0,1.2.0) within specified range Error The reason behind this error is groupId there is in your dependency You can find org.osgi.service as groupId and groupId org.osgi.service does not exist and that’s is Maven tells you in this error that groupId org.osgi.service does not exist. Your groupId should be org.osgi. And now, Your error must be solved. Thank You.

  2. Cannot resolve No versions available for org.osgi.service:org.osgi.service.prefs:jar:[1.1.0,1.2.0) within specified range

    To Solve Cannot resolve No versions available for org.osgi.service:org.osgi.service.prefs:jar:[1.1.0,1.2.0) within specified range Error The reason behind this error is groupId there is in your dependency You can find org.osgi.service as groupId and groupId org.osgi.service does not exist and that’s is Maven tells you in this error that groupId org.osgi.service does not exist. Your groupId should be org.osgi. And now, Your error must be solved. Thank You.

Solution 1: Change groupId

The reason behind this error is groupId there is in your dependency You can find org.osgi.service as groupId and groupId org.osgi.service does not exist and that’s is Maven tells you in this error that groupId org.osgi.service does not exist.

Your groupId should be org.osgi Just like below.

<dependency>
    <groupId>org.osgi</groupId>
    <artifactId>org.osgi.service.prefs</artifactId>
    <version>[1.1.0,1.2.0)</version>
</dependency>

And now, Your error must be solved. Thank You.

Conclusion

It’s all About this error. Hope We solved Your error. Comment below Your thoughts and your queries. Also, Comment below which solution worked for you?

Also, Read

Leave a Comment