ODM Command Line Build For Classic Rule Projects - ibm-odm

I am using ODM 8.10 and want to automate building rule app files. The code is currently configured in the old Classic Rule Project, and we are trying to avoid migrating to Decision Services at this time. I have found build jars for Decision Services but nothing so far for Classic Rule Projects. There must be a way to do this as the rule app jar files are created in the eclipse IDE when you deploy/export a ruleApp. I am trying to find out the jar files the IDE uses and the commands it calls to execute the rule app builds.

Re: "There must be a way to do this"
But you will not necessarily have access to it. The ODM product developers have experience, source code, documentation, and other tools that you do not have access to.
Having said that, there is an build/deploy API that you may be able to access via ANT. I haven't used it since switching to Decision Services when that became feasible in ODM 8.7. Standard practice before that time was to automate deployments via Ant and a "headless" version of Eclipse. If the latest online docs don't describe it, you might try the older docs.
WARNING: Classic Rule Projects are a dead end! Not only will all your effort building them in a non-standard way be wasted, I believe that it will likely be more trouble than just migrating to Decision Services (which is not usually that difficult).

Related

What are the best practices to prevent code loss while regenerating application with JHipster

What are the best practices to deal with code regeneration and custom code in some complex project using JHipster? How not to lose custom changes while regenerating the project? Our team usually consist of 5 to 10 developers.
There is an approach named as side-by-side (see https://www.youtube.com/watch?v=Gg5CYoBdpVo) that requires discipline from developers.
Also --incremental-changelog new feature of JHipster 7 can help to manage incremental changes to SQL database, even though it's currently poorly documented.
Another useful feature is to generate your project with #GeneratedByJHipster annotation in your Java classes by using jhipster --with-generated-flag
If a team of 5 to 10 devs works on same app, it will be hard anyway without JHipster but even harder with JHipster. I see several alternatives:
Use a microservice architecture to help isolating from others changes.
For a monolith, I would recommend using JHipster only for bootstrapping the app, generate few base entities and then forget about it, cut down the dependencies with JHipster and develop the project as a usual Spring Boot project.

Why are SAP Commerce Cloud recipes not recommended for Production, but the set-up instructions usually mentions using recipes?

In Installing SAP Commerce Using Installer Recipes and Installer Recipe Reference, there is a comment that says something like:
The installer is currently only intended to install SAP Commerce in
development environments or for demonstration purposes. Do not use the
installer to install SAP Commerce in a production environment.
However, guides like Customizing the Accelerator with extgen and modulegen usually mention recipes:
On Windows: install.bat -r b2c_acc_plus
So, how do you really set-up a project from scratch? Do you start with recipes, or do you start with ant modulegen?
I don't see clear instructions (or best practice) on how I should build a B2C/B2B application from scratch for development and then preparing it for Production. (Maybe there is a gap in the instructions, or I just don't know where it is)
Even the Installing SAP Commerce Cloud for use with Spartacus guide mentions starting with a B2C recipe. Does this mean that the starting point of building a SAP Commerce project is to use recipes? Are there cases where you would not use a recipe, and build everything from scratch using ant modulegen and ant addoninstall?
It is not recommended to use recipe for direct installation on production. Reason being it installs a preset of hybris extensions which might or might not be needed for your requirements, also it might not be a allowed to use under the license you got.
However, when you start your development, you can use recipe to give your development a quick start. It generates the raw structure for your e-commerce application which you would need to customize and later deploy on your production.
how do you really set-up a project from scratch? Do you start with recipes, or do you start with ant modulegen?
Well, You can use any of those. If you are looking for difference, it has already been answered here
how I should build a B2C/B2B application from scratch and prepare for production?
For production hybris deployment procedure refer this.
NOTE :
a) recipe installation does more than what you can achieve using modulegen like complete installation, configuration and initialization for a running e-commerce example. I think once you go through above links, you will have a much better understanding on this.
b) When you go with recipe, it will install related extensions which you might not want to use or don't have production license for that. Please be considerate to review and disable such extensions,
Thanks
A few more points adding to the answer by www.hybriscx.com
Generally, the integrations in a recipe are mock integration e.g. payment integration as the purpose of a recipe is to provide a ready-to-use demo/reference application (store).
The data (catalog, users & password, usergroups, roles, promotions etc.) in a recipe are sample data. The same goes with the look-n-feel (logos, colour, layout etc.). Every business requires its specific data and look-n-feel.
The system configurations/properties (e.g. memory configuration, logging configuration etc.) may be optimised for the demo purpose but the production setup may require a different configuration. On the same line, configurations like hosts, ports, encryption etc. are general purpose configurations and a production environment may need to change them.
The database set up by a recipe is generally HSQLDB which is only good for development/demo.

Any tool to go from java code to jHipster templates?

Since the generated java code doesn't fit all my needs, I would need to modify the templates (mainly in server). Small modifications are pretty straightforward but I was wondering if there is some tool to go from existing java code to this template.
We did modules for this use case, and I even did some specific ones for some clients. So this would be my favorite solution.
Then, I clearly see in our stats that many people are forking JHipster and modifying it - this is probably easier at first sight, but of course you'll have trouble when we release new versions, as you will have to sync your code with each new release.

Are there any tools like landscape.io which work with Mercurial/BitBucket?

I want to use a tool like landscape.io to keep track of technical debt that people might be accidentally introducing into an open-source project. Unfortunately that tool only seems to work with GitHub.
Is there a similar tool that offers static code analysis as a hosted service that's also compatible with BitBucket and Mercurial?
I'm certain that I could get most of this using a hand-rolled linter running under Jenkins but I'd rather not have to maintain this. It's a nice thing to have not really a core part of the project I want to spend too much time on. In other words I want a ready to roll solution.
My project is in Python 3.x

Why can BuildProvider be used only with ASP.NET website projects?

I was going to try Subsonic, you can generate DAL with buildProvider element in an ASP.NET website project. But I get curious why Web applications or windows applications do not support BuildProvider.
PS: I know for Subsonic there is one other option to use it with other than BuildProvider, but I just get curious.
It doesn't work because of the different way things are compiled in web application projects vs. website projects. From what I read on MSDN, it has to do with the fact that in web app projects, all your code files are compiled into a single assembly using MSBuild before deployment, but Build Providers are used to generate code that is compiled at runtime (from your App_Code folder).
In website projects, all of your code is compiled at runtime so it all plays nicely together.
You could possibly hook it into your pre-build event, and call the sonic.exe with the proper command line.

Resources