Hello Lukas,
hmm, few more things to check:
does it happen on jdk 8?
Yes
does it happen also for 'build' or 'clean build' or just for 'clean'?
It looks like it happens during 'clean-core'
what exact version of jdk11 it is? Is it 11.0.2?
It happens with java8 as well, so this feels unimportant
what is the content of
~/.m2/repository/org/glassfish/corba/glassfish-corba-omgapi/4.2.0/glassfish-corba-omgapi-4.2.0.jar!/META-INF/MANIFEST.MF?
does it contain javax.rmi package in export-package section?
Interestingly, no. It does not export javax.rmi.
Also, I have
~/.m2/repository/p2/osgi/bundle/org.glassfish.corba.glassfish-corba-omgapi/4.2.0/org.glassfish.corba.glassfish-corba-omgapi-4.2.0.jar, but this MANIFEST.MF doesn't contain the javax.rmi export either. I bring up this bundle, because if I remove ";version=1" from ~/foundation/org.eclipse.persistence.corba/META-INF/MANIFEST.MF, then "clean" completes successfully, but "build" fails with:
[java] [ERROR] Access restriction: The type 'PortableRemoteObject' is not API (restriction on classpath entry '
$HOME\.m2\repository\p2\osgi\bundle\org.glassfish.corba.glassfish-corba-omgapi\4.2.0\org.glassfish.corba.glassfish-corba-omgapi-4.2.0.jar')
[java] [ERROR] C:\JPA\EL\master\trunk\eclipselink.runtime\foundation\org.eclipse.persistence.corba\src\main\java\org\eclipse\persistence\internal\sessions\coordination\rmi\iiop\RMIRemoteCommandConnectionImpl.java:[42]
[java] [ERROR] super();
[java] [ERROR] ^^^^^^^^
[java] [ERROR] Access restriction: The constructor 'PortableRemoteObject()' is not API (restriction on classpath entry '
$HOME\.m2\repository\p2\osgi\bundle\org.glassfish.corba.glassfish-corba-omgapi\4.2.0\org.glassfish.corba.glassfish-corba-omgapi-4.2.0.jar')
does it happen with empty local maven repo? (mv $HOME/.m2/repository
$HOME/.m2/repository-bkp)
Interesting, this seems to have fixed the problem. So the old 4.2.0 version lacked a javax.rmi export, but the new 4.2.0 version does have the javax.rmi version, yet they have the same version number...
Thanks Lukas,
Will Dazey