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: Configuration not working on LR 7.2
Hi
Some months ago I developed a configuration bundle for LR 7.1 CE, then installed then on Liferay DXP, that correctly works.
I'm trying the same on LR 7.2 CE but it doesn't work, the configuration items missing in System Settings.
I followed the guide at this link
https://portal.liferay.dev/docs/7-2/frameworks/-/knowledge_base/f/configurable-applications
I noticed that inside the jar, the folder OSGI-INF/metatype is missing, so any xml configuration file was inside the bundle.
I created the interface
The "id" property contains the fqn of the class. Then, inside the bnd.bnd I added the following line
Can you help me?
Thanks
Marco
Some months ago I developed a configuration bundle for LR 7.1 CE, then installed then on Liferay DXP, that correctly works.
I'm trying the same on LR 7.2 CE but it doesn't work, the configuration items missing in System Settings.
I followed the guide at this link
https://portal.liferay.dev/docs/7-2/frameworks/-/knowledge_base/f/configurable-applications
I noticed that inside the jar, the folder OSGI-INF/metatype is missing, so any xml configuration file was inside the bundle.
I created the interface
import com.liferay.portal.configuration.metatype.annotations.ExtendedObjectClassDefinition;
import aQute.bnd.annotation.metatype.Meta;
@ExtendedObjectClassDefinition(
scope = ExtendedObjectClassDefinition.Scope.COMPANY
)
@Meta.OCD(
id = TestBaseConfiguration.Id,
localization = "content/Language"
)
public interface TestBaseConfiguration {
public static final String Id = "it.test.configuration.TestBaseConfiguration";
@Meta.AD(
name = "enable-send-mail",
deflt = "false",
required = false
)
public boolean enableSendMail();
}
The "id" property contains the fqn of the class. Then, inside the bnd.bnd I added the following line
-metatype: *
Can you help me?
Thanks
Marco
That happens since Liferay workspace 2.0.3, support of various annotations was removed in bnd 4.x and with that version Liferay started to use bnd 4.2.
It works with: classpath group: "com.liferay", name: "com.liferay.gradle.plugins.workspace", version: "2.0.2"
You could also try 2.0.6, but I don't know if the issue is already fixed.
It works with: classpath group: "com.liferay", name: "com.liferay.gradle.plugins.workspace", version: "2.0.2"
You could also try 2.0.6, but I don't know if the issue is already fixed.
Great! Now it works.
Thank you very much!
Thank you very much!
There's no more need to downgrade, you can also use a more recent (rather than an older) version of Liferay Workspace.
Edit your settings.gradle to include a newer version of Liferay Workspace. 2.1.9 works for me, but check the link for the current version
Edit your settings.gradle to include a newer version of Liferay Workspace. 2.1.9 works for me, but check the link for the current version
Copyright © 2025 Liferay, Inc
• Privacy Policy
Powered by Liferay™