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: Gradle serviceBuilder task definitions
Where can I find the definition (i.e. build.gradle file) for the serviceBuilder task? I'm using Liferay 7.1.0 ga1. I want to know what's happening and I'm also finding an issue where it's writing two of one entity for some reason and I have to go in and physically delete the duplicate or the service module doesn't start up.
It's also writing the services.properties file and I need to include some specific Spring XML configuration to that file.
Thanks
It's also writing the services.properties file and I need to include some specific Spring XML configuration to that file.
Thanks
You shouldn't monkey w/ the task, it does a lot of things in ways that are obfuscated.
I don't understand the generation of two entities, everything comes from the service.xml definition and it shouldn't allow dups. Can you share your service.xml and describe more about the issue?
You don't (and shouldn't) change service.properties because it is a generated file. Instead, write your stuff into service-ext.properties; that's a file that is not overwritten but will be included in your properties.
I don't understand the generation of two entities, everything comes from the service.xml definition and it shouldn't allow dups. Can you share your service.xml and describe more about the issue?
You don't (and shouldn't) change service.properties because it is a generated file. Instead, write your stuff into service-ext.properties; that's a file that is not overwritten but will be included in your properties.
Understood, I just want to see what it does. It seems that I've fixed my error, but I'm not sure how. What it was doing was repeating a definition of an entity module in the module-spring.xml after running the service builder (gradle task). I won't show the code because it seems to be a moot point now. I'm guessing I had a configuration wrong or something.
Thanks
Thanks
Long story short, it is a wrapper around a custom Liferay java app which parses the service.xml and uses Velocity templates for regenerating the various java source files.
There are mechanisms to use alternative templates, etc., but I have never known of an organization sophisticated and advanced enough to go down this path, especially since it is totally undocumented.
There are mechanisms to use alternative templates, etc., but I have never known of an organization sophisticated and advanced enough to go down this path, especially since it is totally undocumented.
Copyright © 2025 Liferay, Inc
• Privacy Policy
Powered by Liferay™