Ask Questions and Find Answers
Important:
Ask is now read-only. You can review any existing questions and answers, but not add anything new.
But - don't panic! While ask is no more, we've replaced it with discuss - the new Liferay Discussion Forum! Read more here here or just visit the site here:
discuss.liferay.com
RE: how to use external jar in liferay 7
hi
i am useing liferay 7.4. and i try use oracle plm api.
i had read osgi-module-dependencies, and put my jars in <LIFERAY_HOME>\tomcat-9.0.56\webapps\ROOT\WEB-INF\shielded-container-lib
but how to use the object in my code? i mean, i have no any information for build.gradle
and i also tried option 4
i modify my build.gradle
dependencies {
compileOnly group: "com.liferay.portal", name: "release.portal.api"
cssBuilder group: "com.liferay", name: "com.liferay.css.builder", version: "3.0.2"
runtime group: 'com.oracle', name: 'agileApi', version: '9.6.3.8'
runtime group: 'com.oracle', name: 'pxapi', version: '9.6.3.8'
}
and my bnd.bnd
Bundle-Name: VWT-XX
Bundle-SymbolicName: com.vwt
Bundle-Version: 1.0.0
Export-Package: com.vwt.constants
Bundle-ClassPath:\
.,\
libs/AgileAPI.jar,\
libs/pxapi.jar
-includeresource:\
libs/AgileAPI.jar=agileApi-[0-9]*.jar,\
libs/pxapi.jar=pxapi-[0-9]*.jar
i put my folder "libs" under resource or first layer, both not work.
can anyone help, thank in advance.
Do not put stuff into ROOT/WEB-INF/...
Rather: Check if your dependencies are OSGi bundles - in that case just deploy them to the runtime as well. Otherwise check if you can make them OSGi bundles yourself. Last resort: Try Liferay Workspace's compileInclude directive
hi Olaf
my jars are not osgi bundles, it's oracle provide for oracle plm
AgileAPI.jar and pxapi.jar
for "make them OSGi bundles yourself", do you mean, modify MANIFEST.MF file and put in deploy folder?
for Try Liferay Workspace's compileInclude directive, i have no idea.
are there any document for detail operate?