Default version package gets when Export-Version does not specify version - osgi

In OSGi, if I do not specify version in the Export-Package directive inside MANIFEST.MF, which version exported package will get?
Version equal to the bundle version?
Zero version (something like 0.0.0)?
Something else?
P.S. And here is the rationale behind this logic: https://mail.osgi.org/pipermail/osgi-dev/2010-August/002608.html

For Export-Package the version defaults to 0.0.0, and for Import-Package the version defaults to [0.0.0, infinte]. See also chapters 3.5.4 and 3.5.5 of the OSGi Core Specification.

Related

Found Gradle version Gradle 7.4. Versions Gradle 6.0.0 and newer are not supported in FG3, FG4 however supports Versions 6.8.1 and newer

I have a problem with Gradle. I'm trying to make a mod for Minecraft 1.12.2 and I'm using Intellij IDEA. Everything works fine for the version 1.16.4, but if I want to build a mod for the 1.12 I get this error:
Failed to apply plugin 'net.minecraftforge.gradle'.
Found Gradle version Gradle 7.4. Versions Gradle 6.0.0 and newer are not supported in FG3, FG4 however supports Versions 6.8.1 and newer. Consider upgrading.
It's supposed to do something with apply plugin: 'net.minecraftforge.gradle' in the build.gradle file.
I don't have much experience with this sort of stuff so please help me. Thanks in advance
to write a mod for 1.12.2, Forge provides a build.gradle file. In this, the 3.+ (FG3) is specified as the ForgeGradle version.
The current version of Gradle (7.4.2) only supports ForgeGradle versions from FG4 and newer.
FG3 - older than Gradle version 6.0.0
FG4 - Gradle version 6.8.1 and newer
You now have two options:
You take the Gradle version 7.4.2 and make a mod for a Minecraft version with a ForgeGradle version from FG4 or newer.
You take an older Gradle version.

Gradle Version Resolution Problem: Building Xcore

Background
I'm trying to build a project which has a dependency on a library xcore 1.10.0 that has a dependency on antlr with restriction [3.2.0, 3.2.1). What exists is a version 3.2.
Problem
The build fails reporting Could not find any version that matches org.antlr:antlr-runtime:[3.2.0, 3.2.1).. When I explicitly ask for version 3.2, it resolves. When I check ava -cp "$MAVEN_HOME/lib/*" org.apache.maven.artifact.versioning.ComparableVersion 3.2 3.2.0 3.2.1, I get the following (which I interpret as 3.2 being within the requested racket):
1. 3.2 == 3.2
3.2 == 3.2.0
2. 3.2.0 == 3.2
3.2.0 < 3.2.1
3. 3.2.1 == 3.2.1
Reporduction
To try this at home, one should be able to check out this example project and try running ./gradlew clean build.
Questions
Is the version bracket wrongly specified (given the versions that actually exist and assuming version 3.2 is required)? Or is Gradle doing something weird with the interpretation of the version bracket?
Is there a way to work around this (other than uploading a "fake" replica with version 3.2.0 to a local repository)?

which one is the latest version of maven to use

I am trying to use maven in our project and am new to it.
checking this https://maven.apache.org/download.cgi
3.6.0 version is latest version to download.
Someone was saying there is maven 4 is latest. Not sure where to download this from and can we use this for java 8.
Which one is latest version to use?
From https://maven.apache.org/download.cgi
Apache Maven 3.6.0 is the latest release and recommended version for
all users.
Works nicely with Java 8. Note that your IDE may bundle an older version in the unlikely case you run into problems.

Composer tilde syntax (Next significant release)

I've installed amnah/yii2-user library from packagist via composer into my project. The project's composer.json relevant require section looks like:
"amnah/yii2-user": "~2.0"
To my understanding, this should install the latest version with a major version of "2". When I check the installed package via composer show amnah/yii2-user -v, I see the following version information:
versions : dev-master, 2.1.0-alpha4, 2.1.0-alpha3, 2.1.0-alpha2, 2.1.0alpha,
* 2.0.0-alpha2, 2.0.0-alpha, 1.0.0-beta
So 2.0.0-alpha2 is installed, the 2.1 versions are ignored. Isn't it supposed to work like
Another way of looking at it is that using ~ specifies a minimum
version, but allows the last digit specified to go up.
as the documentation states? I'd need the latest 2.x version installed. What am I missing?
If you need the latest 2.x version installed, you should use ~2.1 if "latest" means that at that time a version 2.1 is the most current version released.
But I wonder why you are getting the alpha version installed. Usually Composer defaults to only install stable versions, no release candidates (rc), beta, alpha nor dev versions. Did you add a setting for minimum-stability and/or preferred-stability?
So if you want alpha versions, you should require ~2.1#alpha.
And a word of caution: The project you are using does require yiisoft/yii2: * and yiisoft/yii2-authclient: * - asterisk meaning that ANY version is sufficient. Yii itself claims that the released 1.1 version is incompatible with the newer 2.0 series (which is not yet released), whatever that means.

cxf jar with latest xjc version 2.2.6 needed

Can any one please post me where to find a cxf jar which has the latest xjc version in. Currently I am using 2.2.11 and it throws an erorr when using with -xjc-Xannotate. can u also tell me how can we look into cxf jar and tell it has the latest xjc version in it?
xjc is an official component of Oracle/Sun Java Development Kit.
Inside Apache CXF distribution, you have xjc libraries for internal use. You better use JDK xjc.
To know which version of xjc is in cxf, just check the file in lib directory, for example, the latest cxf version (2.6.1) shows a xjc version of 2.2.5 :
apache-cxf-2.6.1/lib/jaxb-xjc-2.2.5.jar
You can have the latest version of xjc in the JAXB RI. Currently, the latest version is 2.2.6.

Resources