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 add local jar files in the project?
i am using mvc-portlet module for my project in liferay 7.
I need to add some jar files to it which i have added into the module by creating a folder inside.
i have made the required additions in the gradle.properties file.Still it is not getting deployed.when i tried to start it in the gogo shell it is giveing import jar error
it showing Below Error :
org.osgi.framework.BundleException: Could not resolve module:
screener [687]
Unresolved requirement: Import-Package: chemaxon.formats
star boy:I need to add some jar files to it which i have added into the module by creating a folder inside.
Is there a reason you've manually added them to a folder rather than referencing them as regular Maven dependencies?
Having them in a folder requires you to, at a minimum, do something
similar to com.liferay.portal.osgi.web.wab.extender,
where you declare the dependency as a fileTree dependency
at compile time, and then you have to make sure the .jar is deployed
to the OSGi container.
If those dependency .jar files aren't OSGi modules that declare
exported packages, you'll also need an added step to embed the .jar
into your generated module (probably with steps similar to this
earlier post), which would have been handled for you
automatically if they were compileInclude dependencies
from a public/private Maven repository.