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


Today I ran into the below error while trying to build my Java Spring Maven project in Eclipse,

Cannot resolve No versions available for org.osgi.service:org.osgi.service.prefs:jar:[1.1.0,1.2.0) within specified range.
[ERROR] Failed to execute goal on project c2c: 
Could not resolve dependencies for project org.code2care.c2c:redundantcheck:jar:1.0-SNAPSHOT: 
Failed to collect dependencies at org.eclipse.jdt:org.eclipse.jdt.core:jar:3.20.0 -> 
org.eclipse.platform:org.eclipse.core.resources:jar:3.12.0 -> 
org.eclipse.platform:org.eclipse.core.expressions:jar:3.5.100 -> 
org.eclipse.platform:org.eclipse.core.runtime:jar:3.12.0 -> 
org.eclipse.platform:org.eclipse.equinox.preferences:jar:3.10.0 -> 
org.osgi.service:org.osgi.service.prefs:jar:[1.1.0,1.2.0): No versions available for 
org.osgi.service:org.osgi.service.prefs:jar:[1.1.0,1.2.0) within specified range -> [Help 1]
Solution:

Make use of org.eclipse.platform:org.eclipse.equinox.preferences:jar 3.10.1 version instead of 3.10.0

<dependency>
    <groupId>org.eclipse.jdt</groupId>
    <artifactId>org.eclipse.jdt.core</artifactId>
    <version>3.10.1</version>
</dependency>

Read More: https://github.com/eclipse-equinox/equinox.bundles/issues/54

Advertisements
Try Out Code2care Dev Tools:

Advertisements



Android Java Linux Microsoft Google Python macOS Notepad++ Microsoft Teams CSS PHP SharePoint Html Linux C Programs Bootstrap jQuery Sublime Android Studio Facebook Eclipse WhatsApp News MySQL Json HowTos JavaScript FTP S3


Advertisements


Code2care is an initiative to publish and share varied knowledge in programming and technical areas gathered during day-to-day learnings and development activities.

Students and Software Developers can leverage this portal to find solutions to their various queries without re-inventing the wheel by referring to our easy to understand posts. Technical posts might include Learnings, Tutorials, Trouble-Shooting steps, Video Tutorials, Code Snippets, How Tos, Blogs, Articles, etc.
🎉 We are celebrating the 10th years of Code2care! Thank you for all your support! We hope we made a difference.
We strong support Gender Equality & Diversity.

We stand in solidarity with Ukraine - Make a donation to UNHCR - https://donate.unhcr.org/in/en-in/ukraine-emergency