Oracle Access Manager 11g R2PS3 (OAM 184.108.40.206) ASDK: Oraclepki.jar Maven Project Compilation With oraclepki.jar From The ASDK Fails - "The default package '.' is not permitted by the Import-Package syntax. "
(Doc ID 2272986.1)
Last updated on FEBRUARY 22, 2020
Applies to:Oracle Access Manager - Version 220.127.116.11.0 and later
Information in this document applies to any platform.
Oracle is not responsible for instructions/information from 3rd party sites that may be contained in this KM note.
On : Oracle Access Manager 11g R2PS3 (OAM 18.104.22.168)
Cannot build maven project with dependency on oraclepki.jar from OAM ASDK 22.214.171.124
"The default package '.' is not permitted by the Import-Package syntax."
Setup details provided by customer.
• Maven is a hugely popular build tool from the Apache stable. Here is a quick sneak peek into maven.
• Maven pulls all the project build dependencies from the nexus repository, adds them to the build class path and builds/compiles the project.
• Oraclepki.jar is added to the nexus repository. It is referenced in the POM file as follows:
• And then the build is run as “mvn clean install”. This would start maven; it will read through the pom file to build a dependency tree, pull the dependencies from the nexus repository, add them to the classpath and then compile it.
• With oraclepki.jar as a dependency, “mvn clean install” fails compilation with the following error:
[ERROR] Bundle com.xxxnx.cms:site-myprofile:bundle:1.1.27-SNAPSHOT : The default package '.' is not permitted by the Import-Package syntax.This can be caused by compile errors in Eclipse because Eclipse creates
valid class files regardless of compile errors.
The following package(s) import from the default package null
[ERROR] Error(s) found in bundle configuration
• Maven expects all dependent jar files/projects to be bundled tightly with no class lurking in the default/unnamed package. And that is precisely the problem with oraclepki.jar.
To view full details, sign in with your My Oracle Support account.
Don't have a My Oracle Support account? Click to get started!
In this Document