I was able to configure it through sense and through pure java... but haven't found any resources to do it using elasticray ... I am using Liferay 6.2
You simply need to change the template.json file located in webs/elasticray-web/docroot/WEB-INF/src/com/rknowsys/portal/search/elastic to suit your changes.
Then you can rebuild the WAR and redeploy it inside Liferay. That will do the job.
Related
I´m currently building a spring-boot application, which also uses some javascript-stuff. I use yarn as a package-manager to manage the different js-libraries.
Now I wonder, how I would include these resources into my spring-boot-project? Simply including the whole node_module-folder as a resource seems to be overhead for me, as this doesn´t neccessarily contain only the required sources (for me it is more like my local maven-repo-path). How do I identify, which java-script-resources should be included in my jar in the end, so that I can also reference them in my Thymeleaf-HTML-templates.
I already found the 'frontend-maven-plugin' (https://github.com/eirslett/frontend-maven-plugin) which helps me to install all my yarn-dependencies during build, but it doesn´t care about the build-process, as far as I can see.
Thanks for your help!
Perhaps you should consider using webpack or some other javascript bundler/task runner to bundle your javascript and required dependencies into a single file. Then you can simply include that bundled file in your jar. For example: http://justincalleja.com/2016/04/17/serving-a-webpack-bundle-in-spring-boot/
I am using liferay 6.2 & built a maven portlet and working fine, I want to use its tables to store data for another portlet so that I need its services in this portlet.
But we can't access it externally so i find a way something like: required-deployment-contexts=Portlet-Project1 inside liferay-plugin-package.properties, then found its works for Ant only.
I was also finding the xxx-portlet-service.jar but didn't able to, so that i could manually put it in other portlet's lib folder i.e inside tomcat-webapps-xxxportlet-WEB-INF.
Just want to find how to use xxxLocalService.util in other in maven portlet
The best approach you can implement is a plugin to manage all the interaction with the DB.
First of all you must create a Service with a maven project and include it into your pom.xml in each portlet that you need. Then you can invoke its methods whenever you want because each portlet will store the dependencies.
Create Service Plugin into jar file
Rebuild with mvn clean liferay:build-service
Custom your own methods to manage the iteraction with the DB (LocalServiceUtilImpl and rebuild).
Include this plugin into pom.xml portlets
Rebuild your portlet.
The JAR will be placed in your .m2 folder, then each time that you rebuild your Service Plugin will be updated.
If i understood your question correctly, You need to create service builder project using maven and then you can add as dependency in other project wherever you need access to use xxxLocalServicutil class.
You can follow below link to create maven service builder project.
http://www.liferay-guru.com/how-to-use-liferay-servicebuilder-archetype/
As you mentioned in your question.
was also finding the xxx-portlet-service.jar but didn't able to, so
that i could manually put it in other portlet's lib folder
To answer this, manually putting .jar file in lib directory will not help when you are working with maven project
I am trying to split Jhipster generated project into multi module project.
I want to separate Presentation layer with angularJs into separate module.
How could I do that?
However, with a little effort you can separate the deployment of frontend and backend. i.e. use nginx for the frontend contents (configured to proxy the requests to the backend) and use tomcat for the backend.
i.e. change the dist directory and then do "grunt build". A few things will be missing (init, bower_components and i18n). aka, editing a bit the Gruntfile.js will be required in order to fix it.
JHipster is not meant to be a "multi-module" project.
Of course you can do it if you want to re-code everything, but that would be really complicated.
I'm working on a liferay portlet developed by another contractor. The project was designed in maven, with all the service classes (service-builder) in a seperate bundle. So when the project is called foo, there are projects like:
foo-portlet
foo-service
foo-service-portlet
foo-service-portlet-service
I don't really understand why the services are splitted like that. And why they aren't part of foo-portlet.
The service.xml is located in foo-service-portlet/src/main/webapp/WEB-INF. There's no build.xml so running service-builder using ant won't work.
Now, we're facing some troubles because of https://issues.liferay.com/browse/MAVEN-37 and I'd like to turn the services into an ant project.
I thought about:
Creating another portlet using the plugins-sdk
Copying the old service.xml and overriding the new one
Running service-builder with ant
Copying the old impl classes and overriding the new ones
Rerunning the service builder using ant
But what will hapen when I deploy the new portlet? Will liferay realize that the tables defined are already there? The old code is already in production and has a lot of data which may not be lost!
Thanks in advance, Fabi.
Btw., still using liferay 6.1.20 EE.
I have created a Dynamic web project which also uses drools for providing some functionality. When i put the WAR file in Tomcat7 and the server, the drools part does not work.
KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder();
After this line which is first line relating to drools, nothing happens.
Is some configuration required to run my project containing drools 5.5.0 Final in the Tomcat7.
Please help me. I am badly stuck and I am new to drools.
You'll have to add some facts to the working memory and execute(fire) the rules. Check out these examples on GitHub
P.S. Probably not related to Tomcat in any way. Might be worth while to try getting the rules executed from command line app first.
You need to check all the dependencies that are added to your web application (WEB-INF/lib) make sure that drools has all the required deps there, because if not it will not be able to create the knowledge builder. Most of the time if it is failing is because that you forgot to add the deps in the web app.
The following project in GitHub is a web application, containing some REST-style endpoints for validating IBANs. It uses Drools 5.5 to perform that evaluation.
https://github.com/gratiartis/sctrcd-payment-validation-web/
It generates a .war which can be loaded into Tomcat, and could be a useful starting point. The knowledge base is wrapped within a Spring service:
https://github.com/gratiartis/sctrcd-payment-validation-web/blob/master/src/main/java/com/sctrcd/payments/validation/RuleBasedIbanValidator.java
Following through how that creates a knowledge base and session might help you see where your code is going wrong.
As a bonus, you can run it up in Tomcat using "mvn tomcat7:run" to test it out immediately.