OSGI not providing system exported dependencies (confluence version 8.8.0)

Getting this error when using org.apache.commons.fileupload

Caused by: org.osgi.framework.BundleException: Unable to resolve <plugin.name> [315](R 315.0): missing requirement [<plugin.name> [315](R 315.0)] osgi.wiring.package; (&(osgi.wiring.package=org.apache.commons.fileupload)(version>=1.2.3)(version<=1.5.0)) Unresolved requirements: [[<plugin.name>[315](R 315.0)] osgi.wiring.package; (&(osgi.wiring.package=org.apache.commons.fileupload)(version>=1.2.3)(version<=1.5.0))]
	at org.apache.felix.framework.Felix.resolveBundleRevision(Felix.java:4398)
	at org.apache.felix.framework.Felix.startBundle(Felix.java:2308)
	at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:1006)
	at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:992)
	at com.atlassian.plugin.osgi.factory.OsgiPlugin.enableInternal(OsgiPlugin.java:404)

Where i can see that this osgi bundle is being exported by the system. As you can see in the screenshot -

Below is the pom which i am using
1st Dependency

        <dependency>
            <groupId>commons-fileupload</groupId>
            <artifactId>commons-fileupload</artifactId>
            <!-- version is provided by confluence pom -->
            <scope>provided</scope>
        </dependency>

2nd import package

<Import-Package>
    org.apache.commons.fileupload;version="[1.2.3,1.5.0]",
    org.apache.commons.fileupload.disk;version="[1.2.3,1.5.0]",
    org.apache.commons.fileupload.servlet;version="[1.2.3,1.5.0]",
    *;resolution:="optional"
</Import-Package>

Does anyone know why this is happening for confluence version 8.8.0 & 8.7.1 and not before.

https://developer.atlassian.com/server/confluence/get-your-apps-ready-for-gray-api-removal/

Thanks for the document @JackNolddor. But as you can see in the above question asked by me. I am already doing what they have asked in the document link you have provided.

In case you are running your server in DEV mode, you would need to have compile scope. Or you are setting DEV mode to false.

If this is the case for your issue, then you can find more information on this here: Preparing for Confluence 9.0 - EAP coming soon - #82 by rr1